From 9a878d6562e6a061d660bc901e068ba3aedda1da Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 27 Oct 2026 18:58:48 +0700 Subject: [PATCH 01/73] apple upload: find the IPA of a build made with --out (build notes it in .storebound/last-apple-build.json; upload --out; the error names every folder searched and the last build's IPA) --- CHANGELOG.md | 2 ++ cli/apple/build.ts | 3 ++- cli/apple/upload.ts | 24 +++++++++++++++++------- cli/data/flags.json | 3 ++- cli/lib/xcode.ts | 20 +++++++++++++++++++- tests/path-free.test.ts | 17 ++++++++++++++++- 6 files changed, 58 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0057f..fa80824 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- `apple upload` finds the IPA of a build made with `--out`: `apple build` notes its IPA and out folder in `.storebound/last-apple-build.json`, and upload searches `--out` (new flag), then that last build's out, then `apple.build.out` / `build/ios`. When nothing is found, the error names every folder it searched and the last build's IPA. + ## 0.8.56 · 2026-10-27 - Release type. `apple.releaseType: afterApproval | manual | scheduled` (+ `apple.earliestReleaseDate`): `apple listing` creates versions with it (MANUAL when unset, existing versions untouched) and `apple submit` / `resubmit` set it before submitting when it differs, the dry run showing old -> new. New `apple release --after-approval | --manual | --scheduled [--platform] [--version] [--first-release] --yes` changes it on a version App Review has not approved yet (clear refusal otherwise, with `--manual-release` as the way out); exit 7 when it already has that type; an update is an agent step, after-approval on the first version of an app is exit 3 OWNER_STEP. Pitfall 125. diff --git a/cli/apple/build.ts b/cli/apple/build.ts index 13e8a89..d877447 100644 --- a/cli/apple/build.ts +++ b/cli/apple/build.ts @@ -41,7 +41,7 @@ import { liveDeviceFamilies } from './device-families'; import { keychainPassword, keychainSigningArgs, parseKeychainList, showSecurity, sshBuildRefusal, unlockSteps } from '../lib/keychain'; import { appGroupSteps, appGroupVerdicts, type GroupEvidence } from '../lib/targets'; import { capacitorProject, webStep } from '../lib/web-assets'; -import { archiveArgs, type AscAuth, distributionErrors, exportArgs, foreignRsync, remoteBuildSession, xcodePath, flutterConfigArgs, ipaInfo, ipaVersionProblem, pickXcode, scanXcode, showCmd } from '../lib/xcode'; +import { archiveArgs, type AscAuth, distributionErrors, exportArgs, foreignRsync, remoteBuildSession, xcodePath, flutterConfigArgs, ipaInfo, ipaVersionProblem, pickXcode, recordLastBuild, scanXcode, showCmd } from '../lib/xcode'; import { bundleTrackingIssues, ipaManifests } from '../lib/privacy-files'; import { ascClient } from './asc'; import { parsePlatform } from './platform'; @@ -305,6 +305,7 @@ export async function run(ctx: Ctx): Promise { const result = { ipa: join(exportPath, ipa), bundleId: info.bundleId, version: info.version, build: info.build, web: web.bundle, derivedData: derivedData ?? null, pathFree, ...(scanPaths ? { leaks } : {}) }; writeFileSync(join(out, 'latest.json'), `${JSON.stringify(result, null, 2)} `); + recordLastBuild(root, { ipa: result.ipa, out, version: info.version, build: info.build }); if (json) printJson(result); done(TAG, `${relative(root, result.ipa)}: ${info.bundleId} ${info.version} (${info.build}). Next: storebound apple upload ${relative(root, result.ipa)} --dry`); } diff --git a/cli/apple/upload.ts b/cli/apple/upload.ts index 114d989..28ccd4a 100644 --- a/cli/apple/upload.ts +++ b/cli/apple/upload.ts @@ -1,7 +1,8 @@ // Upload an IPA to App Store Connect and wait until Apple has processed the build. -// storebound apple upload [] [--build N] [--allow-existing] [--via api|altool] [--no-wait] [--timeout 60m] [--pre-check ""] [--evidence ] [--dry] [--yes] [--json] +// storebound apple upload [] [--out D] [--build N] [--allow-existing] [--via api|altool] [--no-wait] [--timeout 60m] [--pre-check ""] [--evidence ] [--dry] [--yes] [--json] // storebound apple upload --platform macos [...] (Mac App Store .pkg from apple build --platform macos --tauri; platform MAC_OS, uti com.apple.pkg; altool gets --type macos; no SDK / privacy-manifest check) -// Default IPA: the newest in /export (and its -/ folders), or with +// Default IPA: the newest in <--out>/export, else the last apple build's /export (.storebound/last-apple-build.json, +// so a build with --out is found), then /export (and its -/ folders), or with // --build N the one with that build number. The bundle id, version and build number come from the IPA's Info.plist. // An IPA whose build number is already on App Store Connect fails with exit 1 (a stale IPA left by a failed // `apple build`, pitfall 53); only --allow-existing (flows that resume after a finished upload) re-checks it instead. Before any network call every PrivacyInfo.xcprivacy in the IPA @@ -27,7 +28,7 @@ import type { Ctx } from '../lib/ctx'; import { confirm, need } from '../lib/ctx'; import { done, log, printJson, warn } from '../lib/log'; import { compareBuild, nextBuildNumber, nextPollDelay, parseDuration, WAIT_EXIT } from '../lib/release'; -import { altoolArgs, buildUploadReqs, exportedIpas, ipaInfo, ipaVersionProblem, showCmd, UPLOAD_DONE, uploadProblems } from '../lib/xcode'; +import { altoolArgs, buildUploadReqs, exportedIpas, ipaInfo, ipaVersionProblem, readLastBuild, showCmd, UPLOAD_DONE, uploadProblems, uploadSearchDirs } from '../lib/xcode'; import { bundleTrackingIssues, ipaManifests } from '../lib/privacy-files'; import { BUILD_WAIT_EXIT } from '../lib/build-ops'; import { type Asc, ascClient, type J } from './asc'; @@ -238,11 +239,20 @@ export async function run(ctx: Ctx): Promise { const macos = parsePlatform(a.get('platform')) === 'MAC_OS'; let ipa = a._.find(x => x.endsWith('.ipa') || x.endsWith('.pkg')); if (!ipa) { - const dir = join(resolve(config.apple?.build?.out ?? 'build/ios'), 'export'); - let found = exportedIpas(dir); - if (want) found = found.filter(f => { try { return ipaInfo(f).build === want; } catch { return false; } }); + const last = readLastBuild(root); + const flagOut = a.get('out'); + const dirs = uploadSearchDirs({ flagOut: flagOut ? resolve(flagOut) : undefined, lastOut: last?.out, configOut: resolve(config.apple?.build?.out ?? 'build/ios') }); + let found: string[] = []; + for (const dir of dirs) { + found = exportedIpas(dir); + if (want) found = found.filter(f => { try { return ipaInfo(f).build === want; } catch { return false; } }); + if (found[0]) break; + } if (!found[0] && macos) throw new Error('usage: storebound apple upload --platform macos (storebound apple build --platform macos --tauri makes one)'); - if (!found[0]) throw new Error(`usage: storebound apple upload (no ${want ? `build ${want} ` : ''}IPA in ${relative(root, dir)}; storebound apple build makes one)`); + if (!found[0]) { + const lastHint = last && !existsSync(last.ipa) ? `; the last apple build (${last.build}) wrote ${last.ipa}, which is gone` : last ? `; the last apple build (${last.build}) is ${last.ipa}` : ''; + throw new Error(`usage: storebound apple upload (no ${want ? `build ${want} ` : ''}IPA in ${dirs.map(d => relative(root, d) || '.').join(', ')}${lastHint}; pass the IPA, --out , or run storebound apple build)`); + } ipa = found[0]; } else ipa = resolve(ipa); shipPhase('verify', `checking ${relative(root, ipa)}`); diff --git a/cli/data/flags.json b/cli/data/flags.json index aa55fc7..3a24466 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -366,6 +366,7 @@ "locale", "no-wait", "older-than", + "out", "platform", "pre-check", "progress", @@ -1574,7 +1575,7 @@ "storebound apple testflight expire (--keep N | --older-than D) [--version x.y.z] [--dry] [--yes] [--json]" ], "apple upload": [ - "storebound apple upload [] [--build N] [--allow-existing] [--via api|altool] [--no-wait] [--timeout 60m] [--pre-check \"\"] [--evidence ] [--dry] [--yes] [--json]", + "storebound apple upload [] [--out D] [--build N] [--allow-existing] [--via api|altool] [--no-wait] [--timeout 60m] [--pre-check \"\"] [--evidence ] [--dry] [--yes] [--json]", "storebound apple upload --platform macos [...] (Mac App Store .pkg from apple build --platform macos --tauri; platform MAC_OS, uti com.apple.pkg; altool gets --type macos; no SDK / privacy-manifest check)" ], "apple win-back": [ diff --git a/cli/lib/xcode.ts b/cli/lib/xcode.ts index cccad53..ed5f4a7 100644 --- a/cli/lib/xcode.ts +++ b/cli/lib/xcode.ts @@ -1,7 +1,7 @@ // Xcode builds without Xcode's UI: find the workspace / project and scheme (native, Capacitor, React Native, Flutter, // Unity-exported projects), build the xcodebuild archive and export command lines, read an IPA's Info.plist. // Pure except scanXcode (a bounded directory walk) and ipaInfo (reads the IPA). -import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'; +import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'; import { basename, dirname, join, relative } from 'node:path'; import { parsePlist, type PlistValue } from './plist'; import { zipEntries, zipRead } from './zip'; @@ -266,3 +266,21 @@ export function remoteBuildSession(env: Record, mana if (managerName && managerName !== 'Aqua') return `this is not the logged-in GUI session (launchctl manager: ${managerName})`; return null; } + +/** Where `apple build` notes its last IPA for `apple upload`: .storebound/last-apple-build.json (gitignored). */ +export const lastBuildFile = (root: string): string => join(root, '.storebound', 'last-apple-build.json'); + +export function recordLastBuild(root: string, r: { ipa: string; out: string; version: string; build: string }): void { + try { mkdirSync(join(root, '.storebound'), { recursive: true }); writeFileSync(lastBuildFile(root), `${JSON.stringify(r, null, 2)}\n`); } catch { /* best effort */ } +} + +export function readLastBuild(root: string): { ipa: string; out: string; version?: string; build?: string } | null { + try { const j = JSON.parse(readFileSync(lastBuildFile(root), 'utf8')); return typeof j?.ipa === 'string' && typeof j?.out === 'string' ? j : null; } catch { return null; } +} + +/** The export folders `apple upload` searches, in order: --out, else the last build's out (a --out that build used), + * then apple.build.out / build/ios. Duplicates dropped. */ +export function uploadSearchDirs(o: { flagOut?: string; lastOut?: string; configOut: string }): string[] { + const dirs = o.flagOut ? [o.flagOut] : [...(o.lastOut ? [o.lastOut] : []), o.configOut]; + return [...new Set(dirs.map(d => join(d, 'export')))]; +} diff --git a/tests/path-free.test.ts b/tests/path-free.test.ts index 0a2e628..a6b599d 100644 --- a/tests/path-free.test.ts +++ b/tests/path-free.test.ts @@ -3,7 +3,7 @@ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { archiveScanDirs, derivedDataFor, leakNeedles, leakProblem, outsideHome, pathFreeSettings, prefixMaps, scanForPaths } from '../cli/lib/path-free'; -import { archiveArgs, validateAppleBuild } from '../cli/lib/xcode'; +import { archiveArgs, readLastBuild, recordLastBuild, uploadSearchDirs, validateAppleBuild } from '../cli/lib/xcode'; const resolve = (p: string): string => (p.startsWith('/') ? p : `/proj/${p}`); const t = { framework: 'native' as const, project: 'App.xcodeproj', scheme: 'App', notes: [] }; @@ -102,3 +102,18 @@ describe('leak scan', () => { rmSync(dir, { recursive: true, force: true }); }); }); + +describe('apple upload finds the last build', () => { + test('--out wins; else the last build out, then the config out', () => { + expect(uploadSearchDirs({ flagOut: '/o', lastOut: '/l', configOut: '/c' })).toEqual([join('/o', 'export')]); + expect(uploadSearchDirs({ lastOut: '/l', configOut: '/c' })).toEqual([join('/l', 'export'), join('/c', 'export')]); + expect(uploadSearchDirs({ lastOut: '/c', configOut: '/c' })).toEqual([join('/c', 'export')]); + }); + test('build records the IPA and out in .storebound, upload reads it back', () => { + const root = mkdtempSync(join(tmpdir(), 'lb-')); + expect(readLastBuild(root)).toBeNull(); + recordLastBuild(root, { ipa: '/shared/out/export/build-31/App.ipa', out: '/shared/out', version: '1.0', build: '31' }); + expect(readLastBuild(root)).toEqual({ ipa: '/shared/out/export/build-31/App.ipa', out: '/shared/out', version: '1.0', build: '31' }); + rmSync(root, { recursive: true, force: true }); + }); +}); From 28a50e7d2e3eba05a5226c14ad9c1bf4712336c5 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 27 Oct 2026 19:01:14 +0700 Subject: [PATCH 02/73] storebound 0.8.57: version in package.json and every copy, CHANGELOG 0.8.57 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 6ee0c76..b247852 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.56", + "version": "0.8.57", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index f1567c7..e9ef474 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.56", + "version": "0.8.57", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 70292c2..300ce52 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.56", + "version": "0.8.57", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index fa80824..6d65fcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.57 · 2026-10-27 + - `apple upload` finds the IPA of a build made with `--out`: `apple build` notes its IPA and out folder in `.storebound/last-apple-build.json`, and upload searches `--out` (new flag), then that last build's out, then `apple.build.out` / `build/ios`. When nothing is found, the error names every folder it searched and the last build's IPA. ## 0.8.56 · 2026-10-27 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index d48b786..428e5a1 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.56", + "version": "0.8.57", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index d3e271c..9e31a73 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.56" +version = "0.8.57" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index f7fc08f..6912486 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.56" +version = "0.8.57" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index d2bf6b8..04dc72a 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.56", + "version": "0.8.57", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 8c34180..2a9f249 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.56", + "version": "0.8.57", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index c30a69d..8c4bf4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.56", + "version": "0.8.57", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 5f73fcbcf4e36d33fcd779a8982d384475ddf17e Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 16:19:53 +0700 Subject: [PATCH 03/73] mcp --http: one Streamable HTTP server for every session (token or OAuth introspection auth, project argument per call, roots, origin check) --- cli/commands.ts | 2 +- cli/data/flags.json | 27 +++++- cli/mcp-cmd.ts | 13 +++ cli/mcp-http.ts | 214 +++++++++++++++++++++++++++++++++++++++++ tests/mcp-http.test.ts | 105 ++++++++++++++++++++ 5 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 cli/mcp-cmd.ts create mode 100644 cli/mcp-http.ts create mode 100644 tests/mcp-http.test.ts diff --git a/cli/commands.ts b/cli/commands.ts index 6e05b40..f644811 100644 --- a/cli/commands.ts +++ b/cli/commands.ts @@ -10,7 +10,7 @@ export const PLAIN: Record Promise, string]> = { 'init': [() => import('./init'), 'copy the templates (config, listing, copy, declarations, privacy policy) into this project; --profile app|game|subscription-app (default app)'], 'import': [() => import('./import'), 'fastlane [--dir fastlane] [--profile app|game|subscription-app] [--dry]: Appfile, deliver + supply metadata and screenshots -> config, store/*.md, shots frames (read-only on fastlane, never overwrites)'], 'install': [() => import('./install'), 'skills + MCP server for --agent claude|codex|cursor|copilot|windsurf|gemini|opencode'], - 'mcp': [async () => ({ run: async () => (await import('./mcp')).serve() }), 'stdio MCP server wrapping these commands (for any MCP-capable AI tool)'], + 'mcp': [() => import('./mcp-cmd'), 'MCP server wrapping these commands (for any MCP-capable AI tool): stdio, or --http [--port 7787] [--roots ] [--auth token|introspect] for one server every session shares'], 'watch': [() => import('./watch'), 'store events for every app on this machine: rejected, approved, live, rollout halted, crash threshold, low reviews; loops every --every 15m or --once; sinks --notify os|ntfy|telegram|webhook|ingest; test sends a test event; --dry, --dir , --json (read-only on the stores)'], 'status': [() => import('./status'), '[--app ] [--json]: per platform the live and next version, build, track, review state and rollout %, without uploading (read-only; read by ship pipelines, docs/ship-step.md)'], 'events': [() => import('./events'), '[--since 24h] [--app ] [--kind rejected] [--json]: the events watch recorded in ~/.storebound/events.jsonl (read-only)'], diff --git a/cli/data/flags.json b/cli/data/flags.json index 3a24466..d813c82 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -645,7 +645,21 @@ "to", "translate" ], - "mcp": [], + "mcp": [ + "allow-origin", + "allow-remote-token", + "auth", + "host", + "http", + "introspect-key-file", + "introspect-url", + "issuer", + "port", + "project", + "resource", + "roots", + "token-file" + ], "onboard": [ "accounts", "all", @@ -1159,7 +1173,9 @@ "allow-availability-changes", "allow-device-gap", "allow-existing", + "allow-origin", "allow-price-changes", + "allow-remote-token", "allow-ssh", "allow-stale-web", "allow-version-mismatch", @@ -1172,6 +1188,7 @@ "apps", "archive", "aso", + "auth", "base", "base-url", "beta", @@ -1243,6 +1260,8 @@ "headless", "home", "hook", + "host", + "http", "icon", "icons", "identity", @@ -1251,9 +1270,12 @@ "install", "internal", "internal-only", + "introspect-key-file", + "introspect-url", "invite", "ios", "issue", + "issuer", "issues", "jobs", "keep", @@ -1350,10 +1372,12 @@ "render", "repair-stuck", "resolve-iaps", + "resource", "result-file", "resume", "review-sent", "root", + "roots", "scan-paths", "scenes", "scheduled", @@ -1387,6 +1411,7 @@ "threshold", "timeout", "to", + "token-file", "top", "track", "tracking-domains", diff --git a/cli/mcp-cmd.ts b/cli/mcp-cmd.ts new file mode 100644 index 0000000..390dcb2 --- /dev/null +++ b/cli/mcp-cmd.ts @@ -0,0 +1,13 @@ +// `storebound mcp`: stdio by default (one process per agent session), or `--http` for one shared server +// (cli/mcp-http.ts: every session of the machine, or a team behind OAuth). +import type { parseArgs } from './lib/args'; + +export async function run(a: ReturnType): Promise { + if (!a.has('http')) return (await import('./mcp')).serve(); + const { serveHttp } = await import('./mcp-http'); + await serveHttp({ + host: a.get('host'), port: a.get('port'), roots: a.get('roots'), project: a.get('project'), allowOrigin: a.get('allow-origin'), + auth: a.get('auth'), tokenFile: a.get('token-file'), introspectUrl: a.get('introspect-url'), introspectKeyFile: a.get('introspect-key-file'), + resource: a.get('resource'), issuer: a.get('issuer'), allowRemoteToken: a.has('allow-remote-token'), + }); +} diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts new file mode 100644 index 0000000..0c30e08 --- /dev/null +++ b/cli/mcp-http.ts @@ -0,0 +1,214 @@ +// `storebound mcp --http`: the same MCP server over Streamable HTTP, so one process serves every agent session on a +// machine (or one host serves a whole team) instead of one stdio process per session. +// storebound mcp --http [--host 127.0.0.1] [--port 7787] [--roots ] [--project ] +// [--auth token|introspect] [--token-file ~/.storebound/mcp-token] +// [--introspect-url --introspect-key-file --resource --issuer ] +// Transport (https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http): one endpoint, +// /mcp. POST carries one JSON-RPC message and gets one JSON answer (202 for a notification); GET and DELETE are 405 +// (no server-initiated stream, no session state: every call is independent, so no Mcp-Session-Id is issued). The +// Origin header, when sent, must be a localhost origin unless --allow-origin names it (DNS rebinding). +// Project: every tool gets a `project` argument, the absolute path of the app folder the CLI runs in. It must be inside +// --roots (default: the home folder); --project (or STOREBOUND_PROJECT) is the default when a call has none. +// Auth (every request to /mcp): +// token (default): `Authorization: Bearer `, the token in --token-file (made with mode 600 on first start; +// never printed). Clients: claude mcp add --transport http storebound http://127.0.0.1:7787/mcp +// --header "Authorization: Bearer $(cat ~/.storebound/mcp-token)". +// introspect: an OAuth 2.0 bearer token checked at --introspect-url (RFC 7662; this server authenticates with the +// key in --introspect-key-file). The token must be active, carry the `mcp` scope and name --resource in aud +// (RFC 8707). Without a valid token: 401 with WWW-Authenticate: Bearer resource_metadata=".../.well-known/ +// oauth-protected-resource/mcp" (RFC 9728), which names --issuer as the authorization server. Answers are cached +// for 60 s per token (hashed); the token itself is never logged. +import { createHash, randomBytes } from 'node:crypto'; +import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'; +import { createServer, type IncomingMessage, type ServerResponse } from 'node:http'; +import { homedir } from 'node:os'; +import { dirname, isAbsolute, join, relative, resolve } from 'node:path'; +import pkg from '../package.json' with { type: 'json' }; +import { handle, LEGACY, PROTOCOL } from './mcp'; +import { runCommand } from './lib/runner'; + +export const DEFAULT_PORT = 7787; +const MAX_BODY = 4 * 1024 * 1024; + +export interface HttpOptions { + host: string; + port: number; + roots: string[]; + project: string | null; + allowOrigins: string[]; + auth: { kind: 'token'; token: string } | { kind: 'introspect'; url: string; key: string; resource: string; issuer: string }; +} + +export const PROJECT_PROP = { type: 'string', description: 'Absolute path of the app folder (the one with storebound.config.ts) to run in. Required unless the server was started with --project.' } as const; + +/** Inside one of the roots (path compare, case-insensitive on Windows); no "..", no other drive. */ +export function insideRoots(dir: string, roots: string[]): boolean { + const norm = (p: string) => (process.platform === 'win32' ? resolve(p).toLowerCase() : resolve(p)); + return roots.some(r => { const rel = relative(norm(r), norm(dir)); return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel)); }); +} + +/** The folder a call runs in, or the reason it cannot run. */ +export function projectFor(arg: unknown, o: Pick): { dir: string } | { error: string } { + if (arg === undefined || arg === null || arg === '') return o.project ? { dir: o.project } : { error: 'project: required (absolute path of the app folder)' }; + if (typeof arg !== 'string' || !isAbsolute(arg)) return { error: 'project: must be an absolute path' }; + if (!insideRoots(arg, o.roots)) return { error: `project: ${arg} is outside the server's roots (${o.roots.join(', ')})` }; + try { if (!statSync(arg).isDirectory()) return { error: `project: ${arg} is not a folder` }; } catch { return { error: `project: ${arg} does not exist` }; } + return { dir: resolve(arg) }; +} + +/** Localhost origins are always fine; others only when listed. No Origin header (non-browser clients) is fine. */ +export function originAllowed(origin: string | undefined, allow: string[]): boolean { + if (!origin) return true; + if (allow.includes(origin)) return true; + try { const u = new URL(origin); return ['localhost', '127.0.0.1', '[::1]'].includes(u.hostname); } catch { return false; } +} + +/** The protected resource metadata URL for a resource URL (RFC 9728 section 3: the path goes after the well-known part). */ +export function metadataUrl(resource: string): string { + const u = new URL(resource); + return `${u.origin}/.well-known/oauth-protected-resource${u.pathname === '/' ? '' : u.pathname}`; +} + +/** Introspection answer -> allowed? (active, `mcp` scope, our resource in aud). */ +export function introspectionOk(j: unknown, resource: string): boolean { + if (!j || typeof j !== 'object') return false; + const r = j as { active?: unknown; scope?: unknown; aud?: unknown }; + if (r.active !== true) return false; + const scopes = typeof r.scope === 'string' ? r.scope.split(/\s+/) : []; + if (!scopes.includes('mcp')) return false; + const aud = Array.isArray(r.aud) ? r.aud : typeof r.aud === 'string' ? [r.aud] : []; + return aud.includes(resource); +} + +const bearer = (req: IncomingMessage): string | null => { const h = req.headers.authorization ?? ''; const m = /^Bearer\s+(\S+)$/i.exec(h); return m ? m[1]! : null; }; + +const cache = new Map(); +async function authorized(req: IncomingMessage, o: HttpOptions): Promise { + const t = bearer(req); + if (!t) return false; + if (o.auth.kind === 'token') { + const a = createHash('sha256').update(t).digest(), b = createHash('sha256').update(o.auth.token).digest(); + return a.equals(b); + } + const key = createHash('sha256').update(t).digest('hex'); + const hit = cache.get(key); + if (hit && hit.until > Date.now()) return hit.ok; + let ok = false; + try { + const r = await fetch(o.auth.url, { method: 'POST', signal: AbortSignal.timeout(10_000), + headers: { authorization: `Bearer ${o.auth.key}`, 'content-type': 'application/x-www-form-urlencoded', accept: 'application/json' }, + body: new URLSearchParams({ token: t }).toString() }); + ok = r.ok && introspectionOk(await r.json(), o.auth.resource); + } catch { return false; } // no cache on a network error + cache.set(key, { ok, until: Date.now() + 60_000 }); + return ok; +} + +function send(res: ServerResponse, status: number, body?: unknown, headers: Record = {}): void { + res.writeHead(status, { 'cache-control': 'no-store', ...(body === undefined ? {} : { 'content-type': 'application/json' }), ...headers }); + res.end(body === undefined ? undefined : JSON.stringify(body)); +} + +async function readBody(req: IncomingMessage): Promise { + let size = 0; const parts: Buffer[] = []; + for await (const c of req) { size += (c as Buffer).length; if (size > MAX_BODY) return null; parts.push(c as Buffer); } + return Buffer.concat(parts).toString('utf8'); +} + +/** One POST body -> the answer (null for a notification). tools/list gains `project`; tools/call runs in it. */ +export async function answer(msg: Record, o: Pick, + run: (argv: string[], cwd: string) => Promise<{ code: number; out: string }> = runIn): Promise | null> { + const params = (msg.params ?? {}) as Record; + if (msg.method === 'tools/call') { + const args = { ...((params.arguments ?? {}) as Record) }; + const p = projectFor(args.project, o); + if ('error' in p) return { jsonrpc: '2.0', id: msg.id ?? null, result: { content: [{ type: 'text', text: `Invalid arguments: ${p.error}` }], isError: true } }; + delete args.project; + return handle({ ...msg, params: { ...params, arguments: args } } as never, argv => run(argv, p.dir)); + } + const r = await handle(msg as never); + if (msg.method === 'tools/list' && r && typeof r.result === 'object') { + const tools = (r.result as { tools?: { inputSchema: { properties: Record; required?: string[] } }[] }).tools ?? []; + for (const t of tools) { + t.inputSchema.properties = { project: PROJECT_PROP, ...t.inputSchema.properties }; + if (!o.project) t.inputSchema.required = ['project', ...(t.inputSchema.required ?? [])]; + } + } + return r; +} + +async function runIn(argv: string[], cwd: string): Promise<{ code: number; out: string }> { + const r = runCommand(argv, { cwd, env: { STOREBOUND_MCP: '1' } }); + const { code, out } = await r.result; + return { code, out }; +} + +export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: number }> { + const resourceMeta = o.auth.kind === 'introspect' ? metadataUrl(o.auth.resource) : null; + const server = createServer(async (req, res) => { + const path = (req.url ?? '/').split('?')[0]; + if (resourceMeta && o.auth.kind === 'introspect' && req.method === 'GET' && path === new URL(resourceMeta).pathname) + return send(res, 200, { resource: o.auth.resource, authorization_servers: [o.auth.issuer], bearer_methods_supported: ['header'], scopes_supported: ['mcp'], resource_name: 'storebound' }); + if (path === '/health' && req.method === 'GET') return send(res, 200, { ok: true, version: pkg.version }); + if (path !== '/mcp') return send(res, 404, { error: 'not found' }); + if (!originAllowed(req.headers.origin, o.allowOrigins)) return send(res, 403, { error: 'origin not allowed' }); + if (!(await authorized(req, o))) + return send(res, 401, { error: 'unauthorized' }, { 'www-authenticate': resourceMeta ? `Bearer resource_metadata="${resourceMeta}"` : 'Bearer' }); + if (req.method !== 'POST') return send(res, 405, { error: 'POST only (no server-initiated stream)' }, { allow: 'POST' }); + const body = await readBody(req); + if (body === null) return send(res, 413, { error: 'body too large' }); + let msg: unknown; + try { msg = JSON.parse(body); } catch { return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } }); } + if (Array.isArray(msg) || typeof msg !== 'object' || msg === null) return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32600, message: 'One JSON-RPC message per request' } }); + try { + const r = await answer(msg as Record, o); + return r ? send(res, 200, r) : send(res, 202); + } catch (e) { return send(res, 500, { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }); } + }); + return new Promise((ok, fail) => { + server.once('error', fail); + server.listen(o.port, o.host, () => { + const a = server.address(); const port = typeof a === 'object' && a ? a.port : o.port; + ok({ close: () => server.close(), port }); + }); + }); +} + +/** The local bearer token: read, or made (32 random bytes, hex, mode 600) on first start. */ +export function tokenFrom(file: string): string { + if (existsSync(file)) { const t = readFileSync(file, 'utf8').trim(); if (t.length >= 32) return t; } + mkdirSync(dirname(file), { recursive: true }); + const t = randomBytes(32).toString('hex'); + writeFileSync(file, `${t}\n`, { mode: 0o600 }); + try { chmodSync(file, 0o600); } catch { /* Windows */ } + return t; +} + +const home = (p: string) => (p.startsWith('~') ? join(homedir(), p.slice(1)) : p); + +export interface HttpFlags { host?: string; port?: string; roots?: string; project?: string; allowOrigin?: string; auth?: string; tokenFile?: string; + introspectUrl?: string; introspectKeyFile?: string; resource?: string; issuer?: string; allowRemoteToken?: boolean } + +export async function serveHttp(f: HttpFlags): Promise { + const host = f.host ?? '127.0.0.1'; + const port = Number(f.port ?? DEFAULT_PORT); + const roots = (f.roots ?? homedir()).split(',').map(s => resolve(home(s.trim()))).filter(Boolean); + const projectArg = f.project ?? process.env.STOREBOUND_PROJECT; + const project = projectArg ? resolve(home(projectArg)) : null; + const allowOrigins = (f.allowOrigin ?? '').split(',').map(s => s.trim()).filter(Boolean); + const kind = f.auth ?? 'token'; + let auth: HttpOptions['auth']; + if (kind === 'introspect') { + const { introspectUrl: url, introspectKeyFile: keyFile, resource, issuer } = f; + if (!url || !keyFile || !resource || !issuer) throw new Error('--auth introspect needs --introspect-url, --introspect-key-file, --resource and --issuer'); + auth = { kind, url, key: readFileSync(home(keyFile), 'utf8').trim(), resource, issuer }; + } else if (kind === 'token') { + const file = home(f.tokenFile ?? '~/.storebound/mcp-token'); + auth = { kind, token: tokenFrom(file) }; + console.error(`[storebound mcp] bearer token in ${file}`); + } else throw new Error('--auth token | introspect'); + if (!['127.0.0.1', 'localhost', '::1'].includes(host) && kind === 'token' && !f.allowRemoteToken) + throw new Error(`--host ${host} listens beyond this machine: use --auth introspect (or --allow-remote-token behind your own TLS proxy)`); + const s = await startHttp({ host, port, roots, project, allowOrigins, auth }); + console.error(`[storebound mcp] ${pkg.version} on http://${host}:${s.port}/mcp (MCP ${PROTOCOL}, legacy ${LEGACY.join(', ')}), auth ${kind}, roots ${roots.join(', ')}${project ? `, default project ${project}` : ''}`); +} diff --git a/tests/mcp-http.test.ts b/tests/mcp-http.test.ts new file mode 100644 index 0000000..af1f031 --- /dev/null +++ b/tests/mcp-http.test.ts @@ -0,0 +1,105 @@ +import { afterAll, describe, expect, test } from 'bun:test'; +import { mkdtempSync, rmSync, statSync } from 'node:fs'; +import { createServer } from 'node:http'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { answer, insideRoots, introspectionOk, metadataUrl, originAllowed, projectFor, startHttp, tokenFrom } from '../cli/mcp-http'; + +const root = mkdtempSync(join(tmpdir(), 'mcph-')); +const app = mkdtempSync(join(root, 'app-')); +afterAll(() => rmSync(root, { recursive: true, force: true })); + +describe('pure parts', () => { + test('roots and project', () => { + expect(insideRoots(app, [root])).toBe(true); + expect(insideRoots(join(root, '..'), [root])).toBe(false); + expect(projectFor(undefined, { roots: [root], project: null })).toEqual({ error: 'project: required (absolute path of the app folder)' }); + expect(projectFor(undefined, { roots: [root], project: app })).toEqual({ dir: app }); + expect(projectFor('rel/dir', { roots: [root], project: null })).toEqual({ error: 'project: must be an absolute path' }); + expect('error' in projectFor(tmpdir(), { roots: [root], project: null })).toBe(true); + expect('error' in projectFor(join(root, 'missing'), { roots: [root], project: null })).toBe(true); + expect(projectFor(app, { roots: [root], project: null })).toEqual({ dir: app }); + }); + test('origin, metadata url, introspection', () => { + expect(originAllowed(undefined, [])).toBe(true); + expect(originAllowed('http://localhost:3000', [])).toBe(true); + expect(originAllowed('https://evil.example.com', [])).toBe(false); + expect(originAllowed('https://app.example.com', ['https://app.example.com'])).toBe(true); + expect(metadataUrl('https://sb.example.com/mcp')).toBe('https://sb.example.com/.well-known/oauth-protected-resource/mcp'); + const r = 'https://sb.example.com/mcp'; + expect(introspectionOk({ active: true, scope: 'mcp apps:read', aud: [r] }, r)).toBe(true); + expect(introspectionOk({ active: true, scope: 'apps:read', aud: [r] }, r)).toBe(false); + expect(introspectionOk({ active: true, scope: 'mcp', aud: ['https://other.example.com/mcp'] }, r)).toBe(false); + expect(introspectionOk({ active: false }, r)).toBe(false); + }); + test('token file is made once, mode 600 off Windows', () => { + const f = join(root, 'tok', 'mcp-token'); + const t = tokenFrom(f); + expect(t).toMatch(/^[0-9a-f]{64}$/); + expect(tokenFrom(f)).toBe(t); + if (process.platform !== 'win32') expect(statSync(f).mode & 0o777).toBe(0o600); + }); + test('tools/list gains a required project; tools/call runs in it and drops it from the arguments', async () => { + const list = await answer({ jsonrpc: '2.0', id: 1, method: 'tools/list', params: {} }, { roots: [root], project: null }); + const check = ((list!.result as { tools: { name: string; inputSchema: { properties: Record; required?: string[] } }[] }).tools).find(t => t.name === 'check')!; + expect(check.inputSchema.properties.project).toBeDefined(); + expect(check.inputSchema.required).toContain('project'); + let seen = null as { argv: string[]; cwd: string } | null; + const r = await answer({ jsonrpc: '2.0', id: 2, method: 'tools/call', params: { name: 'check', arguments: { project: app } } }, { roots: [root], project: null }, + async (argv, cwd) => { seen = { argv, cwd }; return { code: 0, out: 'ok' }; }); + expect(seen).toEqual({ argv: ['check'], cwd: app }); + expect((r!.result as { isError: boolean }).isError).toBe(false); + const bad = await answer({ jsonrpc: '2.0', id: 3, method: 'tools/call', params: { name: 'check', arguments: {} } }, { roots: [root], project: null }, async () => { throw new Error('must not run'); }); + expect((bad!.result as { isError: boolean }).isError).toBe(true); + }); +}); + +describe('http server', () => { + const post = (port: number, body: unknown, headers: Record = {}) => + fetch(`http://127.0.0.1:${port}/mcp`, { method: 'POST', headers: { 'content-type': 'application/json', accept: 'application/json, text/event-stream', ...headers }, body: JSON.stringify(body) }); + + test('token auth: 401 without, initialize with, 202 for a notification, 405 for GET, 403 for a foreign origin', async () => { + const s = await startHttp({ host: '127.0.0.1', port: 0, roots: [root], project: null, allowOrigins: [], auth: { kind: 'token', token: 'a'.repeat(64) } }); + try { + const auth = { authorization: `Bearer ${'a'.repeat(64)}` }; + expect((await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' })).status).toBe(401); + expect((await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, { authorization: 'Bearer nope' })).status).toBe(401); + const init = await post(s.port, { jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 't', version: '1' } } }, auth); + expect(init.status).toBe(200); + expect(((await init.json()) as { result: { protocolVersion: string } }).result.protocolVersion).toBe('2025-06-18'); + expect((await post(s.port, { jsonrpc: '2.0', method: 'notifications/initialized' }, auth)).status).toBe(202); + expect((await fetch(`http://127.0.0.1:${s.port}/mcp`, { headers: auth })).status).toBe(405); + expect((await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, { ...auth, origin: 'https://evil.example.com' })).status).toBe(403); + expect((await post(s.port, [{ jsonrpc: '2.0', id: 1, method: 'ping' }], auth)).status).toBe(400); + } finally { s.close(); } + }); + + test('introspect auth: metadata document, 401 names it, a valid token passes, a token without mcp scope does not', async () => { + const resource = 'https://sb.example.com/mcp'; + let calls = 0; + const idp = createServer((req, res) => { + calls++; + let b = ''; req.on('data', c => (b += c)); req.on('end', () => { + const tok = new URLSearchParams(b).get('token'); + const ok = req.headers.authorization === 'Bearer server-key'; + res.setHeader('content-type', 'application/json'); + res.end(JSON.stringify(!ok ? { active: false } : tok === 'good' ? { active: true, scope: 'mcp', aud: [resource] } : tok === 'noscope' ? { active: true, scope: 'apps', aud: [resource] } : { active: false })); + }); + }); + await new Promise(r => idp.listen(0, '127.0.0.1', () => r())); + const ip = (idp.address() as { port: number }).port; + const s = await startHttp({ host: '127.0.0.1', port: 0, roots: [root], project: app, allowOrigins: [], + auth: { kind: 'introspect', url: `http://127.0.0.1:${ip}/introspect`, key: 'server-key', resource, issuer: 'https://idp.example.com' } }); + try { + const meta = await fetch(`http://127.0.0.1:${s.port}/.well-known/oauth-protected-resource/mcp`); + expect(await meta.json()).toMatchObject({ resource, authorization_servers: ['https://idp.example.com'], scopes_supported: ['mcp'] }); + const no = await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }); + expect(no.status).toBe(401); + expect(no.headers.get('www-authenticate')).toBe('Bearer resource_metadata="https://sb.example.com/.well-known/oauth-protected-resource/mcp"'); + expect((await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, { authorization: 'Bearer good' })).status).toBe(200); + expect((await post(s.port, { jsonrpc: '2.0', id: 2, method: 'ping' }, { authorization: 'Bearer good' })).status).toBe(200); + expect(calls).toBe(1); // cached + expect((await post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, { authorization: 'Bearer noscope' })).status).toBe(401); + } finally { s.close(); idp.close(); } + }); +}); From 806899391718c912a8e6739efa49fecb9589d393 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 16:21:50 +0700 Subject: [PATCH 04/73] docs: mcp --http (shared server, project argument, token and introspection auth) --- CHANGELOG.md | 2 ++ docs/mcp.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d65fcd..c0fea25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- `storebound mcp --http`: one Streamable HTTP MCP server that every agent session of a machine shares (no process per session). Each tool gets a `project` argument (absolute path inside `--roots`); auth is a local bearer token (`~/.storebound/mcp-token`, made on first start) or, for a server behind TLS, OAuth bearer tokens checked by introspection (RFC 7662) with protected resource metadata (RFC 9728). docs/mcp.md. + ## 0.8.57 · 2026-10-27 - `apple upload` finds the IPA of a build made with `--out`: `apple build` notes its IPA and out folder in `.storebound/last-apple-build.json`, and upload searches `--out` (new flag), then that last build's out, then `apple.build.out` / `build/ios`. When nothing is found, the error names every folder it searched and the last build's IPA. diff --git a/docs/mcp.md b/docs/mcp.md index 0e8b66c..efe9cb4 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -24,6 +24,34 @@ per-request `_meta`, `resultType`, cacheable `tools/list`) and, on the same proc Manual config for a tool that `install` does not know: command `bunx` with args `["storebound", "mcp"]` (or the absolute path of `bin/storebound` plus `mcp`). +## One shared server over HTTP + +`storebound mcp --http` serves the same tools over Streamable HTTP (MCP 2025-06-18 and later) at `/mcp`, so every +agent session of a machine shares one process instead of starting its own. POST carries one JSON-RPC message and gets +one JSON answer; there is no server-initiated stream and no session state. A browser Origin other than localhost is +refused unless `--allow-origin` names it. + +- Every tool gets a `project` argument: the absolute path of the app folder to run in. It must be inside `--roots` + (comma-separated, default the home folder). `--project ` sets a default for calls without one. +- `--auth token` (default): the server makes `~/.storebound/mcp-token` (mode 600) on first start and requires it as a + bearer token. Only localhost hosts are allowed with it. + + ```bash + storebound mcp --http --port 7787 + claude mcp add --transport http storebound http://127.0.0.1:7787/mcp --header "Authorization: Bearer $(cat ~/.storebound/mcp-token)" + ``` +- `--auth introspect`: for a server shared over the network behind TLS. Bearer tokens are OAuth 2.0 access tokens from + your authorization server, checked through its introspection endpoint (RFC 7662; this server authenticates with the + key in `--introspect-key-file`). A token must be active, carry the `mcp` scope and list `--resource` in `aud` + (RFC 8707). Without one the answer is 401 with `WWW-Authenticate: Bearer resource_metadata=...`, and + `/.well-known/oauth-protected-resource/mcp` names `--issuer` (RFC 9728). + + ```bash + storebound mcp --http --host 0.0.0.0 --auth introspect --introspect-url https://auth.example.com/introspect \ + --introspect-key-file ~/.storebound/introspect.key --resource https://mcp.example.com/mcp --issuer https://auth.example.com + ``` +- `/health` answers `{ ok, version }` without auth. + ## Desktop machine interface `storebound serve --stdio` is what the desktop app (`apps/desktop`, in progress) runs as its sidecar: newline-delimited From f2d7beb7cef2f030e59859f271b8c717a8540d36 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 16:31:41 +0700 Subject: [PATCH 05/73] mcp --http: no request timeout (tool calls can run for many minutes) --- cli/mcp-http.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 0c30e08..1fe8c03 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -165,6 +165,9 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu return r ? send(res, 200, r) : send(res, 202); } catch (e) { return send(res, 500, { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }); } }); + // a tool call can run for many minutes (check on a big project, uploads): Node's 300 s request timeout would cut it + server.requestTimeout = 0; + server.timeout = 0; return new Promise((ok, fail) => { server.once('error', fail); server.listen(o.port, o.host, () => { From 164ba390ddd9a4dc98c15aa543d328d9ec4e783a Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 17:29:28 +0700 Subject: [PATCH 06/73] check / scan: project walks skip dot folders, worktrees and git-ignored output, no stat per entry (244 s -> 46 s on a big game repo) --- CHANGELOG.md | 1 + cli/lib/node-packages.ts | 12 +++++++----- cli/lib/privacy-files.ts | 22 +++++++++++---------- cli/lib/scan/project.ts | 30 ++++++++++++++-------------- cli/lib/walk-skip.ts | 42 ++++++++++++++++++++++++++++++++++++++++ tests/walk-skip.test.ts | 29 +++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 30 deletions(-) create mode 100644 cli/lib/walk-skip.ts create mode 100644 tests/walk-skip.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index c0fea25..cd423a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `check` and `scan` are fast on big repos: project walks skip dot folders (tool state, worktree copies), linked git worktrees and the folders git ignores (Pods, Carthage, SourcePackages and ios / android stay in), and read entry types from the listing instead of a stat per file. A game repo with worktree copies went from 244 s to 46 s for `check`. - `storebound mcp --http`: one Streamable HTTP MCP server that every agent session of a machine shares (no process per session). Each tool gets a `project` argument (absolute path inside `--roots`); auth is a local bearer token (`~/.storebound/mcp-token`, made on first start) or, for a server behind TLS, OAuth bearer tokens checked by introspection (RFC 7662) with protected resource metadata (RFC 9728). docs/mcp.md. ## 0.8.57 · 2026-10-27 diff --git a/cli/lib/node-packages.ts b/cli/lib/node-packages.ts index ac44c79..ba58bb9 100644 --- a/cli/lib/node-packages.ts +++ b/cli/lib/node-packages.ts @@ -3,8 +3,9 @@ // folders (package.json "workspaces", npm / yarn / pnpm-style array or { packages }, as Bun reads them) and local // SwiftPM packages (`.package(path:)` in a Package.swift, e.g. Capacitor 8's CapApp-SPM). Used by `privacy-manifest` // and `scan`. Read-only; never throws. -import { existsSync, readdirSync, readFileSync, realpathSync, statSync } from 'node:fs'; +import { type Dirent, existsSync, readdirSync, readFileSync, realpathSync, statSync } from 'node:fs'; import { dirname, join, resolve } from 'node:path'; +import { skipDir } from './walk-skip'; interface PkgJson { name?: string; dependencies?: Record; workspaces?: string[] | { packages?: string[] } } const readJson = (p: string): PkgJson | null => { try { return JSON.parse(readFileSync(p, 'utf8')) as PkgJson; } catch { return null; } }; @@ -67,9 +68,10 @@ export function localSwiftPackages(dir: string): string[] { const skip = new Set(['Pods', 'build', 'DerivedData', 'node_modules', '.build', 'SourcePackages', '.git', 'xcuserdata']); const walk = (d: string, depth: number) => { if (depth > 4) return; - let names: string[] = []; - try { names = readdirSync(d); } catch { return; } - for (const n of names) { + let ents: Dirent[] = []; + try { ents = readdirSync(d, { withFileTypes: true }); } catch { return; } + for (const e of ents) { + const n = e.name; if (skip.has(n)) continue; const p = join(d, n); if (n === 'Package.swift') { @@ -79,7 +81,7 @@ export function localSwiftPackages(dir: string): string[] { const target = resolve(d, m[1]!); if (isDir(target)) out.push(target); } - } else if (isDir(p) && !/\.(xc)?framework$|\.xcassets$/.test(n)) walk(p, depth + 1); + } else if ((e.isDirectory() || (e.isSymbolicLink() && isDir(p))) && !/\.(xc)?framework$|\.xcassets$/.test(n) && !skipDir(dir, p, n)) walk(p, depth + 1); } }; walk(dir, 0); diff --git a/cli/lib/privacy-files.ts b/cli/lib/privacy-files.ts index 779b942..94a3450 100644 --- a/cli/lib/privacy-files.ts +++ b/cli/lib/privacy-files.ts @@ -2,9 +2,10 @@ // .xcframework, SwiftPM checkouts, Capacitor / Cordova / React Native plugins in node_modules, a built .app's // Frameworks and bundles) and every PrivacyInfo.xcprivacy inside an .ipa or .app (XML or binary). Read-only; the // directory walk is bounded. -import { readdirSync, readFileSync, statSync } from 'node:fs'; +import { type Dirent, readdirSync, readFileSync, statSync } from 'node:fs'; import { basename, join, relative, sep } from 'node:path'; import { nativeIosPlugins } from './node-packages'; +import { skipDir } from './walk-skip'; import { parseBinaryPlist } from './plist'; import { type Manifest, manifestFromPlist, parseManifest, trackingIssue } from './privacy-manifest'; import { zipEntries, zipRead } from './zip'; @@ -63,15 +64,16 @@ export function bundleTrackingIssues(list: BundleManifest[]): string[] { function walk(dir: string, visit: (p: string, isDir: boolean) => boolean | void, depth = 0, budget = { n: 60_000 }): void { if (depth > 16 || budget.n <= 0) return; - let names: string[] = []; - try { names = readdirSync(dir).sort(); } catch { return; } - for (const n of names) { + let ents: Dirent[] = []; + try { ents = readdirSync(dir, { withFileTypes: true }).sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)); } catch { return; } + for (const e of ents) { if (--budget.n <= 0) return; - const p = join(dir, n); - let st; - try { st = statSync(p); } catch { continue; } - const descend = visit(p, st.isDirectory()); - if (st.isDirectory() && descend !== false) walk(p, visit, depth + 1, budget); + const p = join(dir, e.name); + // the entry type comes with the listing (no stat per file: a stat each made a big tree take minutes on Windows) + let isDir = e.isDirectory(); + if (e.isSymbolicLink()) { try { isDir = statSync(p).isDirectory(); } catch { continue; } } + const descend = visit(p, isDir); + if (isDir && descend !== false) walk(p, visit, depth + 1, budget); } } @@ -102,7 +104,7 @@ export function projectSdkManifests(root: string): SdkManifest[] { try { out.push({ sdk, manifest: manifestFromBytes(relative(root, abs).split(sep).join('/'), readFileSync(abs)) }); } catch { /* unreadable */ } }; walk(root, (p, isDir) => { - if (isDir) return !SKIP.has(basename(p)); + if (isDir) return !SKIP.has(basename(p)) && !skipDir(root, p, basename(p)); if (basename(p) !== 'PrivacyInfo.xcprivacy') return; const sdk = sdkOfProjectPath(relative(root, p).split(sep).join('/')); if (sdk) add(p, sdk); diff --git a/cli/lib/scan/project.ts b/cli/lib/scan/project.ts index f0b8f8b..01dc57a 100644 --- a/cli/lib/scan/project.ts +++ b/cli/lib/scan/project.ts @@ -3,9 +3,10 @@ // Xcode INFOPLIST_KEY_* build settings, Expo app.json, Unity ProjectSettings and Godot export presets), entitlements, // privacy manifests, the Android manifest (permissions, services, target SDK) and the app's own source files. // Tolerant on purpose: an unreadable or odd file is skipped, never an exception. -import { readdirSync, readFileSync, statSync } from 'node:fs'; +import { type Dirent, readdirSync, readFileSync, statSync } from 'node:fs'; import { basename, dirname, extname, join, relative, sep } from 'node:path'; import { resolvePackage } from '../node-packages'; +import { skipDir } from '../walk-skip'; import { isBuildCopyPath, type Manifest, parseManifest } from '../privacy-manifest'; import { type DepRef, type Eco, matchesSdk, SDKS, type SdkDef } from './sdks'; import { exportedIpas, ipaInfo } from '../xcode'; @@ -104,33 +105,32 @@ const SRC_EXT = new Set(['.swift', '.m', '.mm', '.h', '.kt', '.java', '.dart', ' const MAX_FILES = 25_000; const MAX_TEXT = 1_500_000; -/** A linked git worktree: its .git is a file pointing into /.git/worktrees/ (a submodule's points into modules/). */ -function isWorktree(dir: string): boolean { - try { return /^gitdir:.*[\\/]worktrees[\\/]/m.test(readFileSync(join(dir, '.git'), 'utf8')); } catch { return false; } -} - /** Every file under root (relative paths), skipping build output, dependency folders and VCS data. Native libraries * (.so) of any size also go into `bins` when given (they are not read, only listed). */ export function listFiles(root: string, bins?: string[]): string[] { const out: string[] = []; const walk = (dir: string, depth: number) => { if (depth > 14 || out.length >= MAX_FILES) return; - let names: string[]; - try { names = readdirSync(dir); } catch { return; } - for (const n of names.sort()) { + let ents: Dirent[]; + try { ents = readdirSync(dir, { withFileTypes: true }); } catch { return; } + for (const e of ents.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))) { + const n = e.name; if (SKIP_DIRS.has(n) || n === '.DS_Store') continue; const p = join(dir, n); - let st; - try { st = statSync(p); } catch { continue; } - if (st.isDirectory()) { + // the entry type comes with the listing; only files (for their size) and links get a stat + let isDir = e.isDirectory(); + if (e.isSymbolicLink()) { try { isDir = statSync(p).isDirectory(); } catch { continue; } } + if (isDir) { // compiled frameworks are SDK binaries, not app code if (/\.(xc)?framework$|\.xcassets$|\.bundle$|\.app$|\.dSYM$/.test(n)) continue; - // a git worktree inside the project (another checkout of the same repo; submodules stay in) - if (isWorktree(p)) continue; + // dot folders, git worktrees (other checkouts of the same repo; submodules stay in), git-ignored output + if (skipDir(root, p, n)) continue; walk(p, depth + 1); } else { if (bins && n.endsWith('.so')) bins.push(relative(root, p).split(sep).join('/')); - if (st.size <= MAX_TEXT) out.push(relative(root, p).split(sep).join('/')); + let size = 0; + try { size = statSync(p).size; } catch { continue; } + if (size <= MAX_TEXT) out.push(relative(root, p).split(sep).join('/')); } if (out.length >= MAX_FILES) return; } diff --git a/cli/lib/walk-skip.ts b/cli/lib/walk-skip.ts new file mode 100644 index 0000000..2015fb9 --- /dev/null +++ b/cli/lib/walk-skip.ts @@ -0,0 +1,42 @@ +// Which folders a project walk (scan, check's privacy manifests) leaves out, beyond each walker's own name list: +// - dot folders below the root (.harness-worktrees, .wt-head, .ota-out, .native-build, ...): tool state, caches and +// whole copies of the repo, never app sources; +// - linked git worktrees (another checkout of the same repo); +// - folders git ignores at the root (release-out/, artifacts/, ...), asked once per root with +// `git ls-files --others --ignored --exclude-standard --directory`; SDK folders the privacy checks read (Pods, +// Carthage, SourcePackages) and generated native projects (ios, android) stay in even when ignored. +// Seen live: a game repo with several worktrees and release folders made `check` walk ~60 000 files for 2.5 minutes. +import { readFileSync } from 'node:fs'; +import { join, relative, resolve, sep } from 'node:path'; +import * as rt from './rt'; + +// kept even when git ignores them: SDK folders the privacy checks read, and generated native projects (Expo prebuild) +const KEEP = new Set(['Pods', 'Carthage', 'SourcePackages', 'ios', 'android', 'macos']); +const cache = new Map>(); + +/** A linked git worktree: its .git is a file pointing into /.git/worktrees/ (a submodule's points into modules/). */ +export function isWorktree(dir: string): boolean { + try { return /^gitdir:.*[\\/]worktrees[\\/]/m.test(readFileSync(join(dir, '.git'), 'utf8')); } catch { return false; } +} + +/** Root-relative folders (with "/" separators, no trailing slash) git ignores in this repo; empty outside git. */ +export function gitIgnoredDirs(root: string): Set { + const key = resolve(root); + const hit = cache.get(key); + if (hit) return hit; + const out = new Set(); + try { + const r = rt.spawnSync(['git', 'ls-files', '--others', '--ignored', '--exclude-standard', '--directory', '-z'], { cwd: key, timeout: 15_000 }); + if (r.success) for (const p of r.stdout.toString('utf8').split('\0')) if (p.endsWith('/')) out.add(p.slice(0, -1)); + } catch { /* no git */ } + cache.set(key, out); + return out; +} + +/** Leave this folder out of a walk that started at root? */ +export function skipDir(root: string, abs: string, name: string): boolean { + if (KEEP.has(name)) return false; + if (name.startsWith('.') && resolve(abs) !== resolve(root)) return true; + if (gitIgnoredDirs(root).has(relative(root, abs).split(sep).join('/'))) return true; + return isWorktree(abs); +} diff --git a/tests/walk-skip.test.ts b/tests/walk-skip.test.ts new file mode 100644 index 0000000..0dea615 --- /dev/null +++ b/tests/walk-skip.test.ts @@ -0,0 +1,29 @@ +import { afterAll, expect, test } from 'bun:test'; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { projectSdkManifests } from '../cli/lib/privacy-files'; +import { listFiles } from '../cli/lib/scan/project'; +import { skipDir } from '../cli/lib/walk-skip'; + +const root = mkdtempSync(join(tmpdir(), 'walk-')); +afterAll(() => rmSync(root, { recursive: true, force: true })); +const put = (rel: string, text = 'x') => { mkdirSync(join(root, rel, '..'), { recursive: true }); writeFileSync(join(root, rel), text); }; + +test('dot folders, linked worktrees and SDK folders', () => { + put('.harness-worktrees/a/src/App.swift'); + put('wt/.git', 'gitdir: /repo/.git/worktrees/wt\n'); + put('wt/src/App.swift'); + put('src/App.swift'); + put('ios/Pods/Some/PrivacyInfo.xcprivacy', ''); + expect(skipDir(root, join(root, '.harness-worktrees'), '.harness-worktrees')).toBe(true); + expect(skipDir(root, join(root, 'wt'), 'wt')).toBe(true); + expect(skipDir(root, join(root, 'src'), 'src')).toBe(false); + expect(skipDir(root, join(root, 'ios', 'Pods'), 'Pods')).toBe(false); + const files = listFiles(root); + expect(files).toContain('src/App.swift'); + expect(files.some(f => f.startsWith('.harness-worktrees/') || f.startsWith('wt/'))).toBe(false); + // worktree copies would add their SDK manifests a second time + put('.wt-head/ios/Pods/Some/PrivacyInfo.xcprivacy', ''); + expect(projectSdkManifests(root).map(m => m.manifest.path)).toEqual(['ios/Pods/Some/PrivacyInfo.xcprivacy']); +}); From a108aae53f92292539d0ba0add64533bd1300ff2 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 18:38:11 +0700 Subject: [PATCH 07/73] mcp --http: --broker-profiles (store keys from the broker vault, memory only), --read-only, project by folder name under the roots --- cli/data/flags.json | 4 ++++ cli/lib/broker.ts | 32 +++++++++++++++++++++++++++ cli/mcp-cmd.ts | 1 + cli/mcp-http.ts | 49 +++++++++++++++++++++++++++++++++++------- docs/mcp.md | 6 ++++++ tests/mcp-http.test.ts | 39 +++++++++++++++++++++++++++++++-- 6 files changed, 121 insertions(+), 10 deletions(-) diff --git a/cli/data/flags.json b/cli/data/flags.json index d813c82..0879954 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -649,6 +649,7 @@ "allow-origin", "allow-remote-token", "auth", + "broker-profiles", "host", "http", "introspect-key-file", @@ -656,6 +657,7 @@ "issuer", "port", "project", + "read-only", "resource", "roots", "token-file" @@ -1194,6 +1196,7 @@ "beta", "bid", "body", + "broker-profiles", "build", "build-number", "bundle-id", @@ -1363,6 +1366,7 @@ "q", "rating", "react-native", + "read-only", "reconvert", "refresh-profile", "region", diff --git a/cli/lib/broker.ts b/cli/lib/broker.ts index 41e171b..fb8f3b5 100644 --- a/cli/lib/broker.ts +++ b/cli/lib/broker.ts @@ -325,3 +325,35 @@ export async function playPreflight(command: string, root: string, pkg: string | if (o.dry) { for (const g of gaps) o.warn(`${g.message}. Fix: ${g.fix}`); return gaps; } throw new Error(`${command} stopped before any call to Google Play:\n${gapsText(gaps)}`); } + +export type StoreKind = 'asc-api-key' | 'play-service-account'; + +/** + * A store credential of one profile from the broker's vault (GET /api/store-credentials//, a key with + * the store-credentials scope): { secret, metadata }. For a long-running server (`mcp --http --broker-profiles`) that + * keeps no key files; null when the broker has none for that profile. Never logged. + */ +export async function brokerStoreCredential(cfg: BrokerConfig, profile: string, kind: StoreKind): Promise<{ secret: string; metadata: Record } | null> { + const a = await request(cfg, 'GET', `/api/store-credentials/${encodeURIComponent(profile)}/${kind}`); + if (a.status === 404) return null; + if (a.status === 401 || a.status === 403) throw new BrokerRefused(`credential broker ${host(cfg)} refused store credentials for ${profile} (${a.status} ${errOf(a)}): the key needs the store-credentials scope and the profile`, a.status); + const j = a.json as { secret?: unknown; metadata?: unknown } | null; + if (a.status !== 200 || !j || typeof j.secret !== 'string') throw new BrokerUnavailable(`credential broker ${host(cfg)} -> ${a.status} for ${profile}/${kind}`); + return { secret: j.secret, metadata: j.metadata && typeof j.metadata === 'object' ? (j.metadata as Record) : {} }; +} + +/** The env a child process needs to use these profiles from the broker (STOREBOUND_PROFILE__, inline PEM / + * JSON; see credentials.ts). Profiles the broker has nothing for are left out. */ +export async function brokerProfileEnv(cfg: BrokerConfig, profiles: string[]): Promise> { + const env: Record = {}; + const name = (p: string, k: string) => `STOREBOUND_PROFILE_${p.toUpperCase().replace(/[^A-Z0-9]/g, '_')}_${k}`; + await Promise.all(profiles.map(async p => { + const [asc, play] = await Promise.all([brokerStoreCredential(cfg, p, 'asc-api-key'), brokerStoreCredential(cfg, p, 'play-service-account')]); + if (asc) { + const { issuerId, keyId } = asc.metadata; + if (typeof issuerId === 'string' && typeof keyId === 'string') Object.assign(env, { [name(p, 'ASC_P8')]: asc.secret, [name(p, 'ASC_KEY_ID')]: keyId, [name(p, 'ASC_ISSUER_ID')]: issuerId }); + } + if (play) env[name(p, 'PLAY_SERVICE_ACCOUNT')] = play.secret; + })); + return env; +} diff --git a/cli/mcp-cmd.ts b/cli/mcp-cmd.ts index 390dcb2..e16bc25 100644 --- a/cli/mcp-cmd.ts +++ b/cli/mcp-cmd.ts @@ -9,5 +9,6 @@ export async function run(a: ReturnType): Promise { host: a.get('host'), port: a.get('port'), roots: a.get('roots'), project: a.get('project'), allowOrigin: a.get('allow-origin'), auth: a.get('auth'), tokenFile: a.get('token-file'), introspectUrl: a.get('introspect-url'), introspectKeyFile: a.get('introspect-key-file'), resource: a.get('resource'), issuer: a.get('issuer'), allowRemoteToken: a.has('allow-remote-token'), + brokerProfiles: a.get('broker-profiles'), readOnly: a.has('read-only'), }); } diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 1fe8c03..36ed269 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -25,6 +25,8 @@ import { homedir } from 'node:os'; import { dirname, isAbsolute, join, relative, resolve } from 'node:path'; import pkg from '../package.json' with { type: 'json' }; import { handle, LEGACY, PROTOCOL } from './mcp'; +import { TOOLS } from './mcp-tools'; +import { brokerConfig, brokerProfileEnv } from './lib/broker'; import { runCommand } from './lib/runner'; export const DEFAULT_PORT = 7787; @@ -36,10 +38,14 @@ export interface HttpOptions { roots: string[]; project: string | null; allowOrigins: string[]; + /** Credential profiles to take from the broker vault for every call (no key files on this host). */ + brokerProfiles?: string[]; + /** Only the tools that change nothing (no dry_run tools at all). */ + readOnly?: boolean; auth: { kind: 'token'; token: string } | { kind: 'introspect'; url: string; key: string; resource: string; issuer: string }; } -export const PROJECT_PROP = { type: 'string', description: 'Absolute path of the app folder (the one with storebound.config.ts) to run in. Required unless the server was started with --project.' } as const; +export const PROJECT_PROP = { type: 'string', description: 'The app folder (the one with storebound.config.ts) to run in: an absolute path, or a folder name under the server roots. Required unless the server was started with --project.' } as const; /** Inside one of the roots (path compare, case-insensitive on Windows); no "..", no other drive. */ export function insideRoots(dir: string, roots: string[]): boolean { @@ -50,7 +56,12 @@ export function insideRoots(dir: string, roots: string[]): boolean { /** The folder a call runs in, or the reason it cannot run. */ export function projectFor(arg: unknown, o: Pick): { dir: string } | { error: string } { if (arg === undefined || arg === null || arg === '') return o.project ? { dir: o.project } : { error: 'project: required (absolute path of the app folder)' }; - if (typeof arg !== 'string' || !isAbsolute(arg)) return { error: 'project: must be an absolute path' }; + // a plain folder name is a project under one of the roots (a shared server keeps its checkouts there) + if (typeof arg === 'string' && /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/.test(arg)) { + const hit = o.roots.map(r => join(r, arg)).find(d => { try { return statSync(d).isDirectory(); } catch { return false; } }); + return hit ? { dir: resolve(hit) } : { error: `project: no folder ${arg} under ${o.roots.join(', ')}` }; + } + if (typeof arg !== 'string' || !isAbsolute(arg)) return { error: 'project: must be an absolute path, or a folder name under the roots' }; if (!insideRoots(arg, o.roots)) return { error: `project: ${arg} is outside the server's roots (${o.roots.join(', ')})` }; try { if (!statSync(arg).isDirectory()) return { error: `project: ${arg} is not a folder` }; } catch { return { error: `project: ${arg} does not exist` }; } return { dir: resolve(arg) }; @@ -116,10 +127,11 @@ async function readBody(req: IncomingMessage): Promise { } /** One POST body -> the answer (null for a notification). tools/list gains `project`; tools/call runs in it. */ -export async function answer(msg: Record, o: Pick, +export async function answer(msg: Record, o: Pick & { readOnly?: boolean }, run: (argv: string[], cwd: string) => Promise<{ code: number; out: string }> = runIn): Promise | null> { const params = (msg.params ?? {}) as Record; if (msg.method === 'tools/call') { + if (o.readOnly && TOOLS.find(t => t.name === params.name)?.write) return { jsonrpc: '2.0', id: msg.id ?? null, error: { code: -32602, message: `Unknown tool: ${String(params.name)} (this server is read-only)` } }; const args = { ...((params.arguments ?? {}) as Record) }; const p = projectFor(args.project, o); if ('error' in p) return { jsonrpc: '2.0', id: msg.id ?? null, result: { content: [{ type: 'text', text: `Invalid arguments: ${p.error}` }], isError: true } }; @@ -128,7 +140,9 @@ export async function answer(msg: Record, o: Pick; required?: string[] } }[] }).tools ?? []; + const res = r.result as { tools?: { name: string; annotations?: { readOnlyHint?: boolean }; inputSchema: { properties: Record; required?: string[] } }[] }; + if (o.readOnly) res.tools = (res.tools ?? []).filter(t => t.annotations?.readOnlyHint === true); + const tools = res.tools ?? []; for (const t of tools) { t.inputSchema.properties = { project: PROJECT_PROP, ...t.inputSchema.properties }; if (!o.project) t.inputSchema.required = ['project', ...(t.inputSchema.required ?? [])]; @@ -137,13 +151,29 @@ export async function answer(msg: Record, o: Pick>; until: number } | null = null; +/** The broker profiles' credentials as child env, fetched at most every 10 minutes (memory only, never logged). */ +async function profileEnvFor(profiles: string[] | undefined): Promise> { + if (!profiles?.length) return {}; + if (!brokerEnv || brokerEnv.until < Date.now()) { + const cfg = brokerConfig(); + if (!cfg) throw new Error('--broker-profiles needs a credential broker (~/.storebound/broker.json or STOREBOUND_BROKER_URL)'); + const env = brokerProfileEnv(cfg, profiles); + brokerEnv = { env, until: Date.now() + 600_000 }; + env.catch(() => { brokerEnv = null; }); + } + return brokerEnv.env; +} +let serverProfiles: string[] | undefined; + async function runIn(argv: string[], cwd: string): Promise<{ code: number; out: string }> { - const r = runCommand(argv, { cwd, env: { STOREBOUND_MCP: '1' } }); + const r = runCommand(argv, { cwd, env: { STOREBOUND_MCP: '1', ...(await profileEnvFor(serverProfiles)) } }); const { code, out } = await r.result; return { code, out }; } export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: number }> { + serverProfiles = o.brokerProfiles; const resourceMeta = o.auth.kind === 'introspect' ? metadataUrl(o.auth.resource) : null; const server = createServer(async (req, res) => { const path = (req.url ?? '/').split('?')[0]; @@ -190,7 +220,8 @@ export function tokenFrom(file: string): string { const home = (p: string) => (p.startsWith('~') ? join(homedir(), p.slice(1)) : p); export interface HttpFlags { host?: string; port?: string; roots?: string; project?: string; allowOrigin?: string; auth?: string; tokenFile?: string; - introspectUrl?: string; introspectKeyFile?: string; resource?: string; issuer?: string; allowRemoteToken?: boolean } + introspectUrl?: string; introspectKeyFile?: string; resource?: string; issuer?: string; allowRemoteToken?: boolean; + brokerProfiles?: string; readOnly?: boolean } export async function serveHttp(f: HttpFlags): Promise { const host = f.host ?? '127.0.0.1'; @@ -212,6 +243,8 @@ export async function serveHttp(f: HttpFlags): Promise { } else throw new Error('--auth token | introspect'); if (!['127.0.0.1', 'localhost', '::1'].includes(host) && kind === 'token' && !f.allowRemoteToken) throw new Error(`--host ${host} listens beyond this machine: use --auth introspect (or --allow-remote-token behind your own TLS proxy)`); - const s = await startHttp({ host, port, roots, project, allowOrigins, auth }); - console.error(`[storebound mcp] ${pkg.version} on http://${host}:${s.port}/mcp (MCP ${PROTOCOL}, legacy ${LEGACY.join(', ')}), auth ${kind}, roots ${roots.join(', ')}${project ? `, default project ${project}` : ''}`); + const brokerProfiles = (f.brokerProfiles ?? '').split(',').map(s => s.trim()).filter(Boolean); + if (brokerProfiles.length) await profileEnvFor(brokerProfiles).catch(e => { throw new Error(`--broker-profiles: ${(e as Error).message}`); }); + const s = await startHttp({ host, port, roots, project, allowOrigins, auth, brokerProfiles, readOnly: !!f.readOnly }); + console.error(`[storebound mcp] ${pkg.version} on http://${host}:${s.port}/mcp (MCP ${PROTOCOL}, legacy ${LEGACY.join(', ')}), auth ${kind}${f.readOnly ? ', read-only' : ''}${brokerProfiles.length ? `, broker profiles ${brokerProfiles.join(', ')}` : ''}, roots ${roots.join(', ')}${project ? `, default project ${project}` : ''}`); } diff --git a/docs/mcp.md b/docs/mcp.md index efe9cb4..dbbe6fd 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -50,6 +50,12 @@ refused unless `--allow-origin` names it. storebound mcp --http --host 0.0.0.0 --auth introspect --introspect-url https://auth.example.com/introspect \ --introspect-key-file ~/.storebound/introspect.key --resource https://mcp.example.com/mcp --issuer https://auth.example.com ``` +- `--read-only`: only the tools that change nothing are listed and callable. +- `--broker-profiles a,b`: a host that keeps no key files takes these credential profiles from the credential broker's + vault (`GET /api/store-credentials//asc-api-key | play-service-account`, a key with the `store-credentials` + scope; docs/credential-broker.md). They reach each tool call as `STOREBOUND_PROFILE__*` env, held in memory for + 10 minutes and never written. A project picks its profile as usual (the config's `account`). +- `project` may also be a folder name under the roots (a shared server keeps its checkouts there). - `/health` answers `{ ok, version }` without auth. ## Desktop machine interface diff --git a/tests/mcp-http.test.ts b/tests/mcp-http.test.ts index af1f031..7c11426 100644 --- a/tests/mcp-http.test.ts +++ b/tests/mcp-http.test.ts @@ -2,7 +2,7 @@ import { afterAll, describe, expect, test } from 'bun:test'; import { mkdtempSync, rmSync, statSync } from 'node:fs'; import { createServer } from 'node:http'; import { tmpdir } from 'node:os'; -import { join } from 'node:path'; +import { basename, join } from 'node:path'; import { answer, insideRoots, introspectionOk, metadataUrl, originAllowed, projectFor, startHttp, tokenFrom } from '../cli/mcp-http'; const root = mkdtempSync(join(tmpdir(), 'mcph-')); @@ -15,7 +15,11 @@ describe('pure parts', () => { expect(insideRoots(join(root, '..'), [root])).toBe(false); expect(projectFor(undefined, { roots: [root], project: null })).toEqual({ error: 'project: required (absolute path of the app folder)' }); expect(projectFor(undefined, { roots: [root], project: app })).toEqual({ dir: app }); - expect(projectFor('rel/dir', { roots: [root], project: null })).toEqual({ error: 'project: must be an absolute path' }); + expect(projectFor('rel/dir', { roots: [root], project: null })).toEqual({ error: 'project: must be an absolute path, or a folder name under the roots' }); + expect(projectFor(basename(app), { roots: [root], project: null })).toEqual({ dir: app }); + expect('error' in projectFor('nope', { roots: [root], project: null })).toBe(true); + expect(projectFor(app.split(/[\/]/).pop(), { roots: [root], project: null })).toEqual({ dir: app }); + expect('error' in projectFor('nope', { roots: [root], project: null })).toBe(true); expect('error' in projectFor(tmpdir(), { roots: [root], project: null })).toBe(true); expect('error' in projectFor(join(root, 'missing'), { roots: [root], project: null })).toBe(true); expect(projectFor(app, { roots: [root], project: null })).toEqual({ dir: app }); @@ -103,3 +107,34 @@ describe('http server', () => { } finally { s.close(); idp.close(); } }); }); + +describe('read-only and broker profiles', () => { + test('read-only lists only read tools and refuses a write tool', async () => { + const list = await answer({ jsonrpc: '2.0', id: 1, method: 'tools/list', params: {} }, { roots: [root], project: app, readOnly: true }); + const tools = (list!.result as { tools: { name: string; annotations: { readOnlyHint: boolean } }[] }).tools; + expect(tools.length).toBeGreaterThan(5); + expect(tools.every(t => t.annotations.readOnlyHint)).toBe(true); + const w = await answer({ jsonrpc: '2.0', id: 2, method: 'tools/call', params: { name: 'play_listing', arguments: {} } }, { roots: [root], project: app, readOnly: true }, async () => { throw new Error('must not run'); }); + expect((w as { error: { message: string } }).error.message).toContain('read-only'); + }); + test('broker store credentials become STOREBOUND_PROFILE__* env', async () => { + const { brokerProfileEnv } = await import('../cli/lib/broker'); + const srv = createServer((req, res) => { + res.setHeader('content-type', 'application/json'); + const m = /^\/api\/store-credentials\/([^/]+)\/([^/]+)$/.exec(req.url ?? ''); + if (req.headers.authorization !== 'Bearer kkkkkkkk') { res.statusCode = 401; return res.end('{}'); } + if (m?.[1] === 'teamA' && m[2] === 'asc-api-key') return res.end(JSON.stringify({ secret: '-----BEGIN PRIVATE KEY-----\nx\n-----END PRIVATE KEY-----', metadata: { issuerId: 'iss', keyId: 'KEY' } })); + if (m?.[1] === 'teamA' && m[2] === 'play-service-account') return res.end(JSON.stringify({ secret: '{"client_email":"a@example.com"}', metadata: {} })); + res.statusCode = 404; res.end('{"error":"err_not_found"}'); + }); + await new Promise(r => srv.listen(0, '127.0.0.1', () => r())); + const port = (srv.address() as { port: number }).port; + const keyFile = join(root, 'broker.key'); + (await import('node:fs')).writeFileSync(keyFile, 'kkkkkkkk', { mode: 0o600 }); + try { + const env = await brokerProfileEnv({ url: `http://127.0.0.1:${port}`, keyFile, account: null, from: 'test' }, ['teamA', 'other']); + expect(Object.keys(env).sort()).toEqual(['STOREBOUND_PROFILE_TEAMA_ASC_ISSUER_ID', 'STOREBOUND_PROFILE_TEAMA_ASC_KEY_ID', 'STOREBOUND_PROFILE_TEAMA_ASC_P8', 'STOREBOUND_PROFILE_TEAMA_PLAY_SERVICE_ACCOUNT']); + expect(env.STOREBOUND_PROFILE_TEAMA_ASC_KEY_ID).toBe('KEY'); + } finally { srv.close(); } + }); +}); From 398d8cd375a49afccfe51e7d9ff3ffcf9839dbe8 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 18:41:35 +0700 Subject: [PATCH 08/73] storebound 0.8.58: version in package.json and every copy, CHANGELOG 0.8.58 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index b247852..43b2bab 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.57", + "version": "0.8.58", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index e9ef474..51296bb 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.57", + "version": "0.8.58", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 300ce52..00cc3f1 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.57", + "version": "0.8.58", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index cd423a9..f715ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.58 · 2026-10-29 + - `check` and `scan` are fast on big repos: project walks skip dot folders (tool state, worktree copies), linked git worktrees and the folders git ignores (Pods, Carthage, SourcePackages and ios / android stay in), and read entry types from the listing instead of a stat per file. A game repo with worktree copies went from 244 s to 46 s for `check`. - `storebound mcp --http`: one Streamable HTTP MCP server that every agent session of a machine shares (no process per session). Each tool gets a `project` argument (absolute path inside `--roots`); auth is a local bearer token (`~/.storebound/mcp-token`, made on first start) or, for a server behind TLS, OAuth bearer tokens checked by introspection (RFC 7662) with protected resource metadata (RFC 9728). docs/mcp.md. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 428e5a1..7b9f632 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.57", + "version": "0.8.58", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 9e31a73..496304a 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.57" +version = "0.8.58" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 6912486..05e2417 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.57" +version = "0.8.58" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 04dc72a..deaff30 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.57", + "version": "0.8.58", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 2a9f249..fface3f 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.57", + "version": "0.8.58", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 8c4bf4c..59d9754 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.57", + "version": "0.8.58", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From c500866295fc6db877f3639ff8d164254c66d29a Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 18:54:58 +0700 Subject: [PATCH 09/73] mcp --http --public: key-less public server (skills, pitfalls, limits, listing lint, App Store search), rate limit, 64 KB bodies --- CHANGELOG.md | 2 + cli/data/flags.json | 8 +- cli/mcp-cmd.ts | 1 + cli/mcp-http.ts | 53 +++++-- cli/mcp-public.ts | 317 +++++++++++++++++++++++++++++++++++++++ cli/mcp.ts | 21 ++- docs/mcp.md | 38 +++++ tests/mcp-public.test.ts | 270 +++++++++++++++++++++++++++++++++ 8 files changed, 695 insertions(+), 15 deletions(-) create mode 100644 cli/mcp-public.ts create mode 100644 tests/mcp-public.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f715ce5..0102a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- `storebound mcp --http --public`: a public, key-less MCP server (no sign-in, no store credentials, no project folders, no child processes, read-only). Tools: `skills_list`, `skill_get`, `pitfalls_search`, `store_limits`, `listing_lint` and `aso_search` (the public iTunes Search API, the only network call). Rate limit per client (`--rate`, 429 with Retry-After; `--trust-proxy` for X-Forwarded-For), 64 KB request bodies, CORS preflight. docs/mcp.md. + ## 0.8.58 · 2026-10-29 - `check` and `scan` are fast on big repos: project walks skip dot folders (tool state, worktree copies), linked git worktrees and the folders git ignores (Pods, Carthage, SourcePackages and ios / android stay in), and read entry types from the listing instead of a stat per file. A game repo with worktree copies went from 244 s to 46 s for `check`. diff --git a/cli/data/flags.json b/cli/data/flags.json index 0879954..3ef2998 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -657,10 +657,13 @@ "issuer", "port", "project", + "public", + "rate", "read-only", "resource", "roots", - "token-file" + "token-file", + "trust-proxy" ], "onboard": [ "accounts", @@ -1363,7 +1366,9 @@ "propose", "prune", "prune-languages", + "public", "q", + "rate", "rating", "react-native", "read-only", @@ -1421,6 +1426,7 @@ "tracking-domains", "traffic", "translate", + "trust-proxy", "type", "udid", "unanswered", diff --git a/cli/mcp-cmd.ts b/cli/mcp-cmd.ts index e16bc25..24dde9d 100644 --- a/cli/mcp-cmd.ts +++ b/cli/mcp-cmd.ts @@ -10,5 +10,6 @@ export async function run(a: ReturnType): Promise { auth: a.get('auth'), tokenFile: a.get('token-file'), introspectUrl: a.get('introspect-url'), introspectKeyFile: a.get('introspect-key-file'), resource: a.get('resource'), issuer: a.get('issuer'), allowRemoteToken: a.has('allow-remote-token'), brokerProfiles: a.get('broker-profiles'), readOnly: a.has('read-only'), + public: a.has('public'), rate: a.get('rate'), trustProxy: a.has('trust-proxy'), }); } diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 36ed269..124c3bc 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -2,6 +2,7 @@ // machine (or one host serves a whole team) instead of one stdio process per session. // storebound mcp --http [--host 127.0.0.1] [--port 7787] [--roots ] [--project ] // [--auth token|introspect] [--token-file ~/.storebound/mcp-token] +// storebound mcp --http --public [--port 7788] [--host 127.0.0.1] [--rate 60] [--trust-proxy] (see below) // [--introspect-url --introspect-key-file --resource --issuer ] // Transport (https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http): one endpoint, // /mcp. POST carries one JSON-RPC message and gets one JSON answer (202 for a notification); GET and DELETE are 405 @@ -9,6 +10,9 @@ // Origin header, when sent, must be a localhost origin unless --allow-origin names it (DNS rebinding). // Project: every tool gets a `project` argument, the absolute path of the app folder the CLI runs in. It must be inside // --roots (default: the home folder); --project (or STOREBOUND_PROJECT) is the default when a call has none. +// Public (--public): the key-less server behind a public URL. No sign-in, no project, no store credentials; it serves only the +// read-only tools of mcp-public.ts (skills, pitfalls, limits, listing lint, App Store search), never starts a process, rate +// limited per client (--rate per minute, 429 + Retry-After; --trust-proxy reads the first X-Forwarded-For entry), body <= 64 KB. // Auth (every request to /mcp): // token (default): `Authorization: Bearer `, the token in --token-file (made with mode 600 on first start; // never printed). Clients: claude mcp add --transport http storebound http://127.0.0.1:7787/mcp @@ -25,12 +29,17 @@ import { homedir } from 'node:os'; import { dirname, isAbsolute, join, relative, resolve } from 'node:path'; import pkg from '../package.json' with { type: 'json' }; import { handle, LEGACY, PROTOCOL } from './mcp'; +import { clientKey, createLimiter, publicSurface, type PublicDeps } from './mcp-public'; import { TOOLS } from './mcp-tools'; import { brokerConfig, brokerProfileEnv } from './lib/broker'; import { runCommand } from './lib/runner'; export const DEFAULT_PORT = 7787; +export const PUBLIC_PORT = 7788; const MAX_BODY = 4 * 1024 * 1024; +/** Public mode: one JSON-RPC message of a read-only tool never needs more. */ +export const PUBLIC_MAX_BODY = 64 * 1024; +export const PUBLIC_DEFAULT_RATE = 60; export interface HttpOptions { host: string; @@ -42,7 +51,9 @@ export interface HttpOptions { brokerProfiles?: string[]; /** Only the tools that change nothing (no dry_run tools at all). */ readOnly?: boolean; - auth: { kind: 'token'; token: string } | { kind: 'introspect'; url: string; key: string; resource: string; issuer: string }; + /** Public key-less mode (`--public`): auth kind 'none', the tool surface of mcp-public.ts, a rate limit per client. */ + public?: { rate: number; trustProxy: boolean } & PublicDeps; + auth: { kind: 'none' } | { kind: 'token'; token: string } | { kind: 'introspect'; url: string; key: string; resource: string; issuer: string }; } export const PROJECT_PROP = { type: 'string', description: 'The app folder (the one with storebound.config.ts) to run in: an absolute path, or a folder name under the server roots. Required unless the server was started with --project.' } as const; @@ -96,7 +107,7 @@ const bearer = (req: IncomingMessage): string | null => { const h = req.headers. const cache = new Map(); async function authorized(req: IncomingMessage, o: HttpOptions): Promise { const t = bearer(req); - if (!t) return false; + if (!t || o.auth.kind === 'none') return false; if (o.auth.kind === 'token') { const a = createHash('sha256').update(t).digest(), b = createHash('sha256').update(o.auth.token).digest(); return a.equals(b); @@ -115,14 +126,14 @@ async function authorized(req: IncomingMessage, o: HttpOptions): Promise = {}): void { +function sendRaw(res: ServerResponse, status: number, body?: unknown, headers: Record = {}): void { res.writeHead(status, { 'cache-control': 'no-store', ...(body === undefined ? {} : { 'content-type': 'application/json' }), ...headers }); res.end(body === undefined ? undefined : JSON.stringify(body)); } -async function readBody(req: IncomingMessage): Promise { +async function readBody(req: IncomingMessage, max = MAX_BODY): Promise { let size = 0; const parts: Buffer[] = []; - for await (const c of req) { size += (c as Buffer).length; if (size > MAX_BODY) return null; parts.push(c as Buffer); } + for await (const c of req) { size += (c as Buffer).length; if (size > max) return null; parts.push(c as Buffer); } return Buffer.concat(parts).toString('utf8'); } @@ -151,6 +162,9 @@ export async function answer(msg: Record, o: Pick => { throw new Error('public mode does not run commands'); }; + let brokerEnv: { env: Promise>; until: number } | null = null; /** The broker profiles' credentials as child env, fetched at most every 10 minutes (memory only, never logged). */ async function profileEnvFor(profiles: string[] | undefined): Promise> { @@ -174,6 +188,11 @@ async function runIn(argv: string[], cwd: string): Promise<{ code: number; out: export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: number }> { serverProfiles = o.brokerProfiles; + if (o.auth.kind === 'none' && !o.public) throw new Error('auth none is only for --public'); + const pub = o.public ? { limiter: createLimiter(o.public.rate), surface: publicSurface(o.public), trustProxy: o.public.trustProxy } : null; + // no ambient credential in public mode, so any browser origin may call it + const cors: Record = pub ? { 'access-control-allow-origin': '*', 'access-control-allow-methods': 'POST, OPTIONS', 'access-control-allow-headers': 'content-type, accept, mcp-protocol-version', 'access-control-max-age': '86400' } : {}; + const send = (res: ServerResponse, status: number, body?: unknown, headers: Record = {}) => sendRaw(res, status, body, { ...cors, ...headers }); const resourceMeta = o.auth.kind === 'introspect' ? metadataUrl(o.auth.resource) : null; const server = createServer(async (req, res) => { const path = (req.url ?? '/').split('?')[0]; @@ -181,17 +200,21 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu return send(res, 200, { resource: o.auth.resource, authorization_servers: [o.auth.issuer], bearer_methods_supported: ['header'], scopes_supported: ['mcp'], resource_name: 'storebound' }); if (path === '/health' && req.method === 'GET') return send(res, 200, { ok: true, version: pkg.version }); if (path !== '/mcp') return send(res, 404, { error: 'not found' }); - if (!originAllowed(req.headers.origin, o.allowOrigins)) return send(res, 403, { error: 'origin not allowed' }); - if (!(await authorized(req, o))) + if (pub) { + if (req.method === 'OPTIONS') return send(res, 204); + const hit = pub.limiter.hit(clientKey(req.headers['x-forwarded-for'], req.socket.remoteAddress, pub.trustProxy)); + if (!hit.ok) return send(res, 429, { error: 'rate limit exceeded' }, { 'retry-after': String(hit.retryAfter) }); + } else if (!originAllowed(req.headers.origin, o.allowOrigins)) return send(res, 403, { error: 'origin not allowed' }); + if (!pub && !(await authorized(req, o))) return send(res, 401, { error: 'unauthorized' }, { 'www-authenticate': resourceMeta ? `Bearer resource_metadata="${resourceMeta}"` : 'Bearer' }); if (req.method !== 'POST') return send(res, 405, { error: 'POST only (no server-initiated stream)' }, { allow: 'POST' }); - const body = await readBody(req); + const body = await readBody(req, pub ? PUBLIC_MAX_BODY : MAX_BODY); if (body === null) return send(res, 413, { error: 'body too large' }); let msg: unknown; try { msg = JSON.parse(body); } catch { return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } }); } if (Array.isArray(msg) || typeof msg !== 'object' || msg === null) return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32600, message: 'One JSON-RPC message per request' } }); try { - const r = await answer(msg as Record, o); + const r = pub ? await handle(msg as never, noRun, pub.surface) : await answer(msg as Record, o); return r ? send(res, 200, r) : send(res, 202); } catch (e) { return send(res, 500, { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }); } }); @@ -221,10 +244,20 @@ const home = (p: string) => (p.startsWith('~') ? join(homedir(), p.slice(1)) : p export interface HttpFlags { host?: string; port?: string; roots?: string; project?: string; allowOrigin?: string; auth?: string; tokenFile?: string; introspectUrl?: string; introspectKeyFile?: string; resource?: string; issuer?: string; allowRemoteToken?: boolean; - brokerProfiles?: string; readOnly?: boolean } + brokerProfiles?: string; readOnly?: boolean; public?: boolean; rate?: string; trustProxy?: boolean } export async function serveHttp(f: HttpFlags): Promise { const host = f.host ?? '127.0.0.1'; + if (f.public) { + const bad = (['auth', 'tokenFile', 'roots', 'project', 'brokerProfiles', 'allowOrigin', 'introspectUrl'] as const).filter(k => f[k] !== undefined); + if (bad.length || f.readOnly) throw new Error('--public takes no credentials or project: do not combine it with --auth, --token-file, --roots, --project, --broker-profiles, --allow-origin, --introspect-* or --read-only'); + const rate = Number(f.rate ?? PUBLIC_DEFAULT_RATE); + if (!Number.isInteger(rate) || rate < 1) throw new Error('--rate: requests per minute per client, a whole number >= 1'); + const port = Number(f.port ?? PUBLIC_PORT); + const s = await startHttp({ host, port, roots: [], project: null, allowOrigins: [], auth: { kind: 'none' }, public: { rate, trustProxy: !!f.trustProxy } }); + console.error(`[storebound mcp] ${pkg.version} PUBLIC key-less server on http://${host}:${s.port}/mcp (MCP ${PROTOCOL}, legacy ${LEGACY.join(', ')}), read-only, ${rate} requests/min per client${f.trustProxy ? ', X-Forwarded-For trusted' : ''}`); + return; + } const port = Number(f.port ?? DEFAULT_PORT); const roots = (f.roots ?? homedir()).split(',').map(s => resolve(home(s.trim()))).filter(Boolean); const projectArg = f.project ?? process.env.STOREBOUND_PROJECT; diff --git a/cli/mcp-public.ts b/cli/mcp-public.ts new file mode 100644 index 0000000..81387b4 --- /dev/null +++ b/cli/mcp-public.ts @@ -0,0 +1,317 @@ +// The public, key-less MCP surface (`storebound mcp --http --public`): what anyone may call without signing in. +// Everything is pure and in-process. This module never reads store credentials, project folders or the cwd, never +// starts a child process (no runner, no CLI) and makes one kind of network call: the public iTunes Search API +// (aso_search). The only files it reads are the skills/ folder of the storebound package itself. +import { existsSync, readdirSync, readFileSync } from 'node:fs'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import type { Surface } from './mcp'; +import { APPLE_LIMITS, PLAY_LIMITS } from './lib/copy'; +import { parseFrontMatter } from './lib/frontmatter'; +import { appleLocaleIssues, playLangIssues } from './lib/listing-rules'; +import { IMAGE_SPECS, PREVIEW_RULES, VIDEO_TARGETS } from './shots/spec'; + +export const PUBLIC_INSTRUCTIONS = [ + 'This is the public, key-less storebound server: anyone may use it, it needs no sign-in and it never touches store accounts, keys or project files.', + 'It is read-only and offers store knowledge: the skills (skills_list, skill_get), known store pitfalls (pitfalls_search), listing and screenshot limits (store_limits), a text linter for App Store / Google Play listings (listing_lint) and a public App Store search (aso_search).', + 'For real store work (builds, uploads, listings, releases) install the toolchain: `npx storebound` (see https://storebound.dev) and use its own MCP server, `npx storebound mcp`.', +].join(' '); + +export interface PublicDeps { + /** The folder with /SKILL.md files. Default: skills/ of the storebound package that contains this file. */ + skillsDir?: string; + /** iTunes Search API endpoint (tests point it at a local fake). */ + searchBase?: string; + fetch?: typeof fetch; +} + +export interface PublicResult { text: string; data?: unknown; isError?: boolean } +export interface PublicTool { + name: string; title: string; description: string; + inputSchema: { type: 'object'; properties: Record; required?: string[]; additionalProperties: false }; + network?: boolean; + run(input: Record): Promise | PublicResult; +} +export interface Schema { type: string; description?: string; enum?: string[]; pattern?: string; minLength?: number; maxLength?: number; minimum?: number; maximum?: number; + properties?: Record; additionalProperties?: boolean } + +export const SEARCH_BASE = 'https://itunes.apple.com/search'; +const MAX_TEXT = 40_000; +const SKILL_NAME = /^[a-z0-9-]+$/; + +// ---- input validation (JSON-Schema subset these tools use) ---- + +export function validatePublic(schema: Schema, input: unknown, path = ''): string[] { + const e: string[] = []; + if (input === undefined || input === null) input = {}; + if (typeof input !== 'object' || Array.isArray(input)) return [`${path || 'arguments'}: must be an object`]; + const i = input as Record; + const props = schema.properties ?? {}; + for (const r of (schema as { required?: string[] }).required ?? []) if (i[r] === undefined) e.push(`${path}${r}: required`); + for (const [k, v] of Object.entries(i)) { + const p = props[k]; + if (!p) { e.push(`${path}${k}: unknown argument`); continue; } + if (v === undefined) continue; + if (p.type === 'object') { e.push(...validatePublic(p, v, `${path}${k}.`)); continue; } + if (p.type === 'string') { + if (typeof v !== 'string') { e.push(`${path}${k}: must be a string`); continue; } + if (p.enum && !p.enum.includes(v)) e.push(`${path}${k}: one of ${p.enum.join(', ')}`); + if (p.pattern && !new RegExp(p.pattern).test(v)) e.push(`${path}${k}: does not match ${p.pattern}`); + if (p.minLength !== undefined && v.length < p.minLength) e.push(`${path}${k}: at least ${p.minLength} characters`); + if (p.maxLength !== undefined && v.length > p.maxLength) e.push(`${path}${k}: at most ${p.maxLength} characters`); + } else if (p.type === 'integer') { + if (typeof v !== 'number' || !Number.isInteger(v)) { e.push(`${path}${k}: must be an integer`); continue; } + if (p.minimum !== undefined && v < p.minimum) e.push(`${path}${k}: >= ${p.minimum}`); + if (p.maximum !== undefined && v > p.maximum) e.push(`${path}${k}: <= ${p.maximum}`); + } + } + return e; +} + +const clipText = (s: string, max = MAX_TEXT): string => (s.length <= max ? s : `${s.slice(0, max)}\n[... ${s.length - max} characters cut]`); +const oneLine = (s: string, max: number): string => { const t = s.replace(/\s+/g, ' ').trim(); return t.length <= max ? t : `${t.slice(0, max - 1)}…`; }; + +// ---- skills (from the package) ---- + +function packageSkillsDir(): string { + const start = dirname(fileURLToPath(import.meta.url)); + for (let d = start; ; d = dirname(d)) { + try { + const pkg = JSON.parse(readFileSync(join(d, 'package.json'), 'utf8')) as { name?: string }; + if (pkg.name === 'storebound') return join(d, 'skills'); + } catch { /* keep looking */ } + if (dirname(d) === d) break; + } + return resolve(start, '..', 'skills'); +} + +export interface SkillInfo { name: string; description: string; text: string } + +export function loadSkills(dir: string): SkillInfo[] { + if (!existsSync(dir)) return []; + const out: SkillInfo[] = []; + for (const name of readdirSync(dir).filter(n => SKILL_NAME.test(n)).sort()) { + let text: string; + try { text = readFileSync(join(dir, name, 'SKILL.md'), 'utf8'); } catch { continue; } + const { data } = parseFrontMatter(text); + out.push({ name, description: oneLine(typeof data.description === 'string' ? data.description : '', 400), text }); + } + return out; +} + +// ---- pitfalls ---- + +export interface Section { heading: string; body: string } +export function sectionsOf(md: string): Section[] { + const parts = md.split(/^## /m).slice(1); + return parts.map(p => { const nl = p.indexOf('\n'); return { heading: (nl < 0 ? p : p.slice(0, nl)).trim(), body: nl < 0 ? '' : p.slice(nl + 1).trim() }; }); +} + +const APPLE_RE = /app store|apple|testflight|\bios\b|\basc\b|xcode|itunes/i; +const PLAY_RE = /google play|\bplay\b|\bgradle\b|\baab\b|android/i; + +export function searchSections(sections: Section[], query: string, store?: 'apple' | 'play', max = 8): { heading: string; excerpt: string; score: number }[] { + const words = [...new Set(query.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(w => w.length > 1))].slice(0, 12); + if (!words.length) return []; + const scored = sections.map(s => { + const head = s.heading.toLowerCase(), body = s.body.toLowerCase(); + let score = 0; + for (const w of words) { if (head.includes(w)) score += 5; const n = body.split(w).length - 1; score += Math.min(n, 5); } + return { s, score }; + }).filter(x => x.score > 0); + const filtered = scored.filter(({ s }) => { + if (!store) return true; + const t = `${s.heading} ${s.body}`; + const a = APPLE_RE.test(t), p = PLAY_RE.test(t); + return store === 'apple' ? a || !p : p || !a; + }); + return filtered.sort((a, b) => b.score - a.score).slice(0, max).map(({ s, score }) => { + // the excerpt starts at the first matching line + const lines = s.body.split('\n'); + const at = Math.max(0, lines.findIndex(l => words.some(w => l.toLowerCase().includes(w)))); + return { heading: s.heading, score, excerpt: clipText(lines.slice(at).join('\n'), 1200) }; + }); +} + +// ---- limits ---- + +export function limits(store?: 'apple' | 'play'): Record { + const specs = (s: 'apple' | 'play') => Object.entries(IMAGE_SPECS).filter(([, v]) => v.store === s).map(([key, v]) => ({ + key, type: v.type, label: v.label, acceptedPixelSizes: v.sizes.map(([w, h]) => `${w}x${h}`), perSet: `${v.min}-${v.max}`, + maxBytes: v.maxBytes, alpha: v.alpha, ...(v.landscapeOnly ? { landscapeOnly: true } : {}), + })); + const previews = (s: 'apple' | 'play') => Object.values(VIDEO_TARGETS).filter(v => v.store === s).map(v => ({ label: v.label, size: `${v.w}x${v.h}` })); + const apple = { + textLimitsCharacters: { ...APPLE_LIMITS }, + keywordField: ['at most 100 characters (characters, not bytes)', 'comma-separated, no spaces around commas (they count)', 'fill at least 90 of the 100', 'no repeats of words already in the name or subtitle (they are indexed anyway)', 'no duplicates', 'single words combine on their own; multi-word phrases waste characters'], + screenshots: specs('apple'), + appPreviews: { targets: previews('apple'), ...PREVIEW_RULES }, + }; + const play = { + textLimitsCharacters: { ...PLAY_LIMITS }, + screenshots: specs('play'), + images: { featureGraphic: '1024x500, JPEG or 24-bit PNG, no alpha', icon: '512x512 PNG (Play listing icon)' }, + promoVideo: previews('play'), + }; + return store === 'apple' ? { apple } : store === 'play' ? { play } : { apple, play }; +} + +// ---- listing lint ---- + +const APPLE_FIELDS = ['name', 'subtitle', 'keywords', 'promotionalText', 'description', 'whatsNew'] as const; +const PLAY_FIELDS = ['title', 'shortDescription', 'fullDescription', 'whatsNew'] as const; +const FIELD_MAX = 5000; + +export function lintListing(store: 'apple' | 'play', fields: Record, locale: string): { problems: { level: string; field: string; msg: string }[]; counts: Record } { + const f = fields as Record; + const counts: Record = {}; + let issues: { level: string; field: string; msg: string }[]; + if (store === 'apple') { + const v = Object.fromEntries(APPLE_FIELDS.filter(k => f[k] !== undefined).map(k => [k, f[k]!])); + issues = appleLocaleIssues(locale, v, ''); + // keywords with no name / subtitle given still get the stand-alone keyword rules + if (v.keywords === undefined) issues = issues.filter(i => i.field !== 'keywords'); + for (const k of APPLE_FIELDS) if (v[k] !== undefined) counts[k] = `${[...v[k]!].length}/${APPLE_LIMITS[k]}`; + } else { + const v = { title: f.title, short: f.shortDescription, full: f.fullDescription, whatsNew: f.whatsNew }; + issues = playLangIssues(locale, v, f.title ?? ''); + for (const [k, lim] of [['title', 'title'], ['shortDescription', 'short'], ['fullDescription', 'full'], ['whatsNew', 'whatsNew']] as const) + if (f[k] !== undefined) counts[k] = `${[...f[k]!].length}/${PLAY_LIMITS[lim]}`; + const rename: Record = { short: 'shortDescription', full: 'fullDescription' }; + issues = issues.map(i => ({ ...i, field: rename[i.field] ?? i.field, msg: i.msg.replace(/^(short|full) is /, (_m, w: string) => `${rename[w]} is `) })); + } + // fields not given are not "missing": only the ones the caller sent are judged + const given = new Set(Object.keys(fields)); + const problems = issues.filter(i => !/is required$|description is required$/.test(i.msg) || given.has(i.field)); + return { problems: problems.map(i => ({ level: i.level, field: i.field, msg: i.msg })), counts }; +} + +// ---- iTunes search ---- + +interface ItunesApp { trackId?: number; trackName?: string; sellerName?: string; averageUserRating?: number; userRatingCount?: number; primaryGenreName?: string } + +export async function searchApps(term: string, country: string, limit: number, base: string, f: typeof fetch): Promise<{ results: Record[] }> { + const url = `${base}${base.includes('?') ? '&' : '?'}${new URLSearchParams({ term, country: country.toLowerCase(), media: 'software', entity: 'software', limit: String(limit) })}`; + const r = await f(url, { signal: AbortSignal.timeout(10_000), headers: { accept: 'application/json' } }); + if (!r.ok) throw new Error(`the App Store search answered ${r.status}`); + const j = (await r.json()) as { results?: ItunesApp[] }; + const results = (j.results ?? []).slice(0, limit).map((a, n) => ({ + rank: n + 1, name: oneLine(a.trackName ?? '', 120), developer: oneLine(a.sellerName ?? '', 120), id: a.trackId ?? null, + rating: typeof a.averageUserRating === 'number' ? Math.round(a.averageUserRating * 100) / 100 : null, + ratingCount: a.userRatingCount ?? 0, genre: a.primaryGenreName ?? null, + })); + return { results }; +} + +// ---- the tools ---- + +const store: Schema = { type: 'string', enum: ['apple', 'play'] }; + +export function publicTools(deps: PublicDeps = {}): PublicTool[] { + let skills: SkillInfo[] | null = null; + const getSkills = () => (skills ??= loadSkills(deps.skillsDir ?? packageSkillsDir())); + const obj = (properties: Record, required?: string[]): PublicTool['inputSchema'] => ({ type: 'object', properties, ...(required ? { required } : {}), additionalProperties: false }); + const textField = (description: string, maxLength = FIELD_MAX): Schema => ({ type: 'string', description, maxLength }); + const locale: Schema = { type: 'string', description: 'Locale or language id, e.g. en-US (default en-US)', pattern: '^[A-Za-z]{2,3}([-_][A-Za-z0-9]{2,8}){0,2}$', maxLength: 20 }; + + return [ + { name: 'skills_list', title: 'List storebound skills', description: 'Name and one-line description of every storebound skill (step-by-step guides for store releases, listings, screenshots, IAP, privacy, ASO ...).', + inputSchema: obj({}), + run: () => { const list = getSkills().map(s => ({ name: s.name, description: s.description })); return { text: list.map(s => `${s.name}: ${s.description}`).join('\n'), data: { skills: list } }; } }, + { name: 'skill_get', title: 'Read one skill', description: 'The full SKILL.md text of one skill (name from skills_list).', + inputSchema: obj({ name: { type: 'string', description: 'Skill name, e.g. aso-basics', pattern: SKILL_NAME.source, minLength: 1, maxLength: 80 } }, ['name']), + run: i => { + const s = getSkills().find(x => x.name === i.name); + if (!s) return { text: `Unknown skill: ${String(i.name)}. Call skills_list for the names.`, isError: true }; + return { text: clipText(s.text, 120_000), data: { name: s.name } }; + } }, + { name: 'pitfalls_search', title: 'Search known store pitfalls', description: 'Sections of the store-pitfalls skill (mistakes made in real App Store and Google Play releases) that match the query words, best first (at most 8, each clipped).', + inputSchema: obj({ query: { type: 'string', description: 'Words to look for, e.g. "keywords rejected screenshots"', minLength: 2, maxLength: 200 }, store }, ['query']), + run: i => { + const sk = getSkills().find(x => x.name === 'store-pitfalls'); + if (!sk) return { text: 'The store-pitfalls skill is not in this package.', isError: true }; + const hits = searchSections(sectionsOf(sk.text), String(i.query), i.store as 'apple' | 'play' | undefined); + if (!hits.length) return { text: 'No pitfall matches those words. Try fewer or different words.', data: { matches: [] } }; + return { text: clipText(hits.map(h => `## ${h.heading}\n${h.excerpt}`).join('\n\n---\n\n')), data: { matches: hits.map(h => ({ heading: h.heading, score: h.score })) } }; + } }, + { name: 'store_limits', title: 'Store listing and image limits', description: 'Listing field character limits, the App Store keyword field rules, screenshot and app preview sizes per device class and the Google Play feature graphic and icon sizes.', + inputSchema: obj({ store }), + run: i => { const d = limits(i.store as 'apple' | 'play' | undefined); return { text: JSON.stringify(d, null, 2), data: d }; } }, + { name: 'listing_lint', title: 'Lint a store listing', description: 'Runs storebound\'s listing and ASO checks on the text you give (limits, keyword field rules, repeated name words, other platforms or apps named, placeholder text, keyword stuffing). Only the fields you send are judged. Nothing is stored.', + inputSchema: obj({ + store, locale, + fields: { type: 'object', description: 'Apple: name, subtitle, keywords, promotionalText, description, whatsNew. Play: title, shortDescription, fullDescription, whatsNew.', additionalProperties: false, + properties: Object.fromEntries([...new Set([...APPLE_FIELDS, ...PLAY_FIELDS])].map(k => [k, textField(`The ${k} text`)])) }, + }, ['store', 'fields']), + run: i => { + const st = i.store as 'apple' | 'play'; + const fields = i.fields as Record; + const allowed: readonly string[] = st === 'apple' ? APPLE_FIELDS : PLAY_FIELDS; + const bad = Object.keys(fields).filter(k => !allowed.includes(k)); + if (bad.length) return { text: `Invalid arguments: fields: ${bad.join(', ')} not used for ${st}; use ${allowed.join(', ')}`, isError: true }; + if (!Object.keys(fields).length) return { text: 'Invalid arguments: fields: send at least one field', isError: true }; + const r = lintListing(st, fields, String(i.locale ?? 'en-US').replace('_', '-')); + const lines = r.problems.map(p => `${p.level.toUpperCase()} ${p.field}: ${p.msg}`); + return { text: `${Object.entries(r.counts).map(([k, v]) => `${k} ${v}`).join(', ')}\n${lines.length ? lines.join('\n') : 'No problems found.'}`, data: r }; + } }, + { name: 'aso_search', title: 'Search the App Store', description: 'The public iTunes Search API: the top apps for a search term in one storefront (name, developer, id, rating, rating count, genre). The order is close to, not the same as, App Store search.', + network: true, + inputSchema: obj({ term: { type: 'string', description: 'Search term', minLength: 1, maxLength: 100 }, country: { type: 'string', description: 'Two-letter storefront, default us', pattern: '^[A-Za-z]{2}$', minLength: 2, maxLength: 2 }, + limit: { type: 'integer', description: 'Results, 1-25 (default 10)', minimum: 1, maximum: 25 } }, ['term']), + run: async i => { + try { + const r = await searchApps(String(i.term), String(i.country ?? 'us'), Number(i.limit ?? 10), deps.searchBase ?? SEARCH_BASE, deps.fetch ?? fetch); + return { text: r.results.map(a => `${a.rank}. ${String(a.name)} (${String(a.developer)}) id ${String(a.id)}, ${a.rating ?? 'no rating'} / ${String(a.ratingCount)} ratings, ${String(a.genre)}`).join('\n') || 'No results.', data: r }; + } catch (e) { return { text: `Search failed: ${(e as Error).message}`, isError: true }; } + } }, + ]; +} + +/** The surface handle() serves in public mode: only these tools exist (the type lives in mcp.ts). */ + +export function publicSurface(deps: PublicDeps = {}): Surface { + const tools = publicTools(deps); + return { + instructions: PUBLIC_INSTRUCTIONS, + list: () => tools.map(t => ({ name: t.name, title: t.title, description: t.description, inputSchema: t.inputSchema, + annotations: { title: t.title, readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: !!t.network } })), + call: async (name, input) => { + const t = tools.find(x => x.name === name); + if (!t) return null; + const problems = validatePublic(t.inputSchema, input); + if (problems.length) return { text: `Invalid arguments: ${problems.join('; ')}`, isError: true }; + const r = await t.run((input ?? {}) as Record); + return { ...r, text: clipText(r.text) }; + }, + }; +} + +// ---- rate limit ---- + +export interface Limiter { hit(key: string): { ok: boolean; retryAfter: number } } + +/** Fixed one-minute window per client key, kept in memory; expired windows are swept so the map stays small. */ +export function createLimiter(perMinute: number, now: () => number = Date.now): Limiter { + const win = new Map(); + let sweptAt = now(); + return { + hit(key) { + const t = now(); + if (t - sweptAt > 60_000 || win.size > 50_000) { for (const [k, w] of win) if (t - w.start >= 60_000) win.delete(k); sweptAt = t; } + let w = win.get(key); + if (!w || t - w.start >= 60_000) { w = { start: t, n: 0 }; win.set(key, w); } + w.n++; + return w.n <= perMinute ? { ok: true, retryAfter: 0 } : { ok: false, retryAfter: Math.max(1, Math.ceil((w.start + 60_000 - t) / 1000)) }; + }, + }; +} + +/** The client key: the first X-Forwarded-For entry only when the proxy is trusted, else the socket address. */ +export function clientKey(forwardedFor: string | string[] | undefined, remote: string | undefined, trustProxy: boolean): string { + if (trustProxy) { + const h = Array.isArray(forwardedFor) ? forwardedFor[0] : forwardedFor; + const first = h?.split(',')[0]?.trim(); + if (first) return first.slice(0, 64); + } + return remote ?? 'unknown'; +} diff --git a/cli/mcp.ts b/cli/mcp.ts index 95405cc..6441871 100644 --- a/cli/mcp.ts +++ b/cli/mcp.ts @@ -56,6 +56,13 @@ export const INSTRUCTIONS = [ 'Run `check` (offline) and `validate` (read-only) before writes. Long uploads (images, screenshots) are better run in a terminal with a log.', ].join(' '); +/** A replacement tool surface (the public key-less server, mcp-public.ts): its own instructions, tool list and calls. */ +export interface Surface { + instructions: string; + list(): Record[]; + call(name: string, input: unknown): Promise<{ text: string; data?: unknown; isError?: boolean } | null>; +} + type Id = string | number; interface Msg { jsonrpc: '2.0'; id?: Id; method?: string; params?: Record } @@ -71,7 +78,7 @@ export function eraOf(m: Msg): { era: 'modern' | 'legacy'; version: string | nul } /** Handles one message; returns the response object (or null for notifications). Exported for tests. */ -export async function handle(m: Msg, run: (argv: string[], id: Id) => Promise<{ code: number; out: string }> = runCli): Promise | null> { +export async function handle(m: Msg, run: (argv: string[], id: Id) => Promise<{ code: number; out: string }> = runCli, surface?: Surface): Promise | null> { const err = (code: number, message: string, data?: unknown) => ({ jsonrpc: '2.0', id: m.id ?? null, error: { code, message, ...(data === undefined ? {} : { data }) } }); if (m.id === undefined) { if (m.method === 'notifications/cancelled') cancel(m.params?.requestId as Id); @@ -83,7 +90,7 @@ export async function handle(m: Msg, run: (argv: string[], id: Id) => Promise<{ protocolVersion: LEGACY.includes(asked) ? asked : LEGACY_PROTOCOL, capabilities: { tools: { listChanged: false } }, serverInfo: { ...serverInfo(), description: pkg.description }, - instructions: INSTRUCTIONS, + instructions: surface?.instructions ?? INSTRUCTIONS, } }; } @@ -101,11 +108,17 @@ export async function handle(m: Msg, run: (argv: string[], id: Id) => Promise<{ switch (m.method) { case 'server/discover': - return ok({ supportedVersions: SUPPORTED, capabilities: { tools: {} }, instructions: INSTRUCTIONS, ttlMs: TOOLS_TTL_MS, cacheScope: 'public' }); + return ok({ supportedVersions: SUPPORTED, capabilities: { tools: {} }, instructions: surface?.instructions ?? INSTRUCTIONS, ttlMs: TOOLS_TTL_MS, cacheScope: 'public' }); case 'ping': return ok({}); - case 'tools/list': return ok({ tools: listTools(bypassOn()), ...(era === 'modern' ? { ttlMs: TOOLS_TTL_MS, cacheScope: 'public' } : {}) }); + case 'tools/list': return ok({ tools: surface ? surface.list() : listTools(bypassOn()), ...(era === 'modern' ? { ttlMs: TOOLS_TTL_MS, cacheScope: 'public' } : {}) }); case 'tools/call': { const name = String(m.params?.name ?? ''); + if (surface) { + // public mode: only the surface's own tools exist; nothing below (the CLI tools, owner_step) is reachable + const r = await surface.call(name, m.params?.arguments ?? {}); + if (!r) return err(-32602, `Unknown tool: ${name}`); + return ok({ content: [{ type: 'text', text: r.text }], ...(r.data === undefined ? {} : { structuredContent: { result: r.data } }), isError: !!r.isError }); + } const tool = TOOLS.find(t => t.name === name) ?? (name === OWNER_STEP.name && bypassOn() ? OWNER_STEP : undefined); if (!tool) return err(-32602, `Unknown tool: ${name}`); const input = (m.params?.arguments ?? {}) as Record; diff --git a/docs/mcp.md b/docs/mcp.md index dbbe6fd..e78393a 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -58,6 +58,44 @@ refused unless `--allow-origin` names it. - `project` may also be a folder name under the roots (a shared server keeps its checkouts there). - `/health` answers `{ ok, version }` without auth. + +## Public key-less server + +`storebound mcp --http --public [--port 7788] [--host 127.0.0.1] [--rate 60] [--trust-proxy]` is a separate mode for a +server anyone may connect to (for example behind a public HTTPS address). No sign-in, no token, no project: it never +reads store credentials, project folders or the working directory, never starts a child process and never runs the CLI. +It is read-only and keeps no state. The only network call it makes is the public iTunes Search API (`aso_search`). +It cannot be combined with `--auth`, `--token-file`, `--roots`, `--project`, `--broker-profiles`, `--allow-origin` +or `--read-only`. + +Tools (and only these; the CLI tools of the normal server do not exist here, a call gets "Unknown tool"): + +- `skills_list`: name and one-line description of every skill in the package. +- `skill_get {name}`: the full SKILL.md of one skill (`^[a-z0-9-]+$`, must be in the list). +- `pitfalls_search {query, store?}`: the sections of the store-pitfalls skill that match the query words, best first (at + most 8, each clipped). `store` is `apple` or `play`. +- `store_limits {store?}`: listing field character limits, the App Store keyword field rules, screenshot and app + preview sizes per device class, Play feature graphic and icon sizes. +- `listing_lint {store, fields, locale?}`: storebound's listing and ASO checks on the text you send (limits, keyword + field rules, repeated name words, other platforms or apps named, placeholder text, keyword stuffing). Apple fields: + `name`, `subtitle`, `keywords`, `promotionalText`, `description`, `whatsNew`. Play fields: `title`, + `shortDescription`, `fullDescription`, `whatsNew`. Only the fields you send are judged; nothing is stored. +- `aso_search {term, country?, limit?}`: top apps for a term in one storefront from the iTunes Search API (name, + developer, id, rating, rating count, genre; 1-25 results, 10 s timeout). + +Limits: `--rate N` requests per minute per client (default 60; over the limit the answer is 429 with `Retry-After`), +bodies over 64 KB get 413, every tool input is validated against a closed schema, and output is bounded. Behind a +reverse proxy add `--trust-proxy` so the first `X-Forwarded-For` entry is the client; without it that header is +ignored. Any browser origin may call it (there is no ambient credential), and CORS preflight is answered. `/health` +works as before. Request bodies are not logged. + +```bash +storebound mcp --http --public --port 7788 --trust-proxy +claude mcp add --transport http storebound-public https://mcp.example.com/mcp +``` + +For real store work (builds, uploads, listings, releases) use `npx storebound` and its own MCP server. + ## Desktop machine interface `storebound serve --stdio` is what the desktop app (`apps/desktop`, in progress) runs as its sidecar: newline-delimited diff --git a/tests/mcp-public.test.ts b/tests/mcp-public.test.ts new file mode 100644 index 0000000..2846cb8 --- /dev/null +++ b/tests/mcp-public.test.ts @@ -0,0 +1,270 @@ +import { describe, expect, test } from 'bun:test'; +import { readFileSync } from 'node:fs'; +import { createServer } from 'node:http'; +import { handle } from '../cli/mcp'; +import { PUBLIC_MAX_BODY, startHttp } from '../cli/mcp-http'; +import { clientKey, createLimiter, publicSurface, searchSections, sectionsOf, validatePublic } from '../cli/mcp-public'; + +const noRun = async (): Promise<{ code: number; out: string }> => { throw new Error('a child process must never start in public mode'); }; + +async function fakeItunes(): Promise<{ url: string; close: () => void; queries: string[] }> { + const queries: string[] = []; + const srv = createServer((req, res) => { + queries.push(req.url ?? ''); + res.setHeader('content-type', 'application/json'); + res.end(JSON.stringify({ resultCount: 2, results: [ + { trackId: 111, trackName: 'Example One', sellerName: 'Example Studio', averageUserRating: 4.56789, userRatingCount: 1234, primaryGenreName: 'Games', bundleId: 'com.example.one', description: 'x'.repeat(5000) }, + { trackId: 222, trackName: 'Example Two', sellerName: 'Other Studio', primaryGenreName: 'Productivity' }, + ] })); + }); + await new Promise(r => srv.listen(0, '127.0.0.1', () => r())); + return { url: `http://127.0.0.1:${(srv.address() as { port: number }).port}/search`, close: () => srv.close(), queries }; +} + +type Reply = { error?: { message: string }; result?: { isError: boolean; content: { text: string }[]; structuredContent?: { result: any } } }; +/** One tools/call through the real handler, as the HTTP server does it. */ +async function call(surface: ReturnType, name: string, args: unknown): Promise { + return (await handle({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name, arguments: args as Record } }, noRun, surface)) as Reply; +} +const text = (r: Reply) => r.result!.content[0]!.text; + +describe('tool list', () => { + const surface = publicSurface(); + test('only the public tools, all read-only, closed schemas', async () => { + const r = (await handle({ jsonrpc: '2.0', id: 1, method: 'tools/list' }, noRun, surface))!.result as { tools: any[] }; + expect(r.tools.map(t => t.name).sort()).toEqual(['aso_search', 'listing_lint', 'pitfalls_search', 'skill_get', 'skills_list', 'store_limits']); + for (const t of r.tools) { + expect(t.inputSchema.additionalProperties).toBe(false); + expect(t.annotations.readOnlyHint).toBe(true); + expect(t.annotations.destructiveHint).toBe(false); + } + expect(r.tools.find(t => t.name === 'aso_search').annotations.openWorldHint).toBe(true); + expect(r.tools.find(t => t.name === 'store_limits').annotations.openWorldHint).toBe(false); + }); + test('initialize and server/discover say it is the public key-less server', async () => { + const init = (await handle({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18' } }, noRun, surface))!.result as { instructions: string }; + expect(init.instructions).toContain('public, key-less'); + expect(init.instructions).toContain('npx storebound'); + const meta = { 'io.modelcontextprotocol/protocolVersion': '2026-07-28', 'io.modelcontextprotocol/clientCapabilities': {} }; + const d = (await handle({ jsonrpc: '2.0', id: 2, method: 'server/discover', params: { _meta: meta } }, noRun, surface))!.result as { instructions: string }; + expect(d.instructions).toContain('public, key-less'); + }); + test('CLI tools are not reachable', async () => { + for (const name of ['check', 'play_listing', 'owner_step', 'validate', 'api_get']) { + const r = await call(surface, name, {}); + expect(r.error?.message).toContain('Unknown tool'); + } + }); +}); + +describe('skills', () => { + const surface = publicSurface(); + test('skills_list names every skill of the package', async () => { + const r = await call(surface, 'skills_list', {}); + const skills = r.result!.structuredContent!.result.skills as { name: string; description: string }[]; + expect(skills.length).toBeGreaterThan(20); + expect(skills.find(s => s.name === 'store-pitfalls')!.description.length).toBeGreaterThan(20); + expect(skills.every(s => /^[a-z0-9-]+$/.test(s.name) && !s.description.includes('\n'))).toBe(true); + }); + test('skill_get returns the file text; bad names are refused', async () => { + const r = await call(surface, 'skill_get', { name: 'aso-basics' }); + expect(r.result!.isError).toBe(false); + expect(text(r)).toContain('name: aso-basics'); + for (const bad of ['../package', 'ASO-basics', 'no-such-skill', 'a/b', '']) expect((await call(surface, 'skill_get', { name: bad })).result!.isError).toBe(true); + expect((await call(surface, 'skill_get', {})).result!.isError).toBe(true); + expect((await call(surface, 'skill_get', { name: 'aso-basics', extra: 1 })).result!.isError).toBe(true); + }); +}); + +describe('pitfalls_search', () => { + const surface = publicSurface(); + test('finds sections, best first, at most 8', async () => { + const r = await call(surface, 'pitfalls_search', { query: 'keyword field length' }); + expect(r.result!.isError).toBe(false); + expect(text(r)).toMatch(/^## /); + expect(text(r).toLowerCase()).toContain('keyword'); + const m = r.result!.structuredContent!.result.matches as { score: number }[]; + expect(m.length).toBeLessThanOrEqual(8); + expect(m.map(x => x.score)).toEqual([...m.map(x => x.score)].sort((a, b) => b - a)); + expect(text(r).length).toBeLessThan(40_100); + }); + test('store filter, no match, bad input', async () => { + expect((await call(surface, 'pitfalls_search', { query: 'screenshots', store: 'play' })).result!.isError).toBe(false); + expect(text(await call(surface, 'pitfalls_search', { query: 'zzqqxxnotaword' }))).toContain('No pitfall'); + expect((await call(surface, 'pitfalls_search', { query: 'x', store: 'steam' })).result!.isError).toBe(true); + expect((await call(surface, 'pitfalls_search', { query: 'a' })).result!.isError).toBe(true); + expect((await call(surface, 'pitfalls_search', {})).result!.isError).toBe(true); + }); + test('pure parts', () => { + const md = '# T\n\n## One\nalpha beta\n\n## Two\nbeta beta beta google play\n'; + const s = sectionsOf(md); + expect(s.map(x => x.heading)).toEqual(['One', 'Two']); + expect(searchSections(s, 'beta')[0]!.heading).toBe('Two'); + expect(searchSections(s, 'beta', 'apple').map(x => x.heading)).toEqual(['One']); + expect(searchSections(s, ' ')).toEqual([]); + }); +}); + +describe('store_limits', () => { + const surface = publicSurface(); + test('numbers come from the code', async () => { + const all = (await call(surface, 'store_limits', {})).result!.structuredContent!.result; + expect(all.apple.textLimitsCharacters).toMatchObject({ name: 30, subtitle: 30, keywords: 100 }); + expect(all.play.textLimitsCharacters).toMatchObject({ title: 30, short: 80, full: 4000 }); + expect(JSON.stringify(all.apple.screenshots)).toContain('1290x2796'); + expect(JSON.stringify(all.play.screenshots)).toContain('1024x500'); + const apple = (await call(surface, 'store_limits', { store: 'apple' })).result!.structuredContent!.result; + expect(Object.keys(apple)).toEqual(['apple']); + expect((await call(surface, 'store_limits', { store: 'x' })).result!.isError).toBe(true); + }); +}); + +describe('listing_lint', () => { + const surface = publicSurface(); + test('apple: limits, repeats, spaces; only sent fields are judged', async () => { + const r = await call(surface, 'listing_lint', { store: 'apple', fields: { name: 'Pixel Garden', subtitle: 'Grow plants', keywords: 'garden, plants,tiny,pixel' } }); + expect(r.result!.isError).toBe(false); + const t = text(r); + expect(t).toContain('spaces around commas'); + expect(t).toContain('already indexed'); + expect(t).not.toContain('is required'); + const long = await call(surface, 'listing_lint', { store: 'apple', fields: { name: 'N'.repeat(31) } }); + expect(text(long)).toContain('ERROR name'); + expect(text(long)).toContain('31/30'); + }); + test('play: stuffing, claims, limits', async () => { + const full = Array(120).fill('puzzle').join(' ') + ' fun games to enjoy daily with friends'; + const r = await call(surface, 'listing_lint', { store: 'play', fields: { title: 'Best Puzzle', shortDescription: 'S'.repeat(81), fullDescription: full } }); + const t = text(r); + expect(t).toContain('shortDescription is 81 characters'); + expect(t).toContain('keyword stuffing'); + expect(t).toContain('"best"'); + }); + test('bad input', async () => { + expect((await call(surface, 'listing_lint', { store: 'apple', fields: {} })).result!.isError).toBe(true); + expect((await call(surface, 'listing_lint', { store: 'apple', fields: { title: 'x' } })).result!.isError).toBe(true); + expect((await call(surface, 'listing_lint', { store: 'apple', fields: { name: 5 } })).result!.isError).toBe(true); + expect((await call(surface, 'listing_lint', { store: 'apple', fields: { name: 'x'.repeat(5001) } })).result!.isError).toBe(true); + expect((await call(surface, 'listing_lint', { store: 'apple', fields: { name: 'x' }, locale: 'en US!' })).result!.isError).toBe(true); + expect((await call(surface, 'listing_lint', { fields: { name: 'x' } })).result!.isError).toBe(true); + }); +}); + +describe('aso_search (fake server only)', () => { + test('trims results, passes term, country and limit', async () => { + const fake = await fakeItunes(); + try { + const surface = publicSurface({ searchBase: fake.url }); + const r = await call(surface, 'aso_search', { term: 'pixel garden', country: 'DE', limit: 5 }); + expect(r.result!.isError).toBe(false); + const res = r.result!.structuredContent!.result.results as Record[]; + expect(res[0]).toEqual({ rank: 1, name: 'Example One', developer: 'Example Studio', id: 111, rating: 4.57, ratingCount: 1234, genre: 'Games' }); + expect(res[1]).toMatchObject({ id: 222, rating: null, ratingCount: 0 }); + expect(JSON.stringify(res)).not.toContain('com.example.one'); + expect(fake.queries[0]).toContain('term=pixel+garden'); + expect(fake.queries[0]).toContain('country=de'); + expect(fake.queries[0]).toContain('limit=5'); + expect(fake.queries[0]).toContain('entity=software'); + } finally { fake.close(); } + }); + test('bad input is refused before any request; a failing server is an error result', async () => { + const fake = await fakeItunes(); + try { + const surface = publicSurface({ searchBase: fake.url }); + for (const bad of [{}, { term: '' }, { term: 'x', country: 'usa' }, { term: 'x', limit: 0 }, { term: 'x', limit: 26 }, { term: 'x', limit: 1.5 }, { term: 'x', url: 'http://evil.example.com' }]) + expect((await call(surface, 'aso_search', bad)).result!.isError).toBe(true); + expect(fake.queries.length).toBe(0); + } finally { fake.close(); } + const dead = publicSurface({ searchBase: 'http://127.0.0.1:1/search' }); + const r = await call(dead, 'aso_search', { term: 'x' }); + expect(r.result!.isError).toBe(true); + expect(text(r)).toContain('Search failed'); + }); +}); + +describe('module design', () => { + test('mcp-public.ts has no process, runner, credential or cwd access', () => { + const src = readFileSync(new URL('../cli/mcp-public.ts', import.meta.url), 'utf8'); + expect(src).not.toMatch(/child_process|\.\/lib\/runner|\.\/lib\/rt'|\.\/lib\/credentials|\.\/lib\/broker|process\.cwd|process\.env|spawn|exec\(/); + }); + test('validatePublic', () => { + expect(validatePublic({ type: 'object', properties: { a: { type: 'string', maxLength: 2 } } }, { a: 'abc' })).toEqual(['a: at most 2 characters']); + expect(validatePublic({ type: 'object', properties: {} }, [])).toEqual(['arguments: must be an object']); + }); +}); + +describe('rate limit', () => { + test('window counts, retry-after, sweep', () => { + let t = 1_000_000; + const l = createLimiter(3, () => t); + expect([1, 2, 3].map(() => l.hit('a').ok)).toEqual([true, true, true]); + const over = l.hit('a'); + expect(over.ok).toBe(false); + expect(over.retryAfter).toBeGreaterThan(0); + expect(over.retryAfter).toBeLessThanOrEqual(60); + expect(l.hit('b').ok).toBe(true); + t += 61_000; + expect(l.hit('a').ok).toBe(true); + }); + test('client key: forwarded header only when the proxy is trusted', () => { + expect(clientKey('client-a, proxy-1', 'proxy-1', true)).toBe('client-a'); + expect(clientKey('client-a', 'proxy-1', false)).toBe('proxy-1'); + expect(clientKey(undefined, 'proxy-1', true)).toBe('proxy-1'); + }); +}); + +describe('http, public mode', () => { + const post = (port: number, body: unknown, headers: Record = {}) => + fetch(`http://127.0.0.1:${port}/mcp`, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body: typeof body === 'string' ? body : JSON.stringify(body) }); + const base = { host: '127.0.0.1', port: 0, roots: [], project: null, allowOrigins: [], auth: { kind: 'none' } as const }; + + test('no sign-in, any origin, CORS preflight, tools/list, /health, GET 405', async () => { + const s = await startHttp({ ...base, public: { rate: 100, trustProxy: false } }); + try { + const r = await post(s.port, { jsonrpc: '2.0', id: 1, method: 'tools/list' }, { origin: 'https://claude.example.com' }); + expect(r.status).toBe(200); + expect(r.headers.get('access-control-allow-origin')).toBe('*'); + expect(((await r.json()) as { result: { tools: unknown[] } }).result.tools.length).toBe(6); + const pre = await fetch(`http://127.0.0.1:${s.port}/mcp`, { method: 'OPTIONS', headers: { origin: 'https://claude.example.com', 'access-control-request-method': 'POST' } }); + expect(pre.status).toBe(204); + expect((await fetch(`http://127.0.0.1:${s.port}/health`)).status).toBe(200); + expect((await fetch(`http://127.0.0.1:${s.port}/mcp`)).status).toBe(405); + const c = await post(s.port, { jsonrpc: '2.0', id: 2, method: 'tools/call', params: { name: 'check', arguments: { project: '/' } } }); + expect(((await c.json()) as { error: { message: string } }).error.message).toContain('Unknown tool'); + expect((await post(s.port, { jsonrpc: '2.0', method: 'notifications/initialized' })).status).toBe(202); + } finally { s.close(); } + }); + + test('429 with Retry-After over the limit; X-Forwarded-For counts only with trustProxy', async () => { + const s = await startHttp({ ...base, public: { rate: 2, trustProxy: false } }); + try { + const ping = (h: Record = {}) => post(s.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, h); + expect((await ping({ 'x-forwarded-for': 'client-a' })).status).toBe(200); + expect((await ping({ 'x-forwarded-for': 'client-b' })).status).toBe(200); // not trusted: same client + const over = await ping({ 'x-forwarded-for': 'client-c' }); + expect(over.status).toBe(429); + expect(Number(over.headers.get('retry-after'))).toBeGreaterThan(0); + expect((await fetch(`http://127.0.0.1:${s.port}/health`)).status).toBe(200); // health is not limited + } finally { s.close(); } + const t = await startHttp({ ...base, public: { rate: 1, trustProxy: true } }); + try { + const ping = (ip: string) => post(t.port, { jsonrpc: '2.0', id: 1, method: 'ping' }, { 'x-forwarded-for': `${ip}, proxy-1` }); + expect((await ping('client-a')).status).toBe(200); + expect((await ping('client-b')).status).toBe(200); + expect((await ping('client-a')).status).toBe(429); + } finally { t.close(); } + }); + + test('body over 64 KB is refused; bad JSON is a parse error', async () => { + const s = await startHttp({ ...base, public: { rate: 100, trustProxy: false } }); + try { + const big = JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'ping', params: { pad: 'x'.repeat(PUBLIC_MAX_BODY) } }); + expect((await post(s.port, big)).status).toBe(413); + expect((await post(s.port, '{nope')).status).toBe(400); + } finally { s.close(); } + }); + + test('auth none needs public mode', async () => { + expect(() => startHttp({ ...base })).toThrow('only for --public'); + }); +}); From 96207688972b88b2fbee136370eeb7dff62171c8 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:05:53 +0700 Subject: [PATCH 10/73] mcp --http: SSE keepalive for long tool calls; public App Store search shares one 20-a-minute budget --- CHANGELOG.md | 1 + cli/mcp-http.ts | 23 +++++++++++++++++++---- cli/mcp-public.ts | 12 ++++++++++++ docs/mcp.md | 3 +++ tests/mcp-http.test.ts | 21 +++++++++++++++++++++ tests/mcp-public.test.ts | 9 +++++++++ 6 files changed, 65 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0102a95..7d04989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `mcp --http`: a `tools/call` that accepts `text/event-stream` gets SSE keepalive comments every 20 s and then its result, so long calls survive proxies that cut silent responses. The public server's App Store search keeps one budget of 20 calls a minute (Apple's limit). - `storebound mcp --http --public`: a public, key-less MCP server (no sign-in, no store credentials, no project folders, no child processes, read-only). Tools: `skills_list`, `skill_get`, `pitfalls_search`, `store_limits`, `listing_lint` and `aso_search` (the public iTunes Search API, the only network call). Rate limit per client (`--rate`, 429 with Retry-After; `--trust-proxy` for X-Forwarded-For), 64 KB request bodies, CORS preflight. docs/mcp.md. ## 0.8.58 · 2026-10-29 diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 124c3bc..3c74e13 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -37,6 +37,9 @@ import { runCommand } from './lib/runner'; export const DEFAULT_PORT = 7787; export const PUBLIC_PORT = 7788; const MAX_BODY = 4 * 1024 * 1024; +/** SSE comment line interval while a tool call runs (proxies cut silent responses). */ +export let SSE_KEEPALIVE_MS = 20_000; +export const setKeepaliveMs = (ms: number): void => { SSE_KEEPALIVE_MS = ms; }; /** Public mode: one JSON-RPC message of a read-only tool never needs more. */ export const PUBLIC_MAX_BODY = 64 * 1024; export const PUBLIC_DEFAULT_RATE = 60; @@ -213,10 +216,22 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu let msg: unknown; try { msg = JSON.parse(body); } catch { return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } }); } if (Array.isArray(msg) || typeof msg !== 'object' || msg === null) return send(res, 400, { jsonrpc: '2.0', id: null, error: { code: -32600, message: 'One JSON-RPC message per request' } }); - try { - const r = pub ? await handle(msg as never, noRun, pub.surface) : await answer(msg as Record, o); - return r ? send(res, 200, r) : send(res, 202); - } catch (e) { return send(res, 500, { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }); } + const work = (async () => { + try { return pub ? await handle(msg as never, noRun, pub.surface) : await answer(msg as Record, o); } + catch (e) { return { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }; } + })(); + // A tool call may run for minutes; a proxy (Cloudflare: 100 s) cuts a response that sends nothing. A client that + // accepts SSE gets the answer as one SSE event with a comment line every 20 s until then. + if ((msg as { method?: unknown }).method === 'tools/call' && /text\/event-stream/.test(String(req.headers.accept ?? ''))) { + res.writeHead(200, { 'content-type': 'text/event-stream', 'cache-control': 'no-store', 'x-accel-buffering': 'no' }); + res.write(': started\n\n'); + const beat = setInterval(() => res.write(': keepalive\n\n'), SSE_KEEPALIVE_MS); + const r = await work.finally(() => clearInterval(beat)); + res.end(`event: message\ndata: ${JSON.stringify(r)}\n\n`); + return; + } + const r = await work; + return r ? send(res, 200, r) : send(res, 202); }); // a tool call can run for many minutes (check on a big project, uploads): Node's 300 s request timeout would cut it server.requestTimeout = 0; diff --git a/cli/mcp-public.ts b/cli/mcp-public.ts index 81387b4..75853ba 100644 --- a/cli/mcp-public.ts +++ b/cli/mcp-public.ts @@ -190,7 +190,19 @@ export function lintListing(store: 'apple' | 'play', fields: Record= SEARCH_PER_MIN) return { ok: false, retryAfter: Math.ceil((searchTimes[0]! + 60_000 - now) / 1000) }; + searchTimes.push(now); + return { ok: true }; +} + export async function searchApps(term: string, country: string, limit: number, base: string, f: typeof fetch): Promise<{ results: Record[] }> { + const b = searchBudget(); + if (!b.ok) throw new Error(`the App Store search is busy (Apple allows ${SEARCH_PER_MIN} calls a minute for this server): try again in ${b.retryAfter} s`); const url = `${base}${base.includes('?') ? '&' : '?'}${new URLSearchParams({ term, country: country.toLowerCase(), media: 'software', entity: 'software', limit: String(limit) })}`; const r = await f(url, { signal: AbortSignal.timeout(10_000), headers: { accept: 'application/json' } }); if (!r.ok) throw new Error(`the App Store search answered ${r.status}`); diff --git a/docs/mcp.md b/docs/mcp.md index e78393a..142dd27 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -56,6 +56,9 @@ refused unless `--allow-origin` names it. scope; docs/credential-broker.md). They reach each tool call as `STOREBOUND_PROFILE__*` env, held in memory for 10 minutes and never written. A project picks its profile as usual (the config's `account`). - `project` may also be a folder name under the roots (a shared server keeps its checkouts there). +- Long calls: a `tools/call` whose request accepts `text/event-stream` is answered as SSE, with a comment line every + 20 s until the result arrives as one `message` event, so a proxy that cuts silent responses (Cloudflare: 100 s) + keeps the connection. Other requests get plain JSON. - `/health` answers `{ ok, version }` without auth. diff --git a/tests/mcp-http.test.ts b/tests/mcp-http.test.ts index 7c11426..2fc8ed0 100644 --- a/tests/mcp-http.test.ts +++ b/tests/mcp-http.test.ts @@ -138,3 +138,24 @@ describe('read-only and broker profiles', () => { } finally { srv.close(); } }); }); + +describe('long calls over SSE', () => { + test('a tools/call that accepts text/event-stream gets keepalive comments, then the answer as one event', async () => { + const { setKeepaliveMs } = await import('../cli/mcp-http'); + setKeepaliveMs(50); + const s = await startHttp({ host: '127.0.0.1', port: 0, roots: [root], project: app, allowOrigins: [], auth: { kind: 'token', token: 'b'.repeat(64) } }); + try { + const r = await fetch(`http://127.0.0.1:${s.port}/mcp`, { method: 'POST', + headers: { authorization: `Bearer ${'b'.repeat(64)}`, 'content-type': 'application/json', accept: 'application/json, text/event-stream' }, + body: JSON.stringify({ jsonrpc: '2.0', id: 9, method: 'tools/call', params: { name: 'check', arguments: { project: '/nope' } } }) }); + expect(r.headers.get('content-type')).toBe('text/event-stream'); + const text = await r.text(); + expect(text.startsWith(': started')).toBe(true); + const data = /event: message\ndata: (.*)\n\n$/.exec(text)!; + expect(JSON.parse(data[1]!)).toMatchObject({ id: 9, result: { isError: true } }); + // JSON for everything else + const p = await fetch(`http://127.0.0.1:${s.port}/mcp`, { method: 'POST', headers: { authorization: `Bearer ${'b'.repeat(64)}`, 'content-type': 'application/json', accept: 'application/json, text/event-stream' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'ping' }) }); + expect(p.headers.get('content-type')).toBe('application/json'); + } finally { s.close(); setKeepaliveMs(20_000); } + }); +}); diff --git a/tests/mcp-public.test.ts b/tests/mcp-public.test.ts index 2846cb8..c0b141e 100644 --- a/tests/mcp-public.test.ts +++ b/tests/mcp-public.test.ts @@ -268,3 +268,12 @@ describe('http, public mode', () => { expect(() => startHttp({ ...base })).toThrow('only for --public'); }); }); + +test('App Store search keeps one shared budget of 20 calls a minute', async () => { + const { searchBudget } = await import('../cli/mcp-public'); + const t0 = Date.now() + 3_600_000; // after any real call earlier in this file + let last: ReturnType = { ok: true }; + for (let i = 0; i < 25; i++) last = searchBudget(t0 + i); + expect(last.ok).toBe(false); + expect(searchBudget(t0 + 61_000).ok).toBe(true); +}); From 3b1c6160b5f0cda15a9efebbdb78832ddb5fed11 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:06:22 +0700 Subject: [PATCH 11/73] docs: SSE keepalive for long tool calls --- docs/mcp.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/mcp.md b/docs/mcp.md index 142dd27..08a17ff 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -56,6 +56,9 @@ refused unless `--allow-origin` names it. scope; docs/credential-broker.md). They reach each tool call as `STOREBOUND_PROFILE__*` env, held in memory for 10 minutes and never written. A project picks its profile as usual (the config's `account`). - `project` may also be a folder name under the roots (a shared server keeps its checkouts there). +- Long calls: a `tools/call` whose request accepts `text/event-stream` is answered as SSE, with a comment line every + 20 s until the result arrives as one `message` event, so a proxy that cuts silent responses (Cloudflare: 100 s) + keeps the connection. Other requests get plain JSON. - Long calls: a `tools/call` whose request accepts `text/event-stream` is answered as SSE, with a comment line every 20 s until the result arrives as one `message` event, so a proxy that cuts silent responses (Cloudflare: 100 s) keeps the connection. Other requests get plain JSON. From 17f57c6fb6d2deae38aaadca6e7a7ce52bcb3ac8 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:10:28 +0700 Subject: [PATCH 12/73] storebound 0.8.59: version in package.json and every copy, CHANGELOG 0.8.59 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 43b2bab..1403a3f 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.58", + "version": "0.8.59", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 51296bb..9ef75b7 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.58", + "version": "0.8.59", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 00cc3f1..485e4df 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.58", + "version": "0.8.59", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d04989..2a82ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.59 · 2026-10-29 + - `mcp --http`: a `tools/call` that accepts `text/event-stream` gets SSE keepalive comments every 20 s and then its result, so long calls survive proxies that cut silent responses. The public server's App Store search keeps one budget of 20 calls a minute (Apple's limit). - `storebound mcp --http --public`: a public, key-less MCP server (no sign-in, no store credentials, no project folders, no child processes, read-only). Tools: `skills_list`, `skill_get`, `pitfalls_search`, `store_limits`, `listing_lint` and `aso_search` (the public iTunes Search API, the only network call). Rate limit per client (`--rate`, 429 with Retry-After; `--trust-proxy` for X-Forwarded-For), 64 KB request bodies, CORS preflight. docs/mcp.md. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 7b9f632..4c36fe4 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.58", + "version": "0.8.59", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 496304a..7a2ea0a 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.58" +version = "0.8.59" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 05e2417..4d8dd15 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.58" +version = "0.8.59" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index deaff30..8d3540d 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.58", + "version": "0.8.59", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index fface3f..1eb98a9 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.58", + "version": "0.8.59", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 59d9754..9570442 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.58", + "version": "0.8.59", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 96ec7ba60f0c9abea5937ba6203f2614dc2419e4 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:40:29 +0700 Subject: [PATCH 13/73] desktop-release: sign by key path only (a TAURI_SIGNING_PRIVATE_KEY in the env made the signer refuse both) --- tools/desktop-release.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/desktop-release.ts b/tools/desktop-release.ts index 21de8e1..974fb6c 100644 --- a/tools/desktop-release.ts +++ b/tools/desktop-release.ts @@ -220,7 +220,11 @@ function updaterKey(): string { function signFile(file: string): string { const key = updaterKey(); rmSync(`${file}.sig`, { force: true }); - run(['bunx', 'tauri', 'signer', 'sign', '-f', key, '-p', '', file], { cwd: APP_DIR, env: { ...process.env, TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '' } }); + // the key goes by path only: a TAURI_SIGNING_PRIVATE_KEY left in the env (a bundle step, the shell) made the signer + // refuse "--private-key-path cannot be used with --private-key" (0.8.59) + const env = { ...process.env, TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '' }; + delete env.TAURI_SIGNING_PRIVATE_KEY; delete env.TAURI_SIGNING_PRIVATE_KEY_PATH; + run(['bunx', 'tauri', 'signer', 'sign', '-f', key, '-p', '', file], { cwd: APP_DIR, env }); const sig = readFileSync(`${file}.sig`, 'utf8').trim(); const v = verifySig(readFileSync(file), sig, confPubkey()); if (!v.ok) fail(`${basename(file)}: fresh signature does not verify (${v.reason})`); From 02435de9664f3635f4141252e34769bbd8ad0f7b Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:40:56 +0700 Subject: [PATCH 14/73] desktop-release: sign by key path only (a TAURI_SIGNING_PRIVATE_KEY in the env made the signer refuse both) --- tools/desktop-release.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/desktop-release.ts b/tools/desktop-release.ts index 974fb6c..fb60ab3 100644 --- a/tools/desktop-release.ts +++ b/tools/desktop-release.ts @@ -222,7 +222,7 @@ function signFile(file: string): string { rmSync(`${file}.sig`, { force: true }); // the key goes by path only: a TAURI_SIGNING_PRIVATE_KEY left in the env (a bundle step, the shell) made the signer // refuse "--private-key-path cannot be used with --private-key" (0.8.59) - const env = { ...process.env, TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '' }; + const env: Record = { ...process.env, TAURI_SIGNING_PRIVATE_KEY_PASSWORD: '' }; delete env.TAURI_SIGNING_PRIVATE_KEY; delete env.TAURI_SIGNING_PRIVATE_KEY_PATH; run(['bunx', 'tauri', 'signer', 'sign', '-f', key, '-p', '', file], { cwd: APP_DIR, env }); const sig = readFileSync(`${file}.sig`, 'utf8').trim(); From 0ea7292164b74861b810c88349516a8a7c82569a Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:41:40 +0700 Subject: [PATCH 15/73] release --resume: a fixed tools/desktop-release.ts may be uncommitted too --- tools/release.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/release.ts b/tools/release.ts index 3caac77..016d91f 100644 --- a/tools/release.ts +++ b/tools/release.ts @@ -278,8 +278,8 @@ async function main(): Promise { const remote = remoteSessionReason(process.env, sh(['launchctl', 'managername'], { allowFail: true }).trim()); if (remote) fail(`${remote}: signing and notarization need the owner's logged-in macOS session`); if (!existsSync(join(KEYS, 'updater.key'))) fail(`no updater key in ${KEYS.replace(HOME, '~')}`); - // --resume may run with a fixed release tool (tools/release*.ts), which is not part of what ships - const dirty = sh(['git', 'status', '--porcelain']).split('\n').filter(l => l.trim() && !(resume && /^ M tools\/release(-candidate)?\.ts$/.test(l))); + // --resume may run with a fixed release tool (tools/release*.ts, tools/desktop-release.ts), which is not part of what ships + const dirty = sh(['git', 'status', '--porcelain']).split('\n').filter(l => l.trim() && !(resume && /^ M tools\/(desktop-)?release(-candidate)?\.ts$/.test(l))); if (dirty.length) fail('the checkout has uncommitted changes'); sh(['git', 'fetch', '--quiet', 'origin', 'main', '--tags']); const head = sh(['git', 'rev-parse', 'HEAD']).trim(); From ab69ce020c29558ab484e83c49b88e6a52c28329 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:45:18 +0700 Subject: [PATCH 16/73] play build: absolute --dir stays absolute; gradlew without exec bit is made executable --- CHANGELOG.md | 2 ++ cli/lib/gradle.ts | 5 +++-- cli/lib/web-assets.ts | 4 ++-- cli/play/build.ts | 7 ++++++- tests/gradle-dir.test.ts | 16 ++++++++++++++++ 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 tests/gradle-dir.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a82ef1..9825741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- `play build`: an absolute `--dir` / `play.build.dir` stays absolute (it was taken as a folder under the project and lost its leading slash); a `gradlew` without the exec bit (committed from Windows) is made executable with a note to commit the mode. The desktop release signs by key path only. + ## 0.8.59 · 2026-10-29 - `mcp --http`: a `tools/call` that accepts `text/event-stream` gets SSE keepalive comments every 20 s and then its result, so long calls survive proxies that cut silent responses. The public server's App Store search keeps one budget of 20 calls a minute (Apple's limit). diff --git a/cli/lib/gradle.ts b/cli/lib/gradle.ts index 9d868bc..8d14617 100644 --- a/cli/lib/gradle.ts +++ b/cli/lib/gradle.ts @@ -3,7 +3,7 @@ // properties through ORG_GRADLE_PROJECT_* variables, so passwords never appear on a command line), and read // package / versionCode / versionName back from the built AAB (its manifest is protocol buffers, aapt2 format). import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'; -import { join, relative } from 'node:path'; +import { join, relative, resolve } from 'node:path'; import type { AndroidSigning } from './credentials'; import * as rt from './rt'; import { zipEntries, zipRead } from './zip'; @@ -38,7 +38,8 @@ export function pickGradle(root: string, cfg: PlayBuildConfig = {}): GradleTarge : ['capacitor.config.ts', 'capacitor.config.json', 'capacitor.config.js'].some(f => existsSync(join(root, f))) ? 'capacitor' : (() => { try { const p = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); return !!(p.dependencies?.['react-native'] ?? p.devDependencies?.['react-native']); } catch { return false; } })() ? 'react-native' : 'native'; - const dirs = cfg.dir ? [join(root, cfg.dir)] : [join(root, 'android'), root]; + // resolve, not join: an absolute play.build.dir / --dir stays absolute (join made /Users/... a folder under the root) + const dirs = cfg.dir ? [resolve(root, cfg.dir)] : [join(root, 'android'), root]; let dir = dirs.find(isGradleDir); if (!dir) throw new Error(`no Gradle project (settings.gradle) in ${dirs.map(d => relative(root, d) || '.').join(' or ')}: set play.build.dir${framework === 'capacitor' ? ' (or npx cap add android)' : ''}`); const unity = existsSync(join(dir, 'launcher')) && existsSync(join(dir, 'unityLibrary')); diff --git a/cli/lib/web-assets.ts b/cli/lib/web-assets.ts index 638b669..83d0179 100644 --- a/cli/lib/web-assets.ts +++ b/cli/lib/web-assets.ts @@ -14,7 +14,7 @@ // The comparison (webStaleness) and the capacitor config reading (webDirOf) are pure. import { createHash } from 'node:crypto'; import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'; -import { dirname, join, relative, sep } from 'node:path'; +import { dirname, join, relative, resolve, sep } from 'node:path'; import type { ShipConfig } from './config'; import { log, warn } from './log'; import { pump } from './runner'; @@ -89,7 +89,7 @@ export function capacitorCandidates(root: string): string[] { */ export function capacitorProject(root: string, hint?: string): CapProject | null { if (hint) { - for (let d = join(root, hint); ; d = dirname(d)) { + for (let d = resolve(root, hint); ; d = dirname(d)) { const rel = relative(root, d); if (rel.startsWith('..')) break; const c = capAt(root, rel.split(sep).join('/')); diff --git a/cli/play/build.ts b/cli/play/build.ts index 01e9155..cf87d69 100644 --- a/cli/play/build.ts +++ b/cli/play/build.ts @@ -14,7 +14,7 @@ // Before Gradle runs, the app module's build file must read -PversionCode / -PversionName in defaultConfig (a literal // or an env var keeps the AAB at that value; android.injected.version.* does not override it for bundleRelease): a // warning with the exact line to use. After the build, an AAB whose versionCode is not the planned one is a hard stop. -import { copyFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'; +import { chmodSync, copyFileSync, existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs'; import { join, relative } from 'node:path'; import { androidSigning } from '../lib/credentials'; import type { Ctx } from '../lib/ctx'; @@ -108,6 +108,11 @@ export async function run(ctx: Ctx): Promise { shipPhase('build', `${plan.task}, versionCode ${code || '?'}`); const started = Date.now(); mkdirSync(out, { recursive: true }); + // a gradlew committed from Windows has no exec bit: macOS / Linux then say "Executable not found: ./gradlew" + if (hasWrapper && process.platform !== 'win32') { + const w = join(t.dir, 'gradlew'); + if ((statSync(w).mode & 0o111) === 0) { chmodSync(w, statSync(w).mode | 0o755); log(TAG, `${relative(root, w)} had no exec bit (committed from Windows?): made it executable; commit it with git update-index --chmod=+x`); } + } const p = rt.spawn(argv, { cwd, stdout: 'pipe', stderr: 'pipe', env: { ...process.env, ...androidSdkEnv(sdk), ...signingEnv(signing) } }); const lines: string[] = []; const each = (line: string): void => { diff --git a/tests/gradle-dir.test.ts b/tests/gradle-dir.test.ts new file mode 100644 index 0000000..ebb5836 --- /dev/null +++ b/tests/gradle-dir.test.ts @@ -0,0 +1,16 @@ +import { expect, test } from 'bun:test'; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { pickGradle } from '../cli/lib/gradle'; + +test('an absolute play.build.dir / --dir stays absolute (it lost its leading slash under the root)', () => { + const base = mkdtempSync(join(tmpdir(), 'gdir-')); + try { + const root = join(base, 'store'), android = join(base, 'other', 'apps', 'native', 'android'); + mkdirSync(root, { recursive: true }); mkdirSync(join(android, 'app'), { recursive: true }); + writeFileSync(join(android, 'settings.gradle'), "include ':app'\n"); + expect(resolve(pickGradle(root, { dir: android }).dir)).toBe(resolve(android)); + expect(resolve(pickGradle(root, { dir: '../other/apps/native/android' }).dir)).toBe(resolve(android)); + } finally { rmSync(base, { recursive: true, force: true }); } +}); From f5296cc9e95c85657be2fa6b64c80260123a4df6 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:54:05 +0700 Subject: [PATCH 17/73] play release --dry: no bundle upload into a discarded edit (a long upload outlived it: edit expired); shows the planned tracks --- CHANGELOG.md | 1 + cli/play/release.ts | 9 +++++++++ tests/idempotency.test.ts | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9825741..96fafa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `play release --dry` uploads nothing: it names the versionCode it would upload and the track changes it would make (the bundle went into a discarded edit, and a long upload could outlive the edit: "This edit has expired"). - `play build`: an absolute `--dir` / `play.build.dir` stays absolute (it was taken as a folder under the project and lost its leading slash); a `gradlew` without the exec bit (committed from Windows) is made executable with a note to commit the mode. The desktop release signs by key path only. ## 0.8.59 · 2026-10-29 diff --git a/cli/play/release.ts b/cli/play/release.ts index b1715e2..7ba7c8a 100644 --- a/cli/play/release.ts +++ b/cli/play/release.ts @@ -82,12 +82,20 @@ export async function run(ctx: Ctx): Promise { } let code = fixed ?? ''; let uploaded = false; + // a dry run never uploads: the bundle would go into an edit that is thrown away (14 MB for nothing, and a long + // upload can outlive the edit: "This edit has expired"); its tracks are shown, not PUT (Play refuses a track + // with a versionCode the edit does not have) + let planOnly = false; if (aab) { // a versionCode Play already has (an earlier run uploaded it) is reused, never uploaded twice const info = aabInfo(aab); if ((await usedVersionCodes(play, id)).includes(info.versionCode)) { code = String(info.versionCode); log('play', `versionCode ${code} is on Play already: not uploaded again`); + } else if (a.has('dry')) { + code = String(info.versionCode); + planOnly = true; + log('play', `dry run: would upload ${aab} (${(statSync(aab).size / 1048576).toFixed(1)} MB, versionCode ${code}); not uploaded`); } else { shipPhase('upload', `uploading ${aab}`, 0); log('play', `uploading ${aab} (${(statSync(aab).size / 1048576).toFixed(1)} MB), this can take minutes`); @@ -108,6 +116,7 @@ export async function run(ctx: Ctx): Promise { if (t.status === 'inProgress') release.userFraction = Number(fraction ?? 0.1); const cur = (await play.call<{ releases?: PlayTrackRelease[] }>('GET', `${play.API}/edits/${id}/tracks/${t.track}`).catch(() => ({ releases: [] }))).releases ?? []; if (sameRelease(cur, release)) { log('play', `${t.track}: already ${t.status} ${code}, unchanged`); continue; } + if (planOnly) { log('play', `dry run: ${t.track} <- ${code} (${t.status}, notes in ${notes.length} languages)`); changed++; continue; } await play.call('PUT', `${play.API}/edits/${id}/tracks/${t.track}`, { track: t.track, releases: [release] }); changed++; log('play', `${t.track} <- ${code} (${t.status}, notes in ${notes.length} languages)`); diff --git a/tests/idempotency.test.ts b/tests/idempotency.test.ts index 39d22af..49f3775 100644 --- a/tests/idempotency.test.ts +++ b/tests/idempotency.test.ts @@ -573,6 +573,13 @@ describe('listing, appinfo, data safety and the owner commands: a second run wri expect(s.play.committed).toHaveLength(1); }); + test('play release --dry: no upload, no track PUT (the bundle went into a discarded edit; a long upload outlived it: "This edit has expired")', async () => { + const p = project(CONFIG, { 'store/listing.md': LISTING, 'build/android/app.aab': makeAab('com.example.notes', 43) }); + const r = await twice(() => playRelease(p.ctx([join(p.root, 'build/android/app.aab'), '--internal', 'completed', '--dry']))); + expect(r.first.filter(x => x.includes('/bundles') || x.startsWith('PUT '))).toEqual([]); + expect(s.play.committed).toHaveLength(0); + }); + test('prices import (Play): changed regions written once, then the diff is empty', async () => { const p = project({ ...CONFIG, products: [CONFIG.products![0]!] }, { 'store/prices.csv': 'product,store,region,currency,price\ncom.example.notes.pro,play,DE,EUR,3.49\n' }); await capture(() => playProducts(p.ctx([]))); From 6ebb6560183edee9a26e7d3906d2691c77ca8f59 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 19:59:49 +0700 Subject: [PATCH 18/73] apple listing: a new version inherits the previous version's release type when apple.releaseType is unset; warn when the config differs --- CHANGELOG.md | 1 + cli/apple/listing.ts | 1 + cli/lib/listing-plan.ts | 14 ++++++++++++-- tests/listing-plan.test.ts | 2 +- tests/release-type-inherit.test.ts | 16 ++++++++++++++++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/release-type-inherit.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 96fafa0..cce219c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `apple listing` creates a new version with the release type of the newest version before it (MANUAL or AFTER_APPROVAL) when `apple.releaseType` is not set; a first version stays MANUAL. The plan names where the type came from, and warns when `apple.releaseType` differs from the previous version's. - `play release --dry` uploads nothing: it names the versionCode it would upload and the track changes it would make (the bundle went into a discarded edit, and a long upload could outlive the edit: "This edit has expired"). - `play build`: an absolute `--dir` / `play.build.dir` stays absolute (it was taken as a folder under the project and lost its leading slash); a `gradlew` without the exec bit (committed from Windows) is made executable with a note to commit the mode. The desktop release signs by key path only. diff --git a/cli/apple/listing.ts b/cli/apple/listing.ts index 698b799..9649aa9 100644 --- a/cli/apple/listing.ts +++ b/cli/apple/listing.ts @@ -157,6 +157,7 @@ export function listingPlanLines(p: AppleListingPlan): string[] { const v = p.versionPlan; const out = [`Version ${p.version} (${platformLabel(p.platform)}; App Store Connect has: ${v.existing.length ? v.existing.map(x => `${x.versionString} ${x.state} ${platformLabel(x.platform)}`).join(', ') : `no ${platformLabel(p.platform)} version yet`})`]; out.push(` ${v.action === 'refuse' ? 'REFUSE' : v.action.toUpperCase()}: ${v.reason}`); + if (v.warning) out.push(` WARN: ${v.warning}`); for (const ch of v.changes) out.push(` ${ch.field}: ${v.action === 'create' ? short(ch.to) : `${short(ch.from)} -> ${short(ch.to)}`}`); if (p.build) out.push(`Build: ${p.build.action === 'refuse' ? 'REFUSE: ' : ''}${p.build.reason}`); out.push(`App info ${p.appInfo.state ? `(${p.appInfo.state})` : ''}: name, subtitle, privacy policy URL per locale · ${counts(p.appInfo.locales)}`); diff --git a/cli/lib/listing-plan.ts b/cli/lib/listing-plan.ts index 40edf0c..d6bb289 100644 --- a/cli/lib/listing-plan.ts +++ b/cli/lib/listing-plan.ts @@ -38,6 +38,8 @@ export interface VersionPlan { /** The editable version that is kept or updated. */ id?: string; reason: string; + /** Said in the dry run and the real run (e.g. a release type that differs from the previous version's). */ + warning?: string; existing: VersionInfo[]; changes: FieldDiff[]; attributes: Record; @@ -103,9 +105,17 @@ export function planVersion(rows: { id: string; attributes: Record = { platform, versionString: want, copyright: attrs.copyright, releaseType: attrs.releaseType ?? 'MANUAL' }; + // without apple.releaseType a new version keeps the release type of the newest one before it (Acme 2026-10-29: an + // app the owner set to release after approval got a MANUAL 2.0.2 and would have sat unreleased); a first version is MANUAL + const prev = others.slice().sort((a, b) => compareVersions(b.versionString, a.versionString))[0]; + const prevType = prev ? rows.find(r => r.id === prev.id)?.attributes.releaseType : undefined; + const inherited = !attrs.releaseType && typeof prevType === 'string' && ['MANUAL', 'AFTER_APPROVAL'].includes(prevType) ? prevType : undefined; + const attributes: Record = { platform, versionString: want, copyright: attrs.copyright, releaseType: attrs.releaseType ?? inherited ?? 'MANUAL' }; if (attributes.releaseType === 'SCHEDULED' && attrs.earliestReleaseDate) attributes.earliestReleaseDate = attrs.earliestReleaseDate; - return { ...base, action: 'create', reason: `create version ${want} (no editable ${PLATFORM_LABEL[platform] ?? platform} version)`, changes: Object.entries(attributes).map(([field, to]) => ({ field, from: null, to })), attributes }; + const why = attrs.releaseType ? 'apple.releaseType' : inherited ? `as version ${prev!.versionString}` : prev ? `version ${prev.versionString} has ${String(prevType ?? 'no readable type')}` : 'first version'; + return { ...base, action: 'create', reason: `create version ${want} (no editable ${PLATFORM_LABEL[platform] ?? platform} version), release type ${attributes.releaseType} (${why})`, + changes: Object.entries(attributes).map(([field, to]) => ({ field, from: null, to })), attributes, + ...(attrs.releaseType && typeof prevType === 'string' && prevType !== attrs.releaseType ? { warning: `release type ${attrs.releaseType} (apple.releaseType) differs from version ${prev!.versionString} (${prevType})` } : {}) }; } // ---- translation drafts ---- diff --git a/tests/listing-plan.test.ts b/tests/listing-plan.test.ts index 638b555..a3acfbf 100644 --- a/tests/listing-plan.test.ts +++ b/tests/listing-plan.test.ts @@ -101,7 +101,7 @@ describe('apple listing plan', () => { const p = project({ ...BASE, play: undefined }, { 'store/appstore.md': APPLE_MD }); const calls = ascRoutes([v('v-0', '1.0.0', 'READY_FOR_DISTRIBUTION')]); const j = jsonOut((await capture(() => appleListing(p.ctx(['--version', '1.1.0', '--dry', '--json'])))).out) as any; - expect(j.versionPlan).toMatchObject({ action: 'create', reason: 'create version 1.1.0 (no editable iOS version)' }); + expect(j.versionPlan).toMatchObject({ action: 'create', reason: expect.stringContaining('create version 1.1.0 (no editable iOS version), release type MANUAL') }); expect(j.versionLocales).toBeNull(); await capture(() => appleListing(p.ctx(['--version', '1.1.0']))); expect(methods(calls).filter(m => m.includes('appStoreVersion'))).toEqual(['POST /v1/appStoreVersions', 'POST /v1/appStoreVersionLocalizations']); diff --git a/tests/release-type-inherit.test.ts b/tests/release-type-inherit.test.ts new file mode 100644 index 0000000..f2a8f76 --- /dev/null +++ b/tests/release-type-inherit.test.ts @@ -0,0 +1,16 @@ +import { expect, test } from 'bun:test'; +import { planVersion } from '../cli/lib/listing-plan'; + +const row = (id: string, versionString: string, state: string, releaseType: string) => ({ id, attributes: { versionString, appStoreState: state, appVersionState: state, platform: 'IOS', releaseType } }); + +test('a new version keeps the release type of the newest version before it unless apple.releaseType is set', () => { + const rows = [row('v1', '2.0.0', 'READY_FOR_DISTRIBUTION', 'MANUAL'), row('v2', '2.0.1', 'READY_FOR_DISTRIBUTION', 'AFTER_APPROVAL')]; + const p = planVersion(rows, '2.0.2', { copyright: 'c' }, 'IOS'); + expect(p.action).toBe('create'); + expect(p.attributes.releaseType).toBe('AFTER_APPROVAL'); + expect(p.reason).toContain('as version 2.0.1'); + const set = planVersion(rows, '2.0.2', { copyright: 'c', releaseType: 'MANUAL' }, 'IOS'); + expect(set.attributes.releaseType).toBe('MANUAL'); + expect(set.warning).toContain('differs from version 2.0.1 (AFTER_APPROVAL)'); + expect(planVersion([], '1.0.0', { copyright: 'c' }, 'IOS').attributes.releaseType).toBe('MANUAL'); +}); From 1c64320b6564428b990b4acde4956d2ab0d16a91 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 20:04:08 +0700 Subject: [PATCH 19/73] desktop-release: a fixed release tool left uncommitted for release --resume does not make the build dirty --- tools/desktop-release.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/desktop-release.ts b/tools/desktop-release.ts index fb60ab3..0db4cb6 100644 --- a/tools/desktop-release.ts +++ b/tools/desktop-release.ts @@ -285,7 +285,8 @@ function writeVersionFiles(out: string, manifest: Manifest): void { function gitState(): { commit: string; dirty: boolean } { const commit = run(['git', 'rev-parse', 'HEAD'], { cwd: ROOT }).out.trim(); - const dirty = run(['git', 'status', '--porcelain'], { cwd: ROOT }).out.trim().length > 0; + // a fixed release tool (release --resume after a tool bug) is not part of what ships: the build stays clean + const dirty = run(['git', 'status', '--porcelain'], { cwd: ROOT }).out.split('\n').some(l => l.trim() && !/^ M tools\/(desktop-)?release(-candidate)?\.ts$/.test(l)); return { commit, dirty }; } From edbcdad15d72dd44fb6a22b6158813ea66342c31 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 20:21:52 +0700 Subject: [PATCH 20/73] gradle: comment without a home path --- cli/lib/gradle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/lib/gradle.ts b/cli/lib/gradle.ts index 8d14617..be988b6 100644 --- a/cli/lib/gradle.ts +++ b/cli/lib/gradle.ts @@ -38,7 +38,7 @@ export function pickGradle(root: string, cfg: PlayBuildConfig = {}): GradleTarge : ['capacitor.config.ts', 'capacitor.config.json', 'capacitor.config.js'].some(f => existsSync(join(root, f))) ? 'capacitor' : (() => { try { const p = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); return !!(p.dependencies?.['react-native'] ?? p.devDependencies?.['react-native']); } catch { return false; } })() ? 'react-native' : 'native'; - // resolve, not join: an absolute play.build.dir / --dir stays absolute (join made /Users/... a folder under the root) + // resolve, not join: an absolute play.build.dir / --dir stays absolute (join made an absolute path a folder under the root) const dirs = cfg.dir ? [resolve(root, cfg.dir)] : [join(root, 'android'), root]; let dir = dirs.find(isGradleDir); if (!dir) throw new Error(`no Gradle project (settings.gradle) in ${dirs.map(d => relative(root, d) || '.').join(' or ')}: set play.build.dir${framework === 'capacitor' ? ' (or npx cap add android)' : ''}`); From e185b61c8eb72a0cbb5532b1fadcf819f7fd9bd7 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 20:24:54 +0700 Subject: [PATCH 21/73] storebound 0.8.60: version in package.json and every copy, CHANGELOG 0.8.60 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1403a3f..0737002 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.59", + "version": "0.8.60", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 9ef75b7..7f422c2 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.59", + "version": "0.8.60", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 485e4df..129826f 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.59", + "version": "0.8.60", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index cce219c..7db9e73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.60 · 2026-10-29 + - `apple listing` creates a new version with the release type of the newest version before it (MANUAL or AFTER_APPROVAL) when `apple.releaseType` is not set; a first version stays MANUAL. The plan names where the type came from, and warns when `apple.releaseType` differs from the previous version's. - `play release --dry` uploads nothing: it names the versionCode it would upload and the track changes it would make (the bundle went into a discarded edit, and a long upload could outlive the edit: "This edit has expired"). - `play build`: an absolute `--dir` / `play.build.dir` stays absolute (it was taken as a folder under the project and lost its leading slash); a `gradlew` without the exec bit (committed from Windows) is made executable with a note to commit the mode. The desktop release signs by key path only. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 4c36fe4..81ca07b 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.59", + "version": "0.8.60", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 7a2ea0a..2f3a701 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.59" +version = "0.8.60" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 4d8dd15..1ddfab9 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.59" +version = "0.8.60" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 8d3540d..6f03b36 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.59", + "version": "0.8.60", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 1eb98a9..01ee8b9 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.59", + "version": "0.8.60", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 9570442..9667245 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.59", + "version": "0.8.60", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 1abd0936c3dbe2cc0bd2fe8bce1a6662492839f3 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 22:33:59 +0700 Subject: [PATCH 22/73] testflight: description keys by language id or App Store locale, unknown keys are a config error, primary-locale check before Beta App Review --- CHANGELOG.md | 1 + cli/apple/testflight.ts | 10 ++++++++++ cli/lib/config.ts | 2 +- cli/lib/testflight.ts | 10 ++++++++-- tests/helpers/fake-stores.ts | 1 + tests/tf-description-locale.test.ts | 14 ++++++++++++++ 6 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 tests/tf-description-locale.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db9e73..39ef0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- TestFlight: `apple.testflight.description` takes a language id or its App Store locale (`en` or `en-US`; an `en-US` key was skipped silently), `check` names an unknown key, and `distribute --submit-review` stops (dry run: warns) when the app's primary locale has no beta localization (Beta App Review answers 422 MISSING_BETA_APP_LOCALIZATION). ## 0.8.60 · 2026-10-29 - `apple listing` creates a new version with the release type of the newest version before it (MANUAL or AFTER_APPROVAL) when `apple.releaseType` is not set; a first version stays MANUAL. The plan names where the type came from, and warns when `apple.releaseType` differs from the previous version's. diff --git a/cli/apple/testflight.ts b/cli/apple/testflight.ts index 8f70951..24f35d4 100644 --- a/cli/apple/testflight.ts +++ b/cli/apple/testflight.ts @@ -319,6 +319,16 @@ export async function run(ctx: Ctx): Promise { if (a.has('submit-review') && review) log(TAG, `beta review: already submitted (${review.attributes?.betaReviewState ?? '?'})`); if (external.length && !a.has('submit-review') && b.detail?.externalBuildState === 'READY_FOR_BETA_SUBMISSION') warn(TAG, 'external testers only get the build after Beta App Review: add --submit-review (asks first) or submit it in App Store Connect'); + // Beta App Review refuses a build whose app has no beta localization in its primary locale (422 + // MISSING_BETA_APP_LOCALIZATION): said before the submit, in the dry run too + if (wantsReview) { + const primary = String((await c.maybe(`/v1/apps/${appId}?fields[apps]=primaryLocale`))?.data?.attributes?.primaryLocale ?? ''); + const have = (await c.all(`/v1/apps/${appId}/betaAppLocalizations?limit=200`)).map((l: J) => String(l.attributes.locale)); + if (primary && !have.includes(primary)) { + const msg = `Beta App Review needs test information in the app's primary locale ${primary} (has: ${have.join(', ') || 'none'}): add it to apple.testflight.description (key ${primary} or its language id), then storebound apple testflight info`; + if (dry) warn(TAG, msg); else throw new Error(msg); + } + } if (dry) { await execute(c.asc, [...reqs, ...(wantsReview ? [betaReviewReq(b.id)] : [])], { dry, tag: TAG }); done(TAG, 'distribute checked (dry run)'); diff --git a/cli/lib/config.ts b/cli/lib/config.ts index cda074e..aea46a9 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -1210,7 +1210,7 @@ export function validateConfig(c: unknown): string[] { const enc = cfg.apple.usesNonExemptEncryption; if (enc !== undefined && typeof enc !== 'boolean') e.push('apple.usesNonExemptEncryption: true | false'); if (cfg.apple.screenshotTypes && !cfg.apple.screenshotTypes.every(t => /^APP_[A-Z0-9_]+$/.test(t))) e.push('apple.screenshotTypes: display types like APP_IPHONE_67'); - e.push(...validateTestflight(cfg.apple.testflight)); + e.push(...validateTestflight(cfg.apple.testflight, cfg.languages ?? [])); e.push(...validateSigning(cfg.apple.signing), ...validateAppleBuild(cfg.apple.build)); const catalogIds = new Set([...(cfg.products ?? []).map(p => p.id), ...(cfg.subscriptions ?? []).flatMap(g => (g.subscriptions ?? []).map(x => x.id))]); e.push(...validatePromoted(cfg.apple.promoted, catalogIds)); diff --git a/cli/lib/testflight.ts b/cli/lib/testflight.ts index 41c0639..b1bffc6 100644 --- a/cli/lib/testflight.ts +++ b/cli/lib/testflight.ts @@ -54,9 +54,14 @@ export const groupFromApi = (g: { id: string; attributes: Record [l.id, ...(l.apple ? [l.apple] : [])])); + const bad = Object.keys(t.description).filter(k => !known.has(k)); + if (bad.length) e.push(`apple.testflight.description: ${bad.map(k => `'${k}'`).join(', ')} is not a language of the config (use a language id or its App Store locale: ${langs.filter(l => l.apple).map(l => `${l.id} / ${l.apple}`).join(', ')})`); + } const names = new Set(); for (const [i, g] of (t.groups ?? []).entries()) { const at = `apple.testflight.groups[${i}]`; @@ -315,7 +320,8 @@ export function betaDescriptions(t: TfConfig | undefined, langs: { id: string; a const out: Record = {}; for (const l of langs) { if (!l.apple) continue; - const d = typeof t.description === 'string' ? t.description : t.description[l.id]; + // a language id ('en') or its App Store locale ('en-US'): an 'en-US' key was silently skipped (Acme 2026-10-29) + const d = typeof t.description === 'string' ? t.description : (t.description[l.id] ?? t.description[l.apple]); if (d) out[l.apple] = d; } return out; diff --git a/tests/helpers/fake-stores.ts b/tests/helpers/fake-stores.ts index 272ec93..f5497e9 100644 --- a/tests/helpers/fake-stores.ts +++ b/tests/helpers/fake-stores.ts @@ -15,6 +15,7 @@ const UPLOAD_HOST = 'https://upload.example.com/'; /** list relationship -> resource type of its items (parent type / relationship name); `one` for to-one relationships. */ const LISTS: Record = { + 'apps/betaAppLocalizations': { type: 'betaAppLocalizations' }, 'apps/inAppPurchasesV2': { type: 'inAppPurchases' }, 'inAppPurchases/inAppPurchaseLocalizations': { type: 'inAppPurchaseLocalizations' }, 'inAppPurchases/iapPriceSchedule': { type: 'inAppPurchasePriceSchedules', one: true }, diff --git a/tests/tf-description-locale.test.ts b/tests/tf-description-locale.test.ts new file mode 100644 index 0000000..0a52026 --- /dev/null +++ b/tests/tf-description-locale.test.ts @@ -0,0 +1,14 @@ +import { expect, test } from 'bun:test'; +import { betaDescriptions, validateTestflight } from '../cli/lib/testflight'; + +const langs = [{ id: 'en', apple: 'en-US' }, { id: 'tr', apple: 'tr' }]; + +test('beta descriptions take a language id or its App Store locale ("en-US" was skipped silently)', () => { + expect(betaDescriptions({ description: { 'en-US': 'Hello', tr: 'Merhaba' } }, langs)).toEqual({ 'en-US': 'Hello', tr: 'Merhaba' }); + expect(betaDescriptions({ description: { en: 'Hello' } }, langs)).toEqual({ 'en-US': 'Hello' }); +}); + +test('an unknown description key is a config error naming the accepted keys', () => { + expect(validateTestflight({ description: { 'en-US': 'x', de: 'y' } }, langs).join()).toContain("'de' is not a language of the config"); + expect(validateTestflight({ description: { 'en-US': 'x', tr: 'y' } }, langs)).toEqual([]); +}); From 9b0cc0bf108c006810fe1c5dccb022ceee4a3410 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 22:37:03 +0700 Subject: [PATCH 23/73] regenerate the api coverage tables --- cli/api/wrapped.gen.ts | 2 +- docs/api-coverage.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/api/wrapped.gen.ts b/cli/api/wrapped.gen.ts index e3836c5..87c30a2 100644 --- a/cli/api/wrapped.gen.ts +++ b/cli/api/wrapped.gen.ts @@ -96,7 +96,7 @@ export const WRAPPED: { apple: Record; play: Record Date: Thu, 29 Oct 2026 22:40:00 +0700 Subject: [PATCH 24/73] storebound 0.8.61: version in package.json and every copy, CHANGELOG 0.8.61 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0737002..eff0a86 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.60", + "version": "0.8.61", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 7f422c2..2b04ad5 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.60", + "version": "0.8.61", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 129826f..75e64f5 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.60", + "version": "0.8.61", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ef0f6..e9f4aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.61 · 2026-10-29 + - TestFlight: `apple.testflight.description` takes a language id or its App Store locale (`en` or `en-US`; an `en-US` key was skipped silently), `check` names an unknown key, and `distribute --submit-review` stops (dry run: warns) when the app's primary locale has no beta localization (Beta App Review answers 422 MISSING_BETA_APP_LOCALIZATION). ## 0.8.60 · 2026-10-29 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 81ca07b..b39d7e5 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.60", + "version": "0.8.61", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 2f3a701..76ea477 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.60" +version = "0.8.61" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 1ddfab9..5429871 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.60" +version = "0.8.61" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 6f03b36..2360261 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.60", + "version": "0.8.61", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 01ee8b9..ac06fb9 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.60", + "version": "0.8.61", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 9667245..b72b748 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.60", + "version": "0.8.61", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 724f5b976332c721a048182a5a20e5bc59f9951f Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 30 Oct 2026 00:16:11 +0700 Subject: [PATCH 25/73] apple build: a line before each slow step (App Store Connect reads, device families, web build) --- CHANGELOG.md | 1 + cli/apple/build.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9f4aca..02edc77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `apple build` prints a line before each slow step (App Store Connect reads, device families, web build), so a run without a terminal that stalls shows where. ## 0.8.61 · 2026-10-29 - TestFlight: `apple.testflight.description` takes a language id or its App Store locale (`en` or `en-US`; an `en-US` key was skipped silently), `check` names an unknown key, and `distribute --submit-review` stops (dry run: warns) when the app's primary locale has no beta localization (Beta App Review answers 422 MISSING_BETA_APP_LOCALIZATION). diff --git a/cli/apple/build.ts b/cli/apple/build.ts index d877447..caefc02 100644 --- a/cli/apple/build.ts +++ b/cli/apple/build.ts @@ -172,6 +172,8 @@ export async function run(ctx: Ctx): Promise { let build = a.get('build-number'); let teamId = signing.teamId ?? null; if (!build || !teamId) { + // a line before each slow step: a run without a terminal (launchd job, CI) that stalls shows where + log(TAG, `reading App Store Connect (${[!build ? 'next build number' : '', !teamId ? 'team id' : ''].filter(Boolean).join(', ')})`); try { const c = await ascClient(root, bundleId, config.apple?.appId); if (!build) { @@ -191,6 +193,7 @@ export async function run(ctx: Ctx): Promise { // device families: an upload that drops one the live version supports (iPad) is refused only AFTER the archive (ITMS-90101) // so compare first: stop before building with the exact fix (--allow-device-gap builds anyway) let deviceFamilies: FamilyVerdict[] = []; + log(TAG, 'reading the device families of the live version'); try { const c = await ascClient(root, bundleId, config.apple?.appId); deviceFamilies = familyVerdicts({ live: await liveDeviceFamilies(c, await c.app()), project: projectFamilies(root, bundleId, target.project), ipad: config.apple?.ipad }); @@ -268,6 +271,7 @@ export async function run(ctx: Ctx): Promise { else addToSearchList(keychain!); } shipPhase('prebuild', 'web build / prebuild'); + log(TAG, 'web build / prebuild step'); const web = await webStep({ ...webOpts, dry: false }); for (const n of target.notes) log(TAG, n); const rsync = foreignRsync(process.env.PATH); From 152e40fb8ab83a39da45c3fec3059cebbc083ed2 Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 30 Oct 2026 00:26:07 +0700 Subject: [PATCH 26/73] doctor: warn when storebound runs from a folder macOS guards (a launchd job hangs opening it) --- CHANGELOG.md | 1 + cli/doctor.ts | 19 ++++++++++++++++++- tests/doctor-tcc.test.ts | 9 +++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/doctor-tcc.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 02edc77..baaae38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased +- `doctor` warns when storebound runs from a folder macOS guards (~/Desktop, ~/Documents, ~/Downloads, iCloud Drive; e.g. a `bun link` to a checkout there): a launchd job or CI agent without access to it blocks in open() with no output. - `apple build` prints a line before each slow step (App Store Connect reads, device families, web build), so a run without a terminal that stalls shows where. ## 0.8.61 · 2026-10-29 diff --git a/cli/doctor.ts b/cli/doctor.ts index cfd4830..4cf63f8 100644 --- a/cli/doctor.ts +++ b/cli/doctor.ts @@ -4,7 +4,8 @@ // storebound doctor [--dir .] [--json] // storebound doctor --install [--yes] runs this OS's install command for one tool (winget / brew / apt); // without --yes only prints it. Never sudo, never an admin prompt. -import { existsSync } from 'node:fs'; +import { existsSync, realpathSync } from 'node:fs'; +import { homedir } from 'node:os'; import { join, resolve } from 'node:path'; import pkg from '../package.json' with { type: 'json' }; import type { Args } from './lib/args'; @@ -114,6 +115,8 @@ export async function run(args: Args): Promise { const set = r.credentials.filter(c => c.status === 'set').map(c => c.key), ph = r.credentials.filter(c => c.status === 'placeholder').map(c => c.key); log('doctor', `credentials: ${set.length ? set.join(', ') : 'none set'}${ph.length ? ` · placeholders (treated as missing): ${ph.join(', ')}` : ''}`); log('doctor', playLine(r.play)); + const tcc = protectedInstall(realScript(), homedir()); + if (tcc) log('doctor', `WARN this storebound runs from ${tcc}: macOS guards that folder, so a launchd job, CI agent or anything started outside a terminal with access blocks forever when it opens the file (no output, no error). Install it from npm instead: bun add -g storebound@latest (or npm i -g storebound)`); if (r.foreignRsync) log('doctor', `rsync: ${r.foreignRsync} is first on PATH and breaks Xcode exportArchive ("Copy failed") outside storebound; storebound apple build puts /usr/bin first. Fix for everything else: brew unlink rsync, or put /usr/bin before it`); const missing = r.tools.filter(t => !t.found || t.status === 'outdated'); if (!missing.length) { log('doctor', 'everything storebound can use is here'); return; } @@ -125,3 +128,17 @@ export async function run(args: Args): Promise { } log('doctor', `${missing.length} missing. Store work needs none of them; screenshots, previews, icons and captures do.`); } + +/** The real path of the running storebound (a bun link / npm link resolves into the checkout). */ +function realScript(): string { try { return realpathSync(process.argv[1] ?? ''); } catch { return process.argv[1] ?? ''; } } + +/** macOS only: the guarded home folder (Desktop, Documents, Downloads, iCloud Drive) a path lies in, or null. A process + * without access to it (a launchd job, a CI agent) hangs in open() while macOS waits for a consent nobody can give. */ +export function protectedInstall(path: string, home: string, platform: string = process.platform): string | null { + if (platform !== 'darwin' || !path || !home) return null; + for (const d of ['Desktop', 'Documents', 'Downloads', 'Library/Mobile Documents']) { + const dir = `${home.endsWith('/') ? home.slice(0, -1) : home}/${d}`; // posix paths: the check is macOS-only + if (path === dir || path.startsWith(dir + '/')) return `~/${d}`; + } + return null; +} diff --git a/tests/doctor-tcc.test.ts b/tests/doctor-tcc.test.ts new file mode 100644 index 0000000..00b78ec --- /dev/null +++ b/tests/doctor-tcc.test.ts @@ -0,0 +1,9 @@ +import { expect, test } from 'bun:test'; +import { protectedInstall } from '../cli/doctor'; + +test('a storebound running from ~/Desktop (a bun link to a checkout) is named; npm / bun global installs are fine', () => { + expect(protectedInstall('/Users/you/Desktop/storebound/dist/storebound.mjs', '/Users/you', 'darwin')).toBe('~/Desktop'); + expect(protectedInstall('/Users/you/Documents/x/cli/index.ts', '/Users/you', 'darwin')).toBe('~/Documents'); + expect(protectedInstall('/Users/you/.bun/install/global/node_modules/storebound/dist/storebound.mjs', '/Users/you', 'darwin')).toBeNull(); + expect(protectedInstall('/Users/you/Desktop/x.mjs', '/Users/you', 'linux')).toBeNull(); +}); From a850ba66702cf2a0cb682ecbbbaa2932b305e761 Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 30 Oct 2026 00:29:52 +0700 Subject: [PATCH 27/73] storebound 0.8.62: version in package.json and every copy, CHANGELOG 0.8.62 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index eff0a86..8020731 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.61", + "version": "0.8.62", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2b04ad5..08f4bef 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.61", + "version": "0.8.62", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 75e64f5..96b405f 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.61", + "version": "0.8.62", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index baaae38..1211a24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.62 · 2026-10-29 + - `doctor` warns when storebound runs from a folder macOS guards (~/Desktop, ~/Documents, ~/Downloads, iCloud Drive; e.g. a `bun link` to a checkout there): a launchd job or CI agent without access to it blocks in open() with no output. - `apple build` prints a line before each slow step (App Store Connect reads, device families, web build), so a run without a terminal that stalls shows where. ## 0.8.61 · 2026-10-29 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index b39d7e5..98c0ae7 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.61", + "version": "0.8.62", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 76ea477..b2ca85b 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.61" +version = "0.8.62" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 5429871..347f85d 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.61" +version = "0.8.62" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 2360261..b28aa2e 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.61", + "version": "0.8.62", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index ac06fb9..ed9b21e 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.61", + "version": "0.8.62", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index b72b748..0478e1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.61", + "version": "0.8.62", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 4b6c28aff2f09056dfc1940d6847771920faf69a Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 2 Nov 2026 16:39:15 +0700 Subject: [PATCH 28/73] desktop: a second --hidden start stays in the tray (single-instance no longer opens the window) --- CHANGELOG.md | 2 ++ apps/desktop/src-tauri/src/lib.rs | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1211a24..57ddf14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- Desktop: a second start at logon (`--hidden`, e.g. a Startup folder shortcut next to the Run entry) keeps the app in the tray instead of opening its window. + ## 0.8.62 · 2026-10-29 - `doctor` warns when storebound runs from a folder macOS guards (~/Desktop, ~/Documents, ~/Downloads, iCloud Drive; e.g. a `bun link` to a checkout there): a launchd job or CI agent without access to it blocks in open() with no output. diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index 0e55f5c..17627f4 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -322,8 +322,9 @@ pub fn run() { early_trace(); linux_webkit_env(); let app = tauri::Builder::default() - // single-instance first: a second start (or a storebound:// link) focuses the running app instead - .plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| show_main(app))) + // single-instance first: a second start (or a storebound:// link) focuses the running app instead; a second + // logon start (--hidden: the Run entry plus a Startup folder shortcut) stays in the tray + .plugin(tauri_plugin_single_instance::init(|app, argv, _cwd| if !argv.iter().any(|a| a == "--hidden") { show_main(app) })) .plugin(tauri_plugin_deep_link::init()) // never restore "visible": a --hidden start would otherwise pop the window up .plugin(tauri_plugin_window_state::Builder::new().with_filter(|label| !label.starts_with(menu_panel::LABEL_PREFIX)).with_state_flags(tauri_plugin_window_state::StateFlags::all() & !tauri_plugin_window_state::StateFlags::VISIBLE).build()) From b1f1b206d3118bda40393b89a5b5296db8e6a2e1 Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 2 Nov 2026 16:43:58 +0700 Subject: [PATCH 29/73] storebound 0.8.63: version in package.json and every copy, CHANGELOG 0.8.63 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8020731..b2fe8dc 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.62", + "version": "0.8.63", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 08f4bef..30a8d7e 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.62", + "version": "0.8.63", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 96b405f..54e45ca 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.62", + "version": "0.8.63", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ddf14..267112c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.63 · 2026-11-02 + - Desktop: a second start at logon (`--hidden`, e.g. a Startup folder shortcut next to the Run entry) keeps the app in the tray instead of opening its window. ## 0.8.62 · 2026-10-29 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 98c0ae7..b4aab53 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.62", + "version": "0.8.63", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index b2ca85b..e3dbb76 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.62" +version = "0.8.63" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 347f85d..d3a2306 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.62" +version = "0.8.63" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index b28aa2e..febcc13 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.62", + "version": "0.8.63", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index ed9b21e..b2050da 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.62", + "version": "0.8.63", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 0478e1d..462c182 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.62", + "version": "0.8.63", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From f5da7c9f7a1207825d366185f725da1802fdb7c0 Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 2 Nov 2026 18:16:25 +0700 Subject: [PATCH 30/73] validate: macOS versions need Mac screenshots, Play reads survive an ended edit; macOS build numbers across platforms; Mac build prebuild + apple.macAppCheck; signing wording off the Mac; dry flows plan uploads --- CHANGELOG.md | 6 ++ cli/api/wrapped.gen.ts | 6 +- cli/apple/build-mas.ts | 52 ++++++++++++--- cli/apple/build.ts | 8 +-- cli/apple/next-build.ts | 22 +++++-- cli/apple/screenshots.ts | 6 +- cli/apple/upload.ts | 2 +- cli/flow.ts | 16 ++++- cli/lib/config.ts | 4 ++ cli/lib/embedded.ts | 4 +- cli/lib/flow.ts | 43 ++++++++++++- cli/lib/signing.ts | 6 +- cli/validate.ts | 36 ++++++----- docs/api-coverage.md | 6 +- skills/release-flows/SKILL.md | 9 ++- templates/workflows/beta.yml | 14 +++- templates/workflows/release.yml | 20 ++++-- tests/flow-dry.test.ts | 100 +++++++++++++++++++++++++++++ tests/next-build-platforms.test.ts | 73 +++++++++++++++++++++ tests/validate-macos.test.ts | 52 +++++++++++++++ tests/validate-play-edit.test.ts | 91 ++++++++++++++++++++++++++ 21 files changed, 519 insertions(+), 57 deletions(-) create mode 100644 tests/flow-dry.test.ts create mode 100644 tests/next-build-platforms.test.ts create mode 100644 tests/validate-macos.test.ts create mode 100644 tests/validate-play-edit.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 267112c..ab04470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ ## Unreleased +- `validate` / `release plan`: a macOS version is checked against Mac screenshots (APP_DESKTOP, with `apple.mac`), not the iPhone / iPad sets; with no editable version, iOS is picked over macOS. +- `validate --play`: reads go through the locked read-only edit and retry once on a fresh edit when Play ends it ("This Edit has been deleted" was shown as a blocker; it is now a warning to re-run at most). +- Build numbers for macOS (`apple build --platform macos`, `apple upload` of a .pkg) come from every build of the app, as `apple next-build` does (a macOS-only list proposed a number an iOS build already had). +- `apple build --platform macos` runs `build.prebuild` / `apple.prebuild` before `tauri build` (`--no-prebuild` skips it), and the new `apple.macAppCheck` command on the built .app before productbuild ({file} = the .app; a nonzero exit stops the build). +- `apple signing status` / the Mac build dry run on Windows or Linux say the keys live on the Mac that made the certificates (build there) instead of suggesting a new certificate. +- Flows: a dry `flow run` plans the upload, TestFlight wait and distribute steps after a dry build instead of failing on the missing IPA; `beta` and `release` need VERSION (no silent 1.0.0); `beta` distributes to the config's internal TestFlight group when GROUP is empty; `release` has optional macOS steps (MAC_TAURI), PLAY_TRACK (e.g. beta = open testing) and a promote owner step. ## 0.8.63 · 2026-11-02 - Desktop: a second start at logon (`--hidden`, e.g. a Startup folder shortcut next to the Run entry) keeps the app in the tray instead of opening its window. diff --git a/cli/api/wrapped.gen.ts b/cli/api/wrapped.gen.ts index 87c30a2..0fced3e 100644 --- a/cli/api/wrapped.gen.ts +++ b/cli/api/wrapped.gen.ts @@ -133,7 +133,7 @@ export const WRAPPED: { apple: Record; play: Record; play: Record [--path-free] [--target universal-apple-darwin] // [--version x.y.z] [--build-number N] [--profile ] [--out build/macos] [--unsigned] [--dry] [--json] -// Steps: Tauri project -> version / build number (next free one on App Store Connect, platform MAC_OS) -> signing +// Steps: Tauri project -> version / build number (next free one on App Store Connect, every platform) -> signing // identities from the keychain ("Apple Distribution" or "3rd Party Mac Developer Application"; "Mac Installer // Distribution" or "3rd Party Mac Developer Installer") -> Mac App Store provisioning profile (--profile, installed, or // from the API) -> entitlements (app sandbox + application / team identifier, the project's own keys kept) -> a @@ -19,10 +19,13 @@ import type { Ctx } from '../lib/ctx'; import { need } from '../lib/ctx'; import { done, log, printJson, warn } from '../lib/log'; import { parseMobileprovision, parsePlist, type PlistValue } from '../lib/plist'; -import { nextBuildNumber } from '../lib/release'; +import { appNextBuild } from './next-build'; import { parseIdentities, profileDirs, readProfiles, type ApiProfile } from '../lib/signing'; import { sshBuildRefusal } from '../lib/keychain'; import { remoteBuildSession, showCmd } from '../lib/xcode'; +import { prebuildFor, prebuildsDone, runPrebuild } from '../lib/web-assets'; +import { preCheckCommand } from '../lib/pre-check'; +import { pump } from '../lib/runner'; import { appProblems, entitlementKeysOf, entitlementsXml, findBuiltApp, findTauri, leakNeedles, masEntitlements, type MasProfile, masSteps, pathFreeEnv, pickMasIdentities, pickMasProfiles, pkgProblems, parsePkgSignature, readAppInfo, scanPathLeaks, tauriOverlay, categoryId, @@ -41,6 +44,16 @@ const run1 = (argv: string[], timeout = 120_000): { ok: boolean; out: string } = }; /** The Tauri CLI: the project's node_modules/.bin/tauri (walking up), `cargo tauri`, else bunx. */ +/** One sh -c command in root, its output streamed; the exit code and the last lines. */ +async function runCheck(cmd: string, root: string): Promise<{ ok: boolean; code: number; tail: string }> { + const p = rt.spawn(['sh', '-c', cmd], { cwd: root, stdin: 'ignore', stdout: 'pipe', stderr: 'pipe', env: process.env }); + const tail: string[] = []; + const each = (line: string, kind: 'stdout' | 'stderr'): void => { tail.push(line); if (tail.length > 10) tail.shift(); (kind === 'stderr' ? console.error : console.log)(` ${line}`); }; + await Promise.all([pump(p.stdout, 'stdout', each), pump(p.stderr, 'stderr', each)]); + const code = await p.exited; + return { ok: code === 0, code, tail: tail.join('\n') }; +} + export function tauriCommand(cwd: string, exists: (p: string) => boolean = existsSync, which: (c: string) => string | null = rt.which): string[] { for (let d = cwd, prev = ''; d !== prev; prev = d, d = dirname(d)) { const p = join(d, 'node_modules', '.bin', 'tauri'); if (exists(p)) return [p]; } if (which('cargo-tauri')) return ['cargo', 'tauri']; @@ -72,7 +85,13 @@ async function fetchMasProfile(c: Asc, bundleId: string, dest: string): Promise< return dest; } -export async function run(ctx: Ctx): Promise { +/** The dry-run line about signing identities: on a machine that is not a Mac, say so instead of "none found". */ +export function identityLine(o: { platform: string; appIdentity: string | null; installerIdentity: string | null; profile: string | null }): string { + if (o.platform !== 'darwin') return `this is not a build machine: Mac App Store builds run on a Mac (the signing identities live in its keychain), so none were looked up here; profile: ${o.profile ?? '(none)'}`; + return `app identity: ${o.appIdentity ?? '(none found)'}; installer identity: ${o.installerIdentity ?? '(none found)'}; profile: ${o.profile ?? '(none)'}`; +} + +export async function run(ctx: Ctx, platform: string = process.platform): Promise { const { config, root, resolve } = ctx.loaded; const a = ctx.args; const bundleId = need(config.apple?.bundleId, 'apple.bundleId'); @@ -92,9 +111,10 @@ export async function run(ctx: Ctx): Promise { try { client = await ascClient(root, bundleId, config.apple?.appId); if (!build) { - const builds = await client.all(`/v1/builds?filter[app]=${await client.app()}&filter[preReleaseVersion.platform]=MAC_OS&limit=200&fields[builds]=version`); - build = nextBuildNumber(builds.map(b => String(b.attributes.version))); - log(TAG, `${builds.length} macOS builds on App Store Connect: next build number ${build} (CFBundleVersion must increase)`); + // every platform of the app record, not only macOS: CFBundleVersion must be unique across all its builds + const found = await appNextBuild(client); + build = found.next; + log(TAG, `${found.builds} builds (all platforms) on App Store Connect: next build number ${build} (CFBundleVersion must increase)`); } if (!teamId) teamId = (await findBundleId(client, bundleId))?.attributes?.seedId ?? null; } catch (e) { @@ -107,7 +127,7 @@ export async function run(ctx: Ctx): Promise { const team = teamId ?? ''; // identities and profile (a real signed run needs them; a dry run shows placeholders) - const mac = process.platform === 'darwin'; + const mac = platform === 'darwin'; let appIdentity: string | null = null, installerIdentity: string | null = null; if (!unsigned && mac) { const picked = pickMasIdentities(parseIdentities(run1(['security', 'find-identity', '-v']).out), teamId); @@ -142,18 +162,26 @@ export async function run(ctx: Ctx): Promise { const overlay = tauriOverlay({ appIdentity, entitlementsFile: entFile, profile, version, build: buildNo, unsigned, minOs: tauri.minOs, category }); const input = { tauri, tauriCmd, target, out, configFile, entitlementsFile: entFile, profile, appIdentity, installerIdentity: installerIdentity ?? '', version, build: buildNo, unsigned, pathFree, pkg }; const steps = masSteps(input); + // the same hooks as apple build: build.prebuild / apple.prebuild first (a project computes its build-time env there), + // apple.macAppCheck on the built .app before productbuild (e.g. a project's own check that a value was stamped in) + const prebuild = prebuildFor(config, 'apple') ?? null; + const prebuildSkip = !prebuild ? undefined : a.has('no-prebuild') ? '--no-prebuild' : prebuildsDone().has(prebuild) ? 'already ran in this flow run' : undefined; + const appCheck = config.apple?.macAppCheck?.trim() || null; const existingEnt = tauri.entitlements && existsSync(tauri.entitlements) ? (parsePlist(readFileSync(tauri.entitlements)) as Record) : undefined; const ent = masEntitlements({ teamId: team, bundleId, existing: existingEnt }); const plan = { platform: 'MAC_OS', tauri: relative(root, tauri.confPath), target, version, build: buildNo, teamId: teamId, unsigned, pathFree, appIdentity, installerIdentity, profile: profile ? basenameOf(profile) : null, entitlements: Object.keys(ent), tauriOverlay: overlay, env: Object.fromEntries(Object.entries(env).map(([k, v]) => [k, k === 'RUSTFLAGS' ? v.replaceAll(home, '~') : v])), + prebuild, ...(prebuildSkip ? { prebuildSkip } : {}), appCheck, steps: [showCmd(steps.tauri, null), showCmd(steps.codesignVerify, null), showCmd(steps.productbuild, null), showCmd(steps.pkgCheck, null)], out: relative(root, out) || '.', pkg: relative(root, pkg) }; if (dry) { if (json) { printJson(plan); return; } log(TAG, `Tauri ${tauri.productName} (${bundleId}) ${version} (${buildNo}) for ${target}, ${unsigned ? 'UNSIGNED' : 'Mac App Store signing'}${pathFree ? ', path-free' : ''}`); - log(TAG, `app identity: ${appIdentity ?? '(none found)'}; installer identity: ${installerIdentity ?? '(none found)'}; profile: ${plan.profile ?? '(none)'}`); + log(TAG, identityLine({ platform, appIdentity, installerIdentity, profile: plan.profile })); log(TAG, `entitlements: ${plan.entitlements.join(', ')}`); if (pathFree) log(TAG, `RUSTFLAGS: ${plan.env.RUSTFLAGS}`); + if (prebuild) log(TAG, prebuildSkip ? `prebuild skipped (${prebuildSkip}): ${prebuild}` : `would run the prebuild: ${prebuild}`); for (const s of plan.steps) log(TAG, `would run: ${s}`); + if (appCheck) log(TAG, `would check the built .app: ${appCheck}`); done(TAG, 'macOS build planned (dry run)'); return; } @@ -164,6 +192,7 @@ export async function run(ctx: Ctx): Promise { mkdirSync(out, { recursive: true }); writeFileSync(entFile, entitlementsXml(ent)); writeFileSync(configFile, `${JSON.stringify(overlay, null, 2)}\n`); + if (prebuild && !prebuildSkip) await runPrebuild(prebuild, root, TAG); shipPhase('build', `tauri build ${target}, build ${buildNo}`); await runLogged(steps.tauri, tauri.cwd, join(out, 'tauri-build.log'), showCmd(steps.tauri, null), env); const appDir = findBuiltApp(tauri.dir, root, target, tauri.productName); @@ -179,6 +208,13 @@ export async function run(ctx: Ctx): Promise { { bundleId, version, build: buildNo, signed: !unsigned, pathFree }); for (const w of checks.warnings) warn(TAG, w); if (checks.errors.length) throw new Error(`${basenameOf(appDir)} was built, but the Mac App Store would refuse it:\n${checks.errors.map(x => ` ${x}`).join('\n')}`); + if (appCheck) { + const cmd = preCheckCommand(appCheck, appDir); + log(TAG, `apple.macAppCheck: $ ${cmd}`); + const r = await runCheck(cmd, root); + if (!r.ok) throw new Error(`apple.macAppCheck failed (exit ${r.code}) on ${basenameOf(appDir)}; nothing packaged:\n${r.tail}`); + log(TAG, 'apple.macAppCheck: ok'); + } shipPhase('sign', 'productbuild'); rmSync(exportPath, { recursive: true, force: true }); mkdirSync(exportPath, { recursive: true }); diff --git a/cli/apple/build.ts b/cli/apple/build.ts index caefc02..18093db 100644 --- a/cli/apple/build.ts +++ b/cli/apple/build.ts @@ -34,7 +34,7 @@ import { done, log, printJson, warn } from '../lib/log'; import { derivedDataFor, archiveScanDirs, leakNeedles, leakProblem, outsideHome, pathFreeSettings, scanForPaths } from '../lib/path-free'; import { pump } from '../lib/runner'; import { parseMobileprovision, toXmlPlist } from '../lib/plist'; -import { nextBuildNumber } from '../lib/release'; +import { appNextBuild } from './next-build'; import { exportOptions, profileDirs } from '../lib/signing'; import { type FamilyVerdict, familyVerdicts, projectFamilies } from '../lib/device-families'; import { liveDeviceFamilies } from './device-families'; @@ -177,9 +177,9 @@ export async function run(ctx: Ctx): Promise { try { const c = await ascClient(root, bundleId, config.apple?.appId); if (!build) { - const builds = await c.all(`/v1/builds?filter[app]=${await c.app()}&limit=200&fields[builds]=version`); - build = nextBuildNumber(builds.map(b => String(b.attributes.version))); - log(TAG, `${builds.length} builds on App Store Connect: next build number ${build}`); + const found = await appNextBuild(c); + build = found.next; + log(TAG, `${found.builds} builds on App Store Connect: next build number ${build}`); } if (!teamId) teamId = (await findBundleId(c, bundleId))?.attributes?.seedId ?? null; } catch (e) { diff --git a/cli/apple/next-build.ts b/cli/apple/next-build.ts index 5c4a560..530b28f 100644 --- a/cli/apple/next-build.ts +++ b/cli/apple/next-build.ts @@ -7,15 +7,25 @@ import type { Ctx } from '../lib/ctx'; import { need } from '../lib/ctx'; import { printJson } from '../lib/log'; import { nextBuildNumber } from '../lib/release'; -import { ascClient } from './asc'; +import { ascClient, type Asc } from './asc'; + +/** + * The one place that computes the next CFBundleVersion: the highest build of the app over EVERY platform (iOS, macOS, + * tvOS, visionOS), every processing state and every page, plus one. CFBundleVersion must be unique across the app + * record's builds, so a platform filter (a macOS build once got a number an uploaded macOS build already had) or a + * missed page gives a number the store refuses. `apple next-build`, `apple build` and `apple build --platform macos` + * (also their dry runs) all call this, so they agree. + */ +export async function appNextBuild(c: Pick): Promise<{ next: string; builds: number }> { + const builds = await c.all(`/v1/builds?filter[app]=${await c.app()}&limit=200&fields[builds]=version`); + return { next: nextBuildNumber(builds.map(b => String(b.attributes.version))), builds: builds.length }; +} export async function run(ctx: Ctx): Promise { const { config, root } = ctx.loaded; const c = await ascClient(root, need(config.apple?.bundleId, 'apple.bundleId'), config.apple?.appId); - const appId = await c.app(); - const builds = await c.all(`/v1/builds?filter[app]=${appId}&limit=200&fields[builds]=version`); - const next = nextBuildNumber(builds.map(b => String(b.attributes.version))); - if (ctx.args.has('json')) { printJson({ next, builds: builds.length }); return; } - console.error(`[apple] ${builds.length} builds on App Store Connect; next build number:`); + const { next, builds } = await appNextBuild(c); + if (ctx.args.has('json')) { printJson({ next, builds }); return; } + console.error(`[apple] ${builds} builds on App Store Connect; next build number:`); console.log(next); } diff --git a/cli/apple/screenshots.ts b/cli/apple/screenshots.ts index fbb353f..bc7bfce 100644 --- a/cli/apple/screenshots.ts +++ b/cli/apple/screenshots.ts @@ -52,8 +52,10 @@ export function skippedDuoSets(apple: { iphoneDuo?: boolean; appId?: string } | /** Display types `validate` requires on every locale: apple.screenshotTypes, else the classes App Store Connect's * "App Previews and Screenshots" tab lists (October 2026): iPhone with Dynamic Island (medium display), filled by * scaling a 6.9" or 6.5" set down (ACCEPTED_INSTEAD), plus iPad 13" display with ipad. iPhone Duo is optional. */ -export const requiredDisplayTypes = (apple: { ipad?: boolean; screenshotTypes?: string[] } | undefined): string[] => - apple?.screenshotTypes ?? ['APP_IPHONE_61', ...(apple?.ipad ? ['APP_IPAD_PRO_3GEN_129'] : [])]; +export const requiredDisplayTypes = (apple: { ipad?: boolean; mac?: boolean; screenshotTypes?: string[] } | undefined, platform: string = 'IOS'): string[] => + platform === 'MAC_OS' ? (apple?.mac ? Object.values(MAC_DISPLAY) : []) // a macOS version takes the Mac set only (apple.screenshotTypes is the iOS list) + : platform !== 'IOS' ? [] + : apple?.screenshotTypes ?? ['APP_IPHONE_61', ...(apple?.ipad ? ['APP_IPAD_PRO_3GEN_129'] : [])]; /** Makes one screenshot set (of a version localization, a custom product page localization or a Product Page * Optimization treatment localization) hold exactly `files`, in order: left alone when the MD5s match, else the diff --git a/cli/apple/upload.ts b/cli/apple/upload.ts index 28ccd4a..a31574f 100644 --- a/cli/apple/upload.ts +++ b/cli/apple/upload.ts @@ -284,7 +284,7 @@ export async function run(ctx: Ctx): Promise { const editable = await c.editableVersion(platform).catch(() => null); const trainWhy = ipaVersionProblem(info.version, editable?.attributes?.versionString as string | undefined, 'the editable App Store version'); if (trainWhy) { if (a.has('allow-version-mismatch')) warn(TAG, trainWhy); else throw new Error(`${relative(root, ipa)}: not uploaded, ${trainWhy}`); } - const builds = await c.all(`/v1/builds?filter[app]=${appId}${isPkg ? '&filter[preReleaseVersion.platform]=MAC_OS' : ''}&limit=200&fields[builds]=version,processingState`); + const builds = await c.all(`/v1/builds?filter[app]=${appId}&limit=200&fields[builds]=version,processingState`); const numbers = builds.map(b => String(b.attributes.version)); const next = nextBuildNumber(numbers); // the same IPA uploaded by an earlier run: nothing to send again, only the wait diff --git a/cli/flow.ts b/cli/flow.ts index 63387e1..11151b3 100644 --- a/cli/flow.ts +++ b/cli/flow.ts @@ -20,7 +20,7 @@ import { dirname, join, relative } from 'node:path'; import type { Args } from './lib/args'; import { CONFIG_NAMES, loadConfig, type ShipConfig } from './lib/config'; import { - type CondCtx, expand, type Flow, flowsOfFile, kindOf, type Mode, parseParams, planStep, type PlannedStep, resumePoint, type RunState, startIndex, + type CondCtx, type DryPending, expand, type Flow, flowsOfFile, kindOf, missingParams, type Mode, noteDry, parseParams, planStep, plannedForDryInput, type PlannedStep, resumePoint, type RunState, startIndex, type StepResult, validateFlows, } from './lib/flow'; import { DECLINED_MARK } from './lib/ctx'; @@ -170,6 +170,12 @@ async function runFlow(args: Args, root: string): Promise { const subParams = expand(flow, all, 'steps').params; const vars: Record = { ...subParams, ...flow.params, ...(from ? last?.vars ?? {} : {}), ...params }; const c = await condCtx(root); + vars['config.testflight.internal'] = (c.config?.apple?.testflight?.groups ?? []).filter(g => g.internal).map(g => g.name).join(','); + if (!args.has('resume')) { + const missing = missingParams(vars); + if (missing.length) throw new Error(`${name} needs ${missing.map(k => `${k}=`).join(' ')} (storebound flow run ${name} ${missing.map(k => `${k}=...`).join(' ')})`); + } + const pending: DryPending = { built: new Set(), uploaded: new Set() }; const prebuilt = prebuildsDone(); const state: RunState = { flow: name, mode, startedAt: new Date().toISOString(), vars, results: [], ok: true }; const env = process.env as Record; @@ -196,12 +202,20 @@ async function runFlow(args: Args, root: string): Promise { state.results.push(r); save(); continue; } + const planned = plannedForDryInput(p, mode, pending); + if (planned) { + r.status = 'planned'; r.detail = planned; + if (!json) log(TAG, `${label}: ${describe(p)} (${planned})`); + state.results.push(r); save(); + continue; + } if (!json) log(TAG, `${label}: ${describe(p)}${p.dryAdded ? ' (dry run)' : ''}`); const t = Date.now(); const x = await exec(p, root, json, prebuilt.size ? { [PREBUILD_DONE_ENV]: [...prebuilt].join('\n') } : {}); r.exitCode = x.code; r.ms = Date.now() - t; if (x.code === 0) { r.status = 'ok'; + noteDry(p, pending); const pre = p.argv ? prebuildRan(p.argv, c.config) : null; if (pre) prebuilt.add(pre); if (p.capture) { diff --git a/cli/lib/config.ts b/cli/lib/config.ts index aea46a9..446ee91 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -716,6 +716,9 @@ export interface ShipConfig { build?: AppleBuildConfig; /** Shell command `apple build` runs first in the project root; overrides build.prebuild for the App Store. */ prebuild?: string; + /** `apple build --platform macos`: shell command run on the built .app before productbuild ({file} = the .app path); + * a nonzero exit stops the build, nothing is packaged. E.g. a project's own check that a build-time value is in the binary. */ + macAppCheck?: string; /** Promoted in-app purchases on the product page, in order (`storebound apple promoted`; at most 20). */ promoted?: PromotedConfig; /** Custom product pages (`storebound apple cpp`; at most 70). */ @@ -1019,6 +1022,7 @@ export function validateExtras(cfg: Partial): string[] { if (cfg.build !== undefined && (typeof cfg.build !== 'object' || cfg.build === null)) e.push('build: { prebuild?: "" }'); if (badCmd(cfg.build?.prebuild)) e.push('build.prebuild: a shell command run in the project root before apple build / play build, e.g. "npm run build && npx cap sync"'); if (badCmd(cfg.apple?.prebuild)) e.push('apple.prebuild: a shell command (overrides build.prebuild for apple build)'); + if (badCmd(cfg.apple?.macAppCheck)) e.push('apple.macAppCheck: a shell command run on the built Mac .app ({file} = its path), e.g. "node tools/check-app.mjs {file}"'); if (badCmd(cfg.play?.prebuild)) e.push('play.prebuild: a shell command (overrides build.prebuild for play build)'); if (cfg.apple?.teamId !== undefined &&!/^[A-Z0-9]{10}$/.test(cfg.apple.teamId)) e.push('apple.teamId: the 10-character Team ID (Membership details)'); if (cfg.play?.developerId !== undefined && !/^\d{1,25}$/.test(cfg.play.developerId)) e.push('play.developerId: the digits of play.google.com/console/u/0/developers/'); diff --git a/cli/lib/embedded.ts b/cli/lib/embedded.ts index 6429370..e11a6ba 100644 --- a/cli/lib/embedded.ts +++ b/cli/lib/embedded.ts @@ -31,8 +31,8 @@ export const TEMPLATE_TEXT: Record = { "web/appstore.svg": "App Store", "web/googleplay.svg": "Google Play", "web/landing.html": "\n\n\n\n\n{{APP_NAME}}\n\n\n\n\n\n
\n

{{APP_NAME}}

\n \n
\n\n\n\n", - "workflows/beta.yml": "# storebound flow \"beta\" for a game: a playtest build on TestFlight and Play internal testing.\n# storebound flow run beta VERSION=1.2.0 [--apply]\ndescription: Next game build to TestFlight and Play internal testing\nparams:\n VERSION: \"1.0.0\"\n GROUP: \"Playtesters\"\nsteps:\n - id: check\n run: check\n - id: ads\n if: exists ios\n run: ads scan --ios ios\n continueOnError: true\n - id: next-build\n if: apple\n run: apple next-build\n capture: BUILD\n - id: build\n if: apple\n run: apple build --version ${VERSION} --build-number ${BUILD}\n - id: upload\n if: apple\n run: apple upload --no-wait --build ${BUILD} --allow-existing\n - id: wait\n if: apple\n run: apple testflight wait --build ${BUILD} --version ${VERSION}\n - id: distribute\n if: apple\n run: apple testflight distribute --build ${BUILD} --group ${GROUP}\n - id: play-build\n if: play\n run: play build --version-name ${VERSION}\n - id: play-upload\n if: play\n run: play upload --track internal\n - id: external\n owner: \"External playtesters: storebound apple testflight distribute --build ${BUILD} --group --submit-review (Beta App Review is your call)\"\n", - "workflows/release.yml": "# storebound flow \"release\" for a game: one version on both stores, up to your Submit click.\n# storebound flow run release VERSION=1.2.0 reads run, writes run as dry runs (nothing changes)\n# storebound flow run release VERSION=1.2.0 --apply writes run for real; each command still asks you first\n# storebound flow run release --resume --apply continue after fixing a failed step\n# Steps are storebound commands (no \"storebound\" prefix). `if: apple` / `if: play` skip a store the config does not\n# have; `owner:` steps are never run, they list what you click. `sh:` runs your own build command (only with --apply).\ndescription: Build, upload and check one game version on both stores, then your Submit click\nparams:\n VERSION: \"1.0.0\"\nsteps:\n - id: shots\n if: exists store/renders\n run: shots check\n - id: next-build\n if: apple\n run: apple next-build\n capture: BUILD\n - id: build\n if: apple\n run: apple build --version ${VERSION} --build-number ${BUILD}\n - id: upload\n if: apple\n run: apple upload --no-wait --build ${BUILD} --allow-existing\n - id: wait\n if: apple\n run: apple testflight wait --build ${BUILD} --version ${VERSION}\n - id: play-build\n if: play\n run: play build --version-name ${VERSION}\n - id: play-upload\n if: play\n run: play upload --track internal\n - id: whats-new\n if: exists store/whats-new\n run: whats-new apply\n - id: listing\n if: apple\n run: apple listing --version ${VERSION} --build ${BUILD}\n - id: validate\n run: validate\n - id: scan\n run: scan\n - id: plan\n run: release plan ${VERSION}\n - id: submit\n owner: \"App Store Connect: Submit for Review (version ${VERSION}, build ${BUILD}). Play Console: promote the internal release and Send changes for review\"\n", + "workflows/beta.yml": "# storebound flow \"beta\" for a game: a playtest build on TestFlight and Play internal testing.\n# storebound flow run beta VERSION=1.2.0 [--apply]\n# VERSION is required (\"?\"). GROUP empty = the internal group of apple.testflight.groups (the group `internal: true`);\n# GROUP= picks a TestFlight group that exists (or is listed in apple.testflight.groups).\ndescription: Next game build to TestFlight and Play internal testing\nparams:\n VERSION: \"?\"\n GROUP: \"\"\nsteps:\n - id: check\n run: check\n - id: ads\n if: exists ios\n run: ads scan --ios ios\n continueOnError: true\n - id: next-build\n if: apple\n run: apple next-build\n capture: BUILD\n - id: build\n if: apple\n run: apple build --version ${VERSION} --build-number ${BUILD}\n - id: upload\n if: apple\n run: apple upload --no-wait --build ${BUILD} --allow-existing\n - id: wait\n if: apple\n run: apple testflight wait --build ${BUILD} --version ${VERSION}\n - id: distribute\n if: apple && ${GROUP}\n run: apple testflight distribute --build ${BUILD} --group ${GROUP}\n - id: distribute-internal\n if: apple && !${GROUP} && ${config.testflight.internal}\n run: apple testflight distribute --build ${BUILD} --group ${config.testflight.internal}\n - id: no-group\n if: apple && !${GROUP} && !${config.testflight.internal}\n owner: \"No TestFlight group: pass GROUP= or add a group with internal: true to apple.testflight.groups, then storebound apple testflight distribute --build ${BUILD} --group \"\n - id: play-build\n if: play\n run: play build --version-name ${VERSION}\n - id: play-upload\n if: play\n run: play upload --track internal\n - id: external\n owner: \"External playtesters: storebound apple testflight distribute --build ${BUILD} --group --submit-review (Beta App Review is your call)\"\n", + "workflows/release.yml": "# storebound flow \"release\" for a game: one version on both stores, up to your Submit click.\n# storebound flow run release VERSION=1.2.0 reads run, writes run as dry runs (nothing changes)\n# storebound flow run release VERSION=1.2.0 --apply writes run for real; each command still asks you first\n# storebound flow run release --resume --apply continue after fixing a failed step\n# Steps are storebound commands (no \"storebound\" prefix). `if: apple` / `if: play` skip a store the config does not\n# have; `if: ${PARAM}` turns an optional step on by a param (MAC_TAURI= adds the macOS build, PLAY_TRACK=beta\n# uploads to Play open testing); VERSION is required; `owner:` steps are never run, they list what you click. `sh:` runs your own build command (only with --apply).\ndescription: Build, upload and check one game version on both stores, then your Submit click\nparams:\n VERSION: \"?\"\n MAC_TAURI: \"\"\n PLAY_TRACK: \"internal\"\nsteps:\n - id: shots\n if: exists store/renders\n run: shots check\n - id: next-build\n if: apple\n run: apple next-build\n capture: BUILD\n - id: build\n if: apple\n run: apple build --version ${VERSION} --build-number ${BUILD}\n - id: upload\n if: apple\n run: apple upload --no-wait --build ${BUILD} --allow-existing\n - id: wait\n if: apple\n run: apple testflight wait --build ${BUILD} --version ${VERSION}\n - id: mac-build\n if: apple && ${MAC_TAURI}\n run: apple build --platform macos --tauri ${MAC_TAURI} --version ${VERSION} --build-number ${BUILD}\n - id: mac-upload\n if: apple && ${MAC_TAURI}\n run: apple upload --platform macos --no-wait --allow-existing\n - id: play-build\n if: play\n run: play build --version-name ${VERSION}\n - id: play-upload\n if: play\n run: play upload --track ${PLAY_TRACK}\n - id: promote\n if: play && ${PLAY_TRACK} != production\n owner: \"Play Console: promote the ${PLAY_TRACK} release to production (storebound play release --version-code --production completed once you agree)\"\n - id: whats-new\n if: exists store/whats-new\n run: whats-new apply\n - id: listing\n if: apple\n run: apple listing --version ${VERSION} --build ${BUILD}\n - id: validate\n run: validate\n - id: scan\n run: scan\n - id: plan\n run: release plan ${VERSION}\n - id: submit\n owner: \"App Store Connect: Submit for Review (version ${VERSION}, build ${BUILD}). Play Console: promote the ${PLAY_TRACK} release and Send changes for review\"\n", }; /** The pages shots render / video load (cli/shots/*.html), by file name. */ diff --git a/cli/lib/flow.ts b/cli/lib/flow.ts index 238ade6..1993cbd 100644 --- a/cli/lib/flow.ts +++ b/cli/lib/flow.ts @@ -205,7 +205,7 @@ export function validateFlows(flows: Flow[], o: { commands?: Set } = {}) if (ids.has(s.id)) e.push(`${at}: id used twice`); ids.add(s.id); for (const t of [s.run, s.sh, s.owner, s.if].filter((x): x is string => typeof x === 'string')) - for (const m of t.matchAll(/\$\{([^}]*)\}/g)) if (!vars.has(m[1]!) && !/^env\.[A-Z0-9_]+$/.test(m[1]!)) e.push(`${at}: \${${m[1]}} is not a param or an earlier capture`); + for (const m of t.matchAll(/\$\{([^}]*)\}/g)) if (!vars.has(m[1]!) && !/^env\.[A-Z0-9_]+$/.test(m[1]!) && !CONFIG_VARS.includes(m[1]!)) e.push(`${at}: \${${m[1]}} is not a param or an earlier capture`); if (s.capture) vars.add(s.capture); if (s.run !== undefined) { let argv: string[] = []; @@ -230,6 +230,14 @@ export function validateFlows(flows: Flow[], o: { commands?: Set } = {}) // ---- variables, conditions ---- +/** Variables the runner fills from the config (empty when the config has none), usable in `run` and `if`. */ +export const CONFIG_VARS = ['config.testflight.internal']; + +/** The required-param marker: `VERSION: "?"` in params means the run needs VERSION=... (no silent default). */ +export const REQUIRED = '?'; +/** Params still at the required marker (not given on the command line). Pure. */ +export function missingParams(vars: Record): string[] { return Object.keys(vars).filter(k => vars[k] === REQUIRED); } + /** ${VAR} and ${env.NAME} substituted; unknown ones stay as written (the plan shows them). */ export function substitute(text: string, vars: Record, env: Record = {}): string { return text.replace(/\$\{([^}]*)\}/g, (m, k: string) => (k.startsWith('env.') ? env[k.slice(4)] ?? m : vars[k] ?? m)); @@ -306,6 +314,39 @@ export function planStep(s: FlowStep, part: PlannedStep['part'], mode: Mode, var return { ...base, kind, argv: addDry ? [...argv, '--dry'] : addYes ? [...argv, '--yes'] : argv, dryAdded: addDry, ...(addYes ? { yesAdded: true } : {}), ...(mode === 'plan' ? { skip: 'plan only' } : {}) }; } +const PRODUCERS = ['apple build', 'play build']; +const CONSUMERS = ['apple upload', 'play upload']; +const AFTER_UPLOAD = ['apple testflight wait', 'apple testflight distribute']; + +/** Stores whose artifact (IPA / AAB / PKG) or uploaded build only exists after a real earlier step ("apple", "apple:mac", "play"). */ +export interface DryPending { built: Set; uploaded: Set } + +const storeKey = (argv: string[]): string => { + const i = argv.indexOf('--platform'); + const mac = (i >= 0 && /^(macos|mac)$/i.test(argv[i + 1] ?? '')) || argv.includes('--tauri'); + return `${argv[0]}${mac ? ':mac' : ''}`; +}; + +/** Records a step that ran as a dry run: a dry build leaves no IPA / AAB. Pure. */ +export function noteDry(p: PlannedStep, pending: DryPending): void { + if (!p.argv || !p.dryAdded || p.skip) return; + if (PRODUCERS.includes(words(p.argv).slice(0, 2).join(' '))) pending.built.add(storeKey(p.argv)); +} + +/** Why a step is only planned in a dry run: its input (the IPA / AAB, or the uploaded build) would come from an earlier + * step that did not really run. null = run it (always null with --apply: a real upload with no IPA still fails). Pure. */ +export function plannedForDryInput(p: PlannedStep, mode: Mode, pending: DryPending): string | null { + if (mode === 'apply' || !p.argv || p.skip) return null; + const w = words(p.argv); + const k2 = w.slice(0, 2).join(' '); + if (CONSUMERS.includes(k2) && !p.argv.some(a => /\.(ipa|aab|pkg)$/.test(a)) && pending.built.has(storeKey(p.argv))) { + pending.uploaded.add(storeKey(p.argv)); + return `planned: would upload the ${k2 === 'play upload' ? 'AAB' : storeKey(p.argv).endsWith(':mac') ? 'PKG' : 'IPA'} the ${w[0]} build step writes (dry run: nothing built)`; + } + if (AFTER_UPLOAD.includes(w.slice(0, 3).join(' ')) && pending.uploaded.has('apple')) return 'planned: the build is not on App Store Connect in a dry run'; + return null; +} + /** Index of the step to start from: --from (exact, or the first id under a sub-flow prefix). */ export function startIndex(steps: FlowStep[], from: string | undefined): number { if (!from) return 0; diff --git a/cli/lib/signing.ts b/cli/lib/signing.ts index 9b28e45..55623be 100644 --- a/cli/lib/signing.ts +++ b/cli/lib/signing.ts @@ -113,7 +113,7 @@ export interface CertChoice { cert: ApiCert | null; why: string; usable: ApiCert /** A certificate is usable when it is of the wanted type, active, valid for 30 more days and this machine holds its * private key (a key file in .storebound/signing or a code signing identity in the keychain). Newest first. */ -export function pickCertificate(certs: ApiCert[], type: CertType, hasKey: (c: ApiCert) => boolean, now = Date.now()): CertChoice { +export function pickCertificate(certs: ApiCert[], type: CertType, hasKey: (c: ApiCert) => boolean, now = Date.now(), platform: string = process.platform): CertChoice { const ofType = certs.filter(c => c.attributes.certificateType === type && c.attributes.activated !== false); const valid = ofType.filter(c => Date.parse(c.attributes.expirationDate ?? '') > now); const expiring = valid.filter(c => Date.parse(c.attributes.expirationDate!) - now < 30 * 86_400_000); @@ -121,7 +121,9 @@ export function pickCertificate(certs: ApiCert[], type: CertType, hasKey: (c: Ap const withoutKey = valid.filter(c => !hasKey(c)); const cert = usable[0] ?? null; const why = cert ? `using ${cert.attributes.name ?? cert.attributes.displayName ?? type} (expires ${cert.attributes.expirationDate?.slice(0, 10)})` - : withoutKey.length ? `${withoutKey.length} ${type} certificate(s) on the team, but this machine has none of their private keys: a new one is needed (or import the .p12 from the Mac that made it)` + : withoutKey.length ? `${withoutKey.length} ${type} certificate(s) on the team, but this machine has none of their private keys: ${platform === 'darwin' + ? 'a new one is needed (or import the .p12 from the Mac that made it)' + : 'this machine cannot build or sign for Apple. The keys live on the Mac that made the certificates: build there (e.g. over ssh to that Mac). Do not create another certificate, Apple caps them per team'}` : `no valid ${type} certificate`; return { cert, why, usable, withoutKey, expiring }; } diff --git a/cli/validate.ts b/cli/validate.ts index 539f453..b95f7a2 100644 --- a/cli/validate.ts +++ b/cli/validate.ts @@ -34,7 +34,7 @@ import { rendersCheck } from './shots/check'; import { resolvedTablets } from './shots/report'; import { runScan } from './lib/scan'; import type { ScanFinding } from './lib/scan/rules'; -import { playClient } from './play/client'; +import { EDIT_GONE, playClient } from './play/client'; import { listOneTimeProducts } from './play/products'; import { creativeNote } from './shots/creative'; import { creativeWaiting, localCreative } from './apple/creative-assets'; @@ -117,7 +117,7 @@ export async function collectApple(ctx: Ctx): Promise { const every = await allVersions(c, appId); const editableOf = (x: J) => APPLE_EDITABLE.has(stateOf(x)); const withEditable = [...new Set(every.filter(editableOf).map(platformOf))]; - const platform: AscPlatform = parsePlatform(ctx.args.get('platform')) ?? (withEditable.length === 1 ? withEditable[0]! : withEditable.includes('IOS') || !every.length ? 'IOS' : platformOf(every[0])); + const platform: AscPlatform = parsePlatform(ctx.args.get('platform')) ?? (withEditable.length === 1 ? withEditable[0]! : withEditable.includes('IOS') || !every.length || every.some(x => platformOf(x) === 'IOS') ? 'IOS' : platformOf(every[0])); const versions = await c.all(versionsPath(appId, platform, 10)); const v: J = (await c.editableVersion(platform)) ?? versions[0] ?? null; const otherPlatformVersions = every.filter(x => platformOf(x) !== platform && editableOf(x)).map(x => ({ versionString: String(x.attributes.versionString), state: stateOf(x), platform: platformOf(x) })); @@ -186,7 +186,7 @@ export async function collectApple(ctx: Ctx): Promise { deviceFamilies: platform === 'IOS' ? await deviceFamilyVerdicts(ctx, c, appId) : undefined, build, locales, reviewDetail, ageRating, expectedLocales: config.languages.map(l => l.apple).filter((x): x is string => !!x), - requiredDisplayTypes: requiredDisplayTypes(config.apple), + requiredDisplayTypes: requiredDisplayTypes(config.apple, platform), iphoneDuo: !!config.apple?.iphoneDuo, play: !!config.play, macVersion: every.some(x => platformOf(x) === 'MAC_OS'), mac: !!config.apple?.mac, priceSchedule: !!sched?.included?.some((x: J) => x.type === 'appPrices'), @@ -202,23 +202,25 @@ export async function collectPlay(ctx: Ctx): Promise { const { config, root } = ctx.loaded; const play = await playClient(root, config.play!.packageName); const tablets = resolvedTablets(config, ctx.loaded.resolve(ctx.args.get('src') ?? config.renders ?? config.shots?.out ?? 'store/renders')); - const e = await play.call<{ id: string }>('POST', `${play.API}/edits`, {}); - log('validate', `play: read-only edit ${e.id} (deleted afterwards)`); - try { - const details = await play.call<{ defaultLanguage?: string; contactWebsite?: string }>('GET', `${play.API}/edits/${e.id}/details`); - const raw = (await play.call<{ listings?: { language: string; title?: string; shortDescription?: string; fullDescription?: string }[] }>('GET', `${play.API}/edits/${e.id}/listings`)).listings ?? []; + // play.read: one edit under the machine lock, deleted only after every read inside has finished, and opened anew once + // when Play invalidates it meanwhile ("This Edit has been deleted"). A bare POST /edits here was neither locked nor + // retried, so another storebound process (or the Console) ending the edit failed the screenshot reads with a false blocker. + return play.read(async editId => { + log('validate', `play: read-only edit ${editId} (deleted afterwards)`); + const details = await play.call<{ defaultLanguage?: string; contactWebsite?: string }>('GET', `${play.API}/edits/${editId}/details`); + const raw = (await play.call<{ listings?: { language: string; title?: string; shortDescription?: string; fullDescription?: string }[] }>('GET', `${play.API}/edits/${editId}/listings`)).listings ?? []; const listings: PlaySnapshot['listings'] = []; for (const l of raw) { const images: Record = {}; for (const type of Object.keys(playRequiredImages(tablets))) - images[type] = ((await play.call<{ images?: unknown[] }>('GET', `${play.API}/edits/${e.id}/listings/${l.language}/${type}`)).images ?? []).length; + images[type] = ((await play.call<{ images?: unknown[] }>('GET', `${play.API}/edits/${editId}/listings/${l.language}/${type}`)).images ?? []).length; listings.push({ ...l, images }); } - const tracks = ((await play.call<{ tracks?: { track: string; releases?: { status: string; versionCodes?: string[]; userFraction?: number }[] }[] }>('GET', `${play.API}/edits/${e.id}/tracks`)).tracks ?? []) + const tracks = ((await play.call<{ tracks?: { track: string; releases?: { status: string; versionCodes?: string[]; userFraction?: number }[] }[] }>('GET', `${play.API}/edits/${editId}/tracks`)).tracks ?? []) .map(t => ({ track: t.track, releases: (t.releases ?? []).map(r => ({ status: r.status, versionCodes: r.versionCodes ?? [], userFraction: r.userFraction })) })); const products = (await listOneTimeProducts(play)).map(p => ({ productId: p.productId, states: (p.purchaseOptions ?? []).map(o => o.state ?? '') })); // the production track's countries (read-only in the API: set in the console, `console plan play-production-countries`) - const productionCountries = await play.call<{ countries?: unknown[]; restOfWorld?: boolean }>('GET', `${play.API}/edits/${e.id}/countryAvailability/production`) + const productionCountries = await play.call<{ countries?: unknown[]; restOfWorld?: boolean }>('GET', `${play.API}/edits/${editId}/countryAvailability/production`) .then(r => (r.restOfWorld ? -1 : (r.countries ?? []).length)).catch(() => null); const website = details.contactWebsite ?? null; const appAdsLines = config.ads?.appAdsTxt ?? []; @@ -245,9 +247,7 @@ export async function collectPlay(ctx: Ctx): Promise { expectedProducts: (config.products ?? []).filter(p => sellsOn(config, p, 'play')).map(p => p.id), privacyUrl: await checkUrl(config.app.privacyPolicyUrl), website, appAds, appAdsLines, adsLikely, category: playCategoryOf(config), productionCountries, }; - } finally { - await play.call('DELETE', `${play.API}/edits/${e.id}`).catch(() => {}); - } + }); } /** Scan findings as validate findings: blocker stays blocker, high / medium become warnings; low and owner-accepted @@ -279,7 +279,13 @@ export async function run(ctx: Ctx): Promise { const access = await brokerFindings(ctx.loaded).catch(e => [{ store: 'play' as const, level: 'warn' as const, code: 'broker-unavailable', msg: (e as Error).message }]); findings.push(...access); try { findings.push(...playRules({ ...(await collectPlay(ctx)), renders: local?.play })); } - catch (e) { findings.push({ store: 'play', level: 'blocker', code: 'api', msg: (e as Error).message.slice(0, 600) }, ...rendersFindings('play', local?.play)); } + catch (e) { + // a Play edit that vanished under the reads is a tool problem (the retry inside play.read failed too), never a store blocker + const gone = EDIT_GONE.test((e as Error).message); + findings.push(gone + ? { store: 'play', level: 'warn', code: 'edit-gone', msg: `Play validate could not finish its read-only edit (${(e as Error).message.slice(0, 300)}): a tool problem, not a store finding`, fix: 'storebound validate --play (run it again; close other storebound runs and Console saves first)' } + : { store: 'play', level: 'blocker', code: 'api', msg: (e as Error).message.slice(0, 600) }, ...rendersFindings('play', local?.play)); + } } else if (a.has('play')) warn('validate', 'no play section in the config'); // Game Center / Play Games Services: entitlement, APP_ID resource, store state vs the config if (config.games || config.apple) { diff --git a/docs/api-coverage.md b/docs/api-coverage.md index 6ffd6c3..e5db8ff 100644 --- a/docs/api-coverage.md +++ b/docs/api-coverage.md @@ -651,7 +651,7 @@ Specs: Apple [App Store Connect API 4.5.1](https://developer.apple.com/sample-co | `builds_buildBetaDetail_getToOneRelationship` | GET | `/v1/builds/{id}/relationships/buildBetaDetail` | read | | | `builds_diagnosticSignatures_getToManyRelated` | GET | `/v1/builds/{id}/diagnosticSignatures` | read | health | | `builds_diagnosticSignatures_getToManyRelationship` | GET | `/v1/builds/{id}/relationships/diagnosticSignatures` | read | | -| `builds_getCollection` | GET | `/v1/builds` | read | apple/build, apple/build-mas, apple/encryption, apple/listing, apple/next-build, apple/resubmit, apple/status, apple/testflight, apple/upload, art, health, lib/store-apps, triage | +| `builds_getCollection` | GET | `/v1/builds` | read | apple/encryption, apple/listing, apple/next-build, apple/resubmit, apple/status, apple/testflight, apple/upload, art, health, lib/store-apps, triage | | `builds_getInstance` | GET | `/v1/builds/{id}` | read | apple/device-families | | `builds_icons_getToManyRelated` | GET | `/v1/builds/{id}/icons` | read | | | `builds_icons_getToManyRelationship` | GET | `/v1/builds/{id}/relationships/icons` | read | | @@ -1565,9 +1565,9 @@ Specs: Apple [App Store Connect API 4.5.1](https://developer.apple.com/sample-co | `androidpublisher.appstorecatalog.recentupdateevents.list` | GET | `androidpublisher/v3/appstorecatalog/{appStorePackageName}/recentUpdateEvents` | read | | | **androidpublisher.edits** (5) | | | | | | `androidpublisher.edits.commit` | POST | `androidpublisher/v3/applications/{packageName}/edits/{editId}:commit` | owner only (typed confirm) | play/client | -| `androidpublisher.edits.delete` | DELETE | `androidpublisher/v3/applications/{packageName}/edits/{editId}` | owner only (typed confirm) | apps, onboard, play/client, validate | +| `androidpublisher.edits.delete` | DELETE | `androidpublisher/v3/applications/{packageName}/edits/{editId}` | owner only (typed confirm) | apps, onboard, play/client | | `androidpublisher.edits.get` | GET | `androidpublisher/v3/applications/{packageName}/edits/{editId}` | read | | -| `androidpublisher.edits.insert` | POST | `androidpublisher/v3/applications/{packageName}/edits` | write (dry by default) | apps, onboard, play/client, validate | +| `androidpublisher.edits.insert` | POST | `androidpublisher/v3/applications/{packageName}/edits` | write (dry by default) | apps, onboard, play/client | | `androidpublisher.edits.validate` | POST | `androidpublisher/v3/applications/{packageName}/edits/{editId}:validate` | write (dry by default) | play/client | | **androidpublisher.edits.apks** (3) | | | | | | `androidpublisher.edits.apks.addexternallyhosted` | POST | `androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/externallyHosted` | write (dry by default) | | diff --git a/skills/release-flows/SKILL.md b/skills/release-flows/SKILL.md index 266e326..b5dfb0a 100644 --- a/skills/release-flows/SKILL.md +++ b/skills/release-flows/SKILL.md @@ -18,7 +18,7 @@ shell after the dry run). ```yaml description: Build, upload and check one version on both stores params: - VERSION: "1.0.0" # flow run release VERSION=1.2.0 overrides + VERSION: "?" # "?" = required: flow run release VERSION=1.2.0 (no silent default; --resume reuses the last run's) steps: - id: next-build if: apple # apple | play | exists | ${VAR} | !${VAR} | ${A} == x; && joins @@ -36,6 +36,10 @@ before: [] # hooks: before / after the steps, onError when a after: [] onError: [] ``` +`${config.testflight.internal}` is filled by the runner with the internal groups of `apple.testflight.groups` (empty when +none); the beta template uses it when `GROUP` is empty. The release template has optional steps by param: `MAC_TAURI=` +adds the macOS build + upload, `PLAY_TRACK=beta` uploads to Play open testing (default `internal`); its `promote` step is an +owner step listing the Play promotion. `continueOnError: true` lets a step fail without stopping the flow. A web build before the native builds (Capacitor: `npm run build && npx cap sync`) belongs in `build.prebuild` in the config rather than an `sh:` step: `apple build` and `play build` run it themselves, and within one `flow run` it runs @@ -44,7 +48,8 @@ once (the second build step prints "prebuild skipped (already ran in this flow r ## Modes - `flow run release VERSION=1.2.0` (default): read steps (check, validate, scan, release plan, next-build, status ...) run for real; **every write step runs with `--dry`**; wait steps check once; shell steps are skipped. Nothing - changes. Show this output to the owner. + changes. Show this output to the owner. A dry `apple build` / `play build` writes no IPA / AAB, so the upload after it + (and `apple testflight wait` / `distribute` after that) is shown as "planned" instead of failing; a real run is unchanged. - `--dry`: the plan only, nothing runs. - `--apply`: writes and shell steps run for real; each write command still asks its own confirmation in the terminal. Never add `--yes` to a step (flow validate refuses it). diff --git a/templates/workflows/beta.yml b/templates/workflows/beta.yml index 6049b2e..2dfe6f1 100644 --- a/templates/workflows/beta.yml +++ b/templates/workflows/beta.yml @@ -1,9 +1,11 @@ # storebound flow "beta" for a game: a playtest build on TestFlight and Play internal testing. # storebound flow run beta VERSION=1.2.0 [--apply] +# VERSION is required ("?"). GROUP empty = the internal group of apple.testflight.groups (the group `internal: true`); +# GROUP= picks a TestFlight group that exists (or is listed in apple.testflight.groups). description: Next game build to TestFlight and Play internal testing params: - VERSION: "1.0.0" - GROUP: "Playtesters" + VERSION: "?" + GROUP: "" steps: - id: check run: check @@ -25,8 +27,14 @@ steps: if: apple run: apple testflight wait --build ${BUILD} --version ${VERSION} - id: distribute - if: apple + if: apple && ${GROUP} run: apple testflight distribute --build ${BUILD} --group ${GROUP} + - id: distribute-internal + if: apple && !${GROUP} && ${config.testflight.internal} + run: apple testflight distribute --build ${BUILD} --group ${config.testflight.internal} + - id: no-group + if: apple && !${GROUP} && !${config.testflight.internal} + owner: "No TestFlight group: pass GROUP= or add a group with internal: true to apple.testflight.groups, then storebound apple testflight distribute --build ${BUILD} --group " - id: play-build if: play run: play build --version-name ${VERSION} diff --git a/templates/workflows/release.yml b/templates/workflows/release.yml index f73ecca..13d9d79 100644 --- a/templates/workflows/release.yml +++ b/templates/workflows/release.yml @@ -3,10 +3,13 @@ # storebound flow run release VERSION=1.2.0 --apply writes run for real; each command still asks you first # storebound flow run release --resume --apply continue after fixing a failed step # Steps are storebound commands (no "storebound" prefix). `if: apple` / `if: play` skip a store the config does not -# have; `owner:` steps are never run, they list what you click. `sh:` runs your own build command (only with --apply). +# have; `if: ${PARAM}` turns an optional step on by a param (MAC_TAURI= adds the macOS build, PLAY_TRACK=beta +# uploads to Play open testing); VERSION is required; `owner:` steps are never run, they list what you click. `sh:` runs your own build command (only with --apply). description: Build, upload and check one game version on both stores, then your Submit click params: - VERSION: "1.0.0" + VERSION: "?" + MAC_TAURI: "" + PLAY_TRACK: "internal" steps: - id: shots if: exists store/renders @@ -24,12 +27,21 @@ steps: - id: wait if: apple run: apple testflight wait --build ${BUILD} --version ${VERSION} + - id: mac-build + if: apple && ${MAC_TAURI} + run: apple build --platform macos --tauri ${MAC_TAURI} --version ${VERSION} --build-number ${BUILD} + - id: mac-upload + if: apple && ${MAC_TAURI} + run: apple upload --platform macos --no-wait --allow-existing - id: play-build if: play run: play build --version-name ${VERSION} - id: play-upload if: play - run: play upload --track internal + run: play upload --track ${PLAY_TRACK} + - id: promote + if: play && ${PLAY_TRACK} != production + owner: "Play Console: promote the ${PLAY_TRACK} release to production (storebound play release --version-code --production completed once you agree)" - id: whats-new if: exists store/whats-new run: whats-new apply @@ -43,4 +55,4 @@ steps: - id: plan run: release plan ${VERSION} - id: submit - owner: "App Store Connect: Submit for Review (version ${VERSION}, build ${BUILD}). Play Console: promote the internal release and Send changes for review" + owner: "App Store Connect: Submit for Review (version ${VERSION}, build ${BUILD}). Play Console: promote the ${PLAY_TRACK} release and Send changes for review" diff --git a/tests/flow-dry.test.ts b/tests/flow-dry.test.ts new file mode 100644 index 0000000..7dd5ccc --- /dev/null +++ b/tests/flow-dry.test.ts @@ -0,0 +1,100 @@ +// storebound flow, dry runs: a step whose input (the IPA / AAB, the uploaded build) only a real earlier step makes is +// planned, not failed; a real run is untouched. The beta template: required VERSION, GROUP empty = the config's internal group. +import { afterAll, describe, expect, test } from 'bun:test'; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { type DryPending, evalIf, expand, flowsOfFile, missingParams, noteDry, planStep, plannedForDryInput, substitute, validateFlows } from '../cli/lib/flow'; +import { parseYaml } from '../cli/lib/yaml'; +import { readFileSync } from 'node:fs'; + +const ROOT = join(import.meta.dir, '..'); +const CLI = join(ROOT, 'cli', 'index.ts'); +const tmp = mkdtempSync(join(tmpdir(), 'storebound-flow-dry-')); +afterAll(() => rmSync(tmp, { recursive: true, force: true })); +const sb = (cwd: string, ...args: string[]) => Bun.spawnSync([process.execPath, CLI, ...args], { cwd, stdout: 'pipe', stderr: 'pipe', stdin: 'ignore' }); +const C = { apple: true, play: true, exists: () => false }; + +const load = (name: string) => flowsOfFile(`templates/workflows/${name}.yml`, parseYaml(readFileSync(join(ROOT, 'templates', 'workflows', `${name}.yml`), 'utf8')), name).flows[0]!; + +/** What the runner decides per step in a mode: 'ran' (storebound is called), 'planned' (dry input missing) or 'skipped'. */ +function simulate(name: string, mode: 'dry' | 'apply', vars: Record) { + const f = load(name); + const pending: DryPending = { built: new Set(), uploaded: new Set() }; + const out: Record = {}; + for (const s of expand(f, new Map([[f.name, f]]), 'steps').steps) { + const p = planStep(s, 'steps', mode, vars, C); + if (p.skip) { out[s.id] = { how: 'skipped', argv: p.argv, owner: p.owner }; continue; } + const why = plannedForDryInput(p, mode, pending); + if (why) { out[s.id] = { how: 'planned', argv: p.argv }; continue; } + noteDry(p, pending); + out[s.id] = { how: 'ran', argv: p.argv }; + } + return out; +} + +describe('dry flows plan what a dry earlier step cannot produce', () => { + test('beta: dry build then upload (and wait, distribute) are planned, reads and checks still run', () => { + const r = simulate('beta', 'dry', { VERSION: '1.2.0', GROUP: '', BUILD: '7', 'config.testflight.internal': 'Team' }); + expect(r['build']).toMatchObject({ how: 'ran', argv: ['apple', 'build', '--version', '1.2.0', '--build-number', '7', '--dry'] }); + expect(r['upload']!.how).toBe('planned'); + expect(r['wait']!.how).toBe('planned'); + expect(r['distribute-internal']!.how).toBe('planned'); + expect(r['play-build']!.how).toBe('ran'); + expect(r['play-upload']!.how).toBe('planned'); + expect(r['check']!.how).toBe('ran'); + }); + + test('a real run is untouched: upload with no IPA still runs (and fails inside the command)', () => { + const r = simulate('beta', 'apply', { VERSION: '1.2.0', GROUP: '', BUILD: '7', 'config.testflight.internal': 'Team' }); + expect(r['upload']).toMatchObject({ how: 'ran', argv: ['apple', 'upload', '--no-wait', '--build', '7', '--allow-existing'] }); + expect(r['play-upload']!.how).toBe('ran'); + }); + + test('an upload of a named file, or without a dry build before it, is not planned away', () => { + const pending: DryPending = { built: new Set(['apple']), uploaded: new Set() }; + const up = planStep({ id: 'u', run: 'apple upload build/App.ipa' }, 'steps', 'dry', {}, C); + expect(plannedForDryInput(up, 'dry', pending)).toBeNull(); + const fresh: DryPending = { built: new Set(), uploaded: new Set() }; + expect(plannedForDryInput(planStep({ id: 'u', run: 'apple upload --no-wait' }, 'steps', 'dry', {}, C), 'dry', fresh)).toBeNull(); + }); + + test('release: the macOS pkg is tracked apart from the iOS IPA', () => { + const r = simulate('release', 'dry', { VERSION: '2.0.0', MAC_TAURI: 'src-tauri', PLAY_TRACK: 'beta', BUILD: '9' }); + expect(r['build']!.how).toBe('ran'); + expect(r['upload']!.how).toBe('planned'); + expect(r['mac-build']!.argv).toContain('--dry'); + expect(r['mac-upload']!.how).toBe('planned'); + expect(r['play-upload']!.argv).toEqual(['play', 'upload', '--track', 'beta', '--dry']); + const off = simulate('release', 'dry', { VERSION: '2.0.0', MAC_TAURI: '', PLAY_TRACK: 'internal', BUILD: '9' }); + expect(off['mac-build']!.how).toBe('skipped'); + expect(off['mac-upload']!.how).toBe('skipped'); + expect(off['promote']!.owner).toContain('internal'); + }); +}); + +describe('beta template defaults', () => { + test('VERSION is required, GROUP defaults to empty and falls to the internal group of the config', () => { + const f = load('beta'); + expect(f.params['VERSION']).toBe('?'); + expect(f.params['GROUP']).toBe(''); + expect(missingParams({ ...f.params })).toEqual(['VERSION']); + expect(missingParams({ ...f.params, VERSION: '1.0.0' })).toEqual([]); + const steps = expand(f, new Map([[f.name, f]]), 'steps').steps; + const by = (v: Record) => steps.filter(s => s.id.startsWith('distribute') || s.id === 'no-group') + .filter(s => evalIf(substitute(s.if ?? '', v), C)).map(s => s.id); + expect(by({ GROUP: '', 'config.testflight.internal': 'Team' })).toEqual(['distribute-internal']); + expect(by({ GROUP: 'QA', 'config.testflight.internal': 'Team' })).toEqual(['distribute']); + expect(by({ GROUP: '', 'config.testflight.internal': '' })).toEqual(['no-group']); + expect(validateFlows([f, load('release')])).toEqual([]); + }); + + test('flow run beta without VERSION fails early with a clear message', () => { + const dir = join(tmp, 'req'); + mkdirSync(join(dir, 'store', 'workflows'), { recursive: true }); + writeFileSync(join(dir, 'store', 'workflows', 'beta.yml'), readFileSync(join(ROOT, 'templates', 'workflows', 'beta.yml'), 'utf8')); + const p = sb(dir, 'flow', 'run', 'beta'); + expect(p.exitCode).not.toBe(0); + expect(p.stderr.toString() + p.stdout.toString()).toContain('beta needs VERSION='); + }); +}); diff --git a/tests/next-build-platforms.test.ts b/tests/next-build-platforms.test.ts new file mode 100644 index 0000000..7b4fa28 --- /dev/null +++ b/tests/next-build-platforms.test.ts @@ -0,0 +1,73 @@ +// One app record, an iOS and a macOS App Store version (pitfall 79): CFBundleVersion must be unique across ALL the app's +// builds, so `apple next-build`, `apple build` and `apple build --platform macos` (also --dry) share one computation. +// Seen live: the macOS dry run proposed a build number an uploaded macOS build already had (it asked only for macOS +// builds), while next-build said the right one. Against the fake App Store Connect. +import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test'; +import type { ShipConfig } from '../cli/lib/config'; +import { appNextBuild, run as nextBuild } from '../cli/apple/next-build'; +import { identityLine, run as buildMas } from '../cli/apple/build-mas'; +import { ascEnv, BASE, capture, project, restore } from './helpers/store-mock'; +import { installStores, type Stores, uninstallStores } from './helpers/fake-stores'; + +const APP = '6400000101'; +const CONFIG: ShipConfig = { ...BASE }; +const TAURI = JSON.stringify({ productName: 'Example Notes', identifier: 'com.example.notes', version: '1.2.0' }); +let s: Stores; +beforeAll(ascEnv); +afterAll(restore); +beforeEach(() => { s = installStores(); }); +afterEach(uninstallStores); + +const build = (id: string, version: string, state = 'VALID') => s.asc.put({ type: 'builds', id, attributes: { version, processingState: state }, rels: { app: APP } }); +/** iOS builds 202610261700 / ...1730, a macOS build ...1731 and an expired one ...1734 in another state. */ +function seed(): void { + build('b-ios-1', '202610261700'); + build('b-ios-2', '202610261730'); + build('b-mac-1', '202610261731'); + build('b-mac-2', '202610261734', 'PROCESSING'); +} + +describe('next build number over every platform', () => { + test('apple next-build and the macOS dry run agree and sit above the highest build', async () => { + seed(); + const p = project(CONFIG, { 'src-tauri/tauri.conf.json': TAURI }); + const nb = await capture(() => nextBuild(p.ctx(['--json']))); + expect(JSON.parse(nb.out)).toEqual({ next: '202610261735', builds: 4 }); + const dry = await capture(() => buildMas(p.ctx(['--tauri', 'src-tauri', '--unsigned', '--dry', '--json']), 'linux')); + expect(JSON.parse(dry.out.slice(dry.out.indexOf('{')))).toMatchObject({ platform: 'MAC_OS', build: '202610261735' }); + }); + test('no request narrows the build list to one platform', async () => { + seed(); + const p = project(CONFIG, { 'src-tauri/tauri.conf.json': TAURI }); + await capture(() => buildMas(p.ctx(['--tauri', 'src-tauri', '--unsigned', '--dry', '--json']), 'linux')); + const reads = s.calls.filter(c => /\/v1\/builds/.test(c.path)); + expect(reads.length).toBeGreaterThan(0); + for (const r of reads) expect(decodeURIComponent(r.path)).not.toMatch(/preReleaseVersion|platform|processingState/); + }); + test('every page counts', async () => { + const pages: Record = { + '/p1': { data: [{ attributes: { version: '5' } }], links: { next: '/p2' } }, + '/p2': { data: [{ attributes: { version: '41' } }], links: { next: '/p3' } }, + '/p3': { data: [{ attributes: { version: '9' } }], links: {} }, + }; + const seen: string[] = []; + const client = { app: async () => APP, all: async (path: string) => { seen.push(path); const out: unknown[] = []; for (let u: string | undefined = '/p1'; u; u = (pages[u] as { links: { next?: string } }).links.next) out.push(...(pages[u] as { data: unknown[] }).data); return out; } }; + expect(await appNextBuild(client as never)).toEqual({ next: '42', builds: 3 }); + expect(seen[0]).toContain(`filter[app]=${APP}`); + }); + test('an app without builds starts at 1', async () => { + expect((await appNextBuild({ app: async () => APP, all: async () => [] } as never)).next).toBe('1'); + }); +}); + +describe('identity line off a Mac', () => { + test('a non-macOS machine is called a non-build machine, not "none found"', () => { + const line = identityLine({ platform: 'win32', appIdentity: null, installerIdentity: null, profile: null }); + expect(line).toContain('not a build machine'); + expect(line).toContain('Mac'); + expect(line).not.toContain('none found'); + }); + test('on a Mac a missing identity is still reported as missing', () => { + expect(identityLine({ platform: 'darwin', appIdentity: null, installerIdentity: 'Mac Installer', profile: null })).toContain('app identity: (none found); installer identity: Mac Installer'); + }); +}); diff --git a/tests/validate-macos.test.ts b/tests/validate-macos.test.ts new file mode 100644 index 0000000..baae419 --- /dev/null +++ b/tests/validate-macos.test.ts @@ -0,0 +1,52 @@ +// A macOS App Store version is checked against the Mac screenshot set only (APP_DESKTOP), never the iPhone / iPad +// sets: validate / release plan showed 2 false blockers per locale for an app whose editable version was macOS. +// Also: a non-macOS machine without the certificates' keys must not be told to create another certificate. +import { describe, expect, test } from 'bun:test'; +import { requiredDisplayTypes } from '../cli/apple/screenshots'; +import { pickCertificate, type ApiCert } from '../cli/lib/signing'; +import { appleRules, type AppleSnapshot } from '../cli/lib/validate-rules'; + +const snap = (platform: string, apple: Parameters[0], shots: Record): AppleSnapshot => ({ + version: { versionString: '1.0.0', state: 'PREPARE_FOR_SUBMISSION', platform }, build: null, expectedLocales: ['en-US', 'de-DE'], + locales: ['en-US', 'de-DE'].map(locale => ({ locale, name: 'n', subtitle: 's', description: 'd', keywords: 'k', screenshots: shots })), + requiredDisplayTypes: requiredDisplayTypes(apple, platform), mac: !!apple?.mac, macVersion: platform === 'MAC_OS', + reviewDetail: null, ageRating: null, priceSchedule: true, availability: true, iaps: [], expectedProducts: [], privacyUrl: { url: 'https://example.com/privacy', status: 200 }, +} as AppleSnapshot); +const shotBlockers = (s: AppleSnapshot) => appleRules(s).filter(x => x.level === 'blocker' && x.code.startsWith('screenshots')); + +describe('required screenshot types per platform', () => { + test('macOS: the Mac set with apple.mac, nothing else; apple.screenshotTypes stays the iOS list', () => { + expect(requiredDisplayTypes({ ipad: true, mac: true }, 'MAC_OS')).toEqual(['APP_DESKTOP']); + expect(requiredDisplayTypes({ ipad: true, mac: true, screenshotTypes: ['APP_IPHONE_67'] }, 'MAC_OS')).toEqual(['APP_DESKTOP']); + expect(requiredDisplayTypes({ ipad: true }, 'MAC_OS')).toEqual([]); + expect(requiredDisplayTypes({ ipad: true, mac: true, screenshotTypes: ['APP_IPHONE_67'] })).toEqual(['APP_IPHONE_67']); + expect(requiredDisplayTypes({ ipad: true })).toEqual(['APP_IPHONE_61', 'APP_IPAD_PRO_3GEN_129']); + expect(requiredDisplayTypes({ ipad: true }, 'TV_OS')).toEqual([]); + }); + test('a macOS version with Mac screenshots and no iPhone / iPad ones has no screenshot blocker', () => { + expect(shotBlockers(snap('MAC_OS', { ipad: true, mac: true }, { APP_DESKTOP: 3 }))).toEqual([]); + }); + test('a macOS version without the Mac set is missing APP_DESKTOP only', () => { + const b = shotBlockers(snap('MAC_OS', { ipad: true, mac: true }, {})); + expect(b.map(x => x.msg)).toEqual(['en-US: no APP_DESKTOP screenshots', 'de-DE: no APP_DESKTOP screenshots']); + }); + test('an iOS version still needs the iPhone and iPad sets', () => { + expect(shotBlockers(snap('IOS', { ipad: true, mac: true }, { APP_DESKTOP: 3 })).length).toBe(4); + }); +}); + +describe('certificate without a local key', () => { + const c = (id: string): ApiCert => ({ id, attributes: { certificateType: 'DISTRIBUTION', activated: true, expirationDate: new Date(Date.now() + 400 * 864e5).toISOString() } }); + test('macOS: a new one or the .p12 import', () => { + expect(pickCertificate([c('a')], 'DISTRIBUTION', () => false, Date.now(), 'darwin').why).toContain('a new one is needed'); + }); + test('Windows / Linux: build on the Mac, never a new certificate', () => { + for (const p of ['win32', 'linux']) { + const why = pickCertificate([c('a')], 'DISTRIBUTION', () => false, Date.now(), p).why; + expect(why).toContain('none of their private keys'); + expect(why).toContain('cannot build or sign for Apple'); + expect(why).toContain('Do not create another certificate'); + expect(why).not.toContain('a new one is needed'); + } + }); +}); diff --git a/tests/validate-play-edit.test.ts b/tests/validate-play-edit.test.ts new file mode 100644 index 0000000..fb21da1 --- /dev/null +++ b/tests/validate-play-edit.test.ts @@ -0,0 +1,91 @@ +// `storebound validate --play` read its screenshots with a bare POST /edits and a DELETE in a finally: not under the +// machine lock and never retried. When Play (or another storebound process) ended that edit meanwhile, the next read +// answered 400 "This Edit has been deleted" and validate printed it as a store blocker ("GET .../phoneScreenshots 400"). +// Now the reads run in play.read (one locked edit, deleted only after all reads, redone once with a new edit), and a +// vanished edit that stays gone is a tool warning, never a blocker. +import { afterEach, beforeEach, describe, expect, test } from 'bun:test'; +import { generateKeyPairSync } from 'node:crypto'; +import { mkdtempSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { parseArgs } from '../cli/lib/args'; +import type { Loaded, ShipConfig } from '../cli/lib/config'; +import { collectPlay, run } from '../cli/validate'; +import { installStores, type Stores, uninstallStores } from './helpers/fake-stores'; + +const PKG = 'com.example.game'; +const GONE = { error: { code: 400, status: 'FAILED_PRECONDITION', message: 'This Edit has been deleted.' } }; +let s: Stores; +let savedKey: string | undefined; + +beforeEach(() => { + savedKey = process.env.PLAY_SERVICE_ACCOUNT; + const { privateKey } = generateKeyPairSync('rsa', { modulusLength: 2048 }); + process.env.PLAY_SERVICE_ACCOUNT = JSON.stringify({ client_email: 'sb@example.com', private_key: privateKey.export({ type: 'pkcs8', format: 'pem' }).toString(), token_uri: 'https://oauth2.googleapis.com/token' }); + s = installStores(); + // the fake has no countryAvailability route (the console owns it): a plain 404, which validate reads as "not readable" + s.faults.push({ method: 'GET', match: /countryAvailability/, status: 404, when: 'before', times: 99 }); + s.play.live.listings['en-US'] = { language: 'en-US', title: 'Example Game', shortDescription: 'Short.', fullDescription: 'Full.' }; +}); +afterEach(() => { + uninstallStores(); + if (savedKey === undefined) delete process.env.PLAY_SERVICE_ACCOUNT; else process.env.PLAY_SERVICE_ACCOUNT = savedKey; +}); + +function loaded(): Loaded { + const root = mkdtempSync(join(tmpdir(), 'sb-vpe-')); + const config = { app: { name: 'Example Game', privacyPolicyUrl: '' }, languages: [{ id: 'en', play: 'en-US' }], play: { packageName: PKG } } as unknown as ShipConfig; + return { config, root, path: join(root, 'storebound.config.ts'), resolve: p => join(root, p) }; +} + +/** Play ends the edit under the reader: the DELETE happens on the store, the read that follows answers 400. */ +function endEditOnImageRead(times: number): { hits: () => number } { + const inner = globalThis.fetch; + let left = times, hits = 0; + globalThis.fetch = (async (input: string | URL | Request, init?: RequestInit) => { + const url = String(input instanceof Request ? input.url : input); + const m = /\/edits\/([^/]+)\/listings\/[^/]+\/phoneScreenshots$/.exec(url); + if (m && (init?.method ?? 'GET').toUpperCase() === 'GET' && left > 0) { + left--; hits++; + s.play.edits.delete(m[1]!); + return new Response(JSON.stringify(GONE), { status: 400, headers: { 'content-type': 'application/json' } }); + } + return inner(input, init); + }) as typeof fetch; + return { hits: () => hits }; +} + +describe('validate --play: the read-only edit', () => { + test('an edit ended during the screenshot reads is reopened once; the snapshot is complete and every edit is closed', async () => { + const fault = endEditOnImageRead(1); + const snap = await collectPlay({ loaded: loaded(), args: parseArgs(['--play']) }); + expect(fault.hits()).toBe(1); + expect(snap.listings.map(l => l.language)).toEqual(['en-US']); + expect(Object.keys(snap.listings[0]!.images)).toContain('phoneScreenshots'); + expect(s.play.edits.size).toBe(0); + const edits = s.calls.filter(c => c.method === 'POST' && /\/edits$/.test(c.path)); + expect(edits.length).toBe(2); + }); + + test('no image read runs after the edit was deleted', async () => { + await collectPlay({ loaded: loaded(), args: parseArgs(['--play']) }); + const del = s.calls.findIndex(c => c.method === 'DELETE' && /\/edits\/[^/]+$/.test(c.path)); + expect(del).toBeGreaterThan(-1); + expect(s.calls.slice(del + 1).filter(c => /\/edits\/[^/]+\//.test(c.path))).toEqual([]); + }); + + test('an edit that stays gone is a tool warning, never a store blocker', async () => { + endEditOnImageRead(10); + const out: string[] = []; + const log = console.log; + console.log = (...a: unknown[]) => { out.push(a.join(' ')); }; + const prev = process.exitCode; + try { await run({ loaded: loaded(), args: parseArgs(['--play', '--json', '--no-scan', '--no-health', '--no-local']) }); } finally { console.log = log; } + process.exitCode = prev; + const res = JSON.parse(out.join('\n').slice(out.join('\n').indexOf('{'))) as { blockers: number; findings: { level: string; code: string; msg: string }[] }; + expect(res.findings.filter(f => f.level === 'blocker' && /Edit has been deleted|phoneScreenshots/.test(f.msg))).toEqual([]); + expect(res.findings).toContainEqual(expect.objectContaining({ level: 'warn', code: 'edit-gone' })); + // (the template-answers blocker of the example config is unrelated: only an api blocker would be the bug) + expect(res.findings.filter(f => f.level === 'blocker' && f.code === 'api')).toEqual([]); + }); +}); From 3a8d9d7551bfb5d56f3e9d2d2c9de7418c36e43c Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 2 Nov 2026 18:19:50 +0700 Subject: [PATCH 31/73] flags: regenerate for the new apple build / flow options --- cli/data/flags.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/data/flags.json b/cli/data/flags.json index 3ef2998..59e378c 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -76,6 +76,7 @@ "configuration", "derived-data", "env-file", + "evidence", "keychain", "keychain-unlock", "locale-map", @@ -84,6 +85,7 @@ "out", "path-free", "platform", + "pre-check", "profile", "progress", "project", @@ -590,6 +592,7 @@ "since" ], "flow": [ + "apple", "apply", "from", "resume" From cdd9321794e874c4974cada44c4ce7d875587efc Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 2 Nov 2026 18:22:39 +0700 Subject: [PATCH 32/73] storebound 0.8.64: version in package.json and every copy, CHANGELOG 0.8.64 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index b2fe8dc..2c2ec96 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.63", + "version": "0.8.64", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 30a8d7e..7adbb70 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.63", + "version": "0.8.64", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 54e45ca..c3532d1 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.63", + "version": "0.8.64", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index ab04470..5404098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.64 · 2026-11-02 + - `validate` / `release plan`: a macOS version is checked against Mac screenshots (APP_DESKTOP, with `apple.mac`), not the iPhone / iPad sets; with no editable version, iOS is picked over macOS. - `validate --play`: reads go through the locked read-only edit and retry once on a fresh edit when Play ends it ("This Edit has been deleted" was shown as a blocker; it is now a warning to re-run at most). - Build numbers for macOS (`apple build --platform macos`, `apple upload` of a .pkg) come from every build of the app, as `apple next-build` does (a macOS-only list proposed a number an iOS build already had). diff --git a/apps/desktop/package.json b/apps/desktop/package.json index b4aab53..fe8ff48 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.63", + "version": "0.8.64", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index e3dbb76..5bbd8d6 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.63" +version = "0.8.64" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index d3a2306..92af0b2 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.63" +version = "0.8.64" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index febcc13..33ecd9c 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.63", + "version": "0.8.64", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index b2050da..ec54850 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.63", + "version": "0.8.64", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 462c182..efb43c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.63", + "version": "0.8.64", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From d0f568ebc2fc0ab9ee4b7b9beec33cc23d393b4c Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:14:34 +0700 Subject: [PATCH 33/73] validate: removed-from-sale IAPs are no blockers; shots capture --device landscape (Mac / Chromebook frames from a web build); playwright lookup says why each place failed --- CHANGELOG.md | 4 ++ cli/data/flags.json | 2 +- cli/lib/config.ts | 11 +++- cli/lib/validate-rules.ts | 8 ++- cli/shots/browser.ts | 14 +++-- cli/shots/capture-web.ts | 32 +++++----- cli/shots/capture.ts | 44 ++++++++----- cli/shots/devices.ts | 19 ++++-- cli/shots/lib.ts | 15 +++++ cli/shots/selectors.ts | 10 +-- skills/store-screenshots/SKILL.md | 9 ++- tests/capture-landscape.test.ts | 101 ++++++++++++++++++++++++++++++ tests/wave1.test.ts | 9 +++ 13 files changed, 230 insertions(+), 48 deletions(-) create mode 100644 tests/capture-landscape.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 5404098..e2f056b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## Unreleased +- `validate`: in-app purchases removed from sale (DEVELOPER_REMOVED_FROM_SALE, REMOVED_FROM_SALE) are no blockers; a warning only when the config still sells one. +- `shots capture --device landscape`: Mac App Store / Chromebook frames from a web build (desktop viewport at `shots.landscape.size`, default 1440x900 @2x) into `/landscape/`; on by default when the project renders a landscape size. The simulator and emulator sources skip it with a warning. +- `shots render` / `capture`: "playwright not found" now lists each place looked at and why it failed (an import error was reported as not found). + ## 0.8.64 · 2026-11-02 - `validate` / `release plan`: a macOS version is checked against Mac screenshots (APP_DESKTOP, with `apple.mac`), not the iPhone / iPad sets; with no editable version, iOS is picked over macOS. diff --git a/cli/data/flags.json b/cli/data/flags.json index 59e378c..d8952e6 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -1810,7 +1810,7 @@ "storebound settings bypass on | off | status owner opt-in: the agent also presses the owner-only buttons" ], "shots capture": [ - "storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet] [--source web|ios-sim|android-emu|folder]" + "storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet|landscape] [--source web|ios-sim|android-emu|folder]" ], "shots check": [ "storebound shots check [--lang en,tr] [--variants] [--json]" diff --git a/cli/lib/config.ts b/cli/lib/config.ts index 446ee91..5e48f4c 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -202,7 +202,9 @@ export interface ShotsConfig { /** Tablet frames: default 1032 x 1352 @2x (13" iPad minus its 24 px bar) with apple.ipad, else 800 x 1240 @2x. */ tablet?: { w: number; h: number; dpr?: number; bar?: number }; /** Landscape layout (Mac, Chromebook, and the Play tablet slots with playTablets): copy on one side, the frame on the - * other. Frames: //landscape/.png at `size` CSS px (default 1440 x 900 @2x). frame: 'window' (a + * other. Frames: //landscape/.png at `size` CSS px (default 1440 x 900 @2x = 2880 x 1800), made by + * `shots capture --device landscape` (web source: a desktop viewport, no touch, no status bar crop; ios-sim / android-emu + * have no landscape device, use a web build or a folder). frame: 'window' (a * Mac window around the game, the default for mac) or 'none' (the bare frame, the default for Play sizes). side: * where the copy goes (default 'left'). playTablets: render tab7 / tab10 landscape (1920 x 1080 / 2560 x 1440). */ landscape?: { frame?: 'window' | 'none'; side?: 'left' | 'right'; playTablets?: boolean; size?: { w: number; h: number; dpr?: number } }; @@ -217,7 +219,7 @@ export interface ShotsConfig { /** One raw frame. Web: `path` (+ query). Simulator / emulator: `url` deep link and / or `args` / `extras`. */ /** Web capture: a selector, candidates tried in order, or per layout { phone, tablet, any } (own list first). Prefer data * attributes (`[data-shot="shop-row"]`); `text=Shop` and `role=button[name="Shop"]` work as fallbacks. */ -export type ShotSelector = string | string[] | { phone?: string | string[]; tablet?: string | string[]; any?: string | string[] }; +export type ShotSelector = string | string[] | { phone?: string | string[]; tablet?: string | string[]; landscape?: string | string[]; any?: string | string[] }; export interface ShotSpec { /** Web: wait (up to the waitFor timeout) until one of these matches, before waitFor; a miss names the selector and the size. */ @@ -235,7 +237,10 @@ export interface ShotSpec { delayMs?: number; /** Web: JS run in the page before the screenshot. */ eval?: string[]; - device?: 'phone' | 'tablet' | 'both'; + /** Which frames this shot makes: phone (default), tablet, both (phone + tablet), landscape (/landscape/.png at + * shots.landscape.size, web source only). When the project renders a landscape size (apple.mac, play.chromebook, + * shots.landscape.playTablets), shots without a device and 'both' shots also make a landscape frame. */ + device?: 'phone' | 'tablet' | 'both' | 'landscape'; /** Web, capture.session "per-language": how this shot is reached in the already booted page. "spa" (default): * history.pushState to its path + a popstate event, then waitFor / eval (switch scenes from those); "reload": * page.goto in the same page. A failing waitFor there falls back to a fresh page. */ diff --git a/cli/lib/validate-rules.ts b/cli/lib/validate-rules.ts index 43d8906..c1e5491 100644 --- a/cli/lib/validate-rules.ts +++ b/cli/lib/validate-rules.ts @@ -163,6 +163,7 @@ export interface PlaySnapshot { const EDITABLE = ['PREPARE_FOR_SUBMISSION', 'DEVELOPER_REJECTED', 'REJECTED', 'METADATA_REJECTED', 'INVALID_BINARY']; const IN_FLIGHT = ['WAITING_FOR_REVIEW', 'IN_REVIEW', 'PENDING_DEVELOPER_RELEASE', 'PROCESSING_FOR_DISTRIBUTION', 'READY_FOR_DISTRIBUTION', 'READY_FOR_SALE', 'ACCEPTED']; const IAP_OK = ['READY_TO_SUBMIT', 'WAITING_FOR_REVIEW', 'IN_REVIEW', 'APPROVED']; +const IAP_OFF_SALE = ['DEVELOPER_REMOVED_FROM_SALE', 'REMOVED_FROM_SALE']; /** Age rating questions whose null means "not answered" (kidsAgeBand null = not a kids app). */ // Left null on apps App Review accepted: gracRatingClassificationNumber (a Korean GRAC rating number, for apps GRAC // rated), socialMediaAgeRestricted (asked only when socialMedia is true). socialMedia itself is a newer question that @@ -281,12 +282,17 @@ export function appleRules(s: AppleSnapshot): Finding[] { const iaps = new Map(s.iaps.map(i => [i.productId, i] as const)); for (const id of s.expectedProducts) if (!iaps.has(id)) add('blocker', 'iap', `${id}: not on App Store Connect`, 'storebound apple iap'); + const expected = new Set(s.expectedProducts); for (const i of s.iaps) { + // a product the developer took off sale (old consumables, a retired unlock) does not block a submission; it matters + // only when the config still sells it + if (IAP_OFF_SALE.includes(i.state)) { if (expected.has(i.productId)) add('warn', 'iap', `${i.productId}: ${i.state}, but the config still sells it`, 'put it back on sale in App Store Connect, or drop it from products'); continue; } if (!IAP_OK.includes(i.state)) add('blocker', 'iap', `${i.productId}: ${i.state}`, i.state === 'MISSING_METADATA' ? 'storebound apple iap + apple iap-review' : 'see the review-rejections skill'); else if (!i.reviewScreenshot && i.state !== 'APPROVED') add('blocker', 'iap', `${i.productId}: no review screenshot`, 'storebound apple iap-review'); } for (const g of s.firstProductGaps ?? []) add(g.level === 'error' ? 'blocker' : 'warn', 'iap-first', g.msg, g.fix); - if (s.iaps.length && !f.some(x => x.code === 'iap')) add('ok', 'iap', `${s.iaps.length} in-app purchases ready`); + const onSale = s.iaps.filter(i => !IAP_OFF_SALE.includes(i.state)).length, offSale = s.iaps.length - onSale; + if (s.iaps.length && !f.some(x => x.code === 'iap')) add('ok', 'iap', `${onSale} in-app purchases ready${offSale ? ` (${offSale} removed from sale, not checked)` : ''}`); f.push(...appleSubscriptionRules(s)); for (const m of s.capabilityMismatches ?? []) add('warn', 'capabilities', m.msg, m.fix); diff --git a/cli/shots/browser.ts b/cli/shots/browser.ts index e009c05..bd33563 100644 --- a/cli/shots/browser.ts +++ b/cli/shots/browser.ts @@ -30,24 +30,30 @@ import * as rt from '../lib/rt'; class PlaywrightShapeError extends Error {} async function chromium(root: string): Promise { + // why each place failed, for the error: a swallowed import error read as "not found" (a Mac run had it installed) + const tried: string[] = []; for (const base of [root, rt.packageRoot()]) { + let p = ''; try { - const p = rt.resolveFrom('playwright', base); + p = rt.resolveFrom('playwright', base); // only an installed copy (node_modules): outside a project Bun auto-installs the newest playwright into its global // cache (~/.bun/install/cache), whose browser build was never downloaded ("headless shell: not installed" on // Linux CI, where no Google Chrome hides it); storebound's own copy is next - if (!isInstalledPackage(p)) continue; + if (!isInstalledPackage(p)) { tried.push(`${p}: not an installed copy (Bun's global cache)`); continue; } // playwright's entry is CommonJS: depending on the runtime and version the ESM import puts chromium on the // namespace or only under default (a project's playwright 1.57 under a global Bun install gave undefined) const m = await rt.importPath(p); const c = m?.chromium ?? m?.default?.chromium; if (!c || typeof c.launch !== 'function') throw new PlaywrightShapeError(`playwright at ${p} has no chromium.launch (exports: ${Object.keys(m ?? {}).slice(0, 8).join(', ') || 'none'}${m?.default ? `; default: ${Object.keys(m.default).slice(0, 8).join(', ')}` : ''})`); return c; - } catch (e) { if (e instanceof PlaywrightShapeError) throw e; /* next */ } + } catch (e) { + if (e instanceof PlaywrightShapeError) throw e; + tried.push(p ? `${p}: ${(e as Error).message.split('\n')[0]}` : `not resolvable from ${base}`); + } } // only reached in the compiled sidecar: the bundled playwright-core (not a runtime dependency of the npm package) if (compiled()) return (await import('playwright-core')).chromium; - throw new Error('playwright not found: in your project run `bun add -d playwright` (and `bunx playwright install chromium` if Google Chrome is not installed)'); + throw new Error(`playwright not found: in your project run \`bun add -d playwright\` (and \`bunx playwright install chromium\` if Google Chrome is not installed)\n ${tried.join('\n ')}`); } /** A resolved module path inside a node_modules folder (not one of Bun's auto-installs from its global cache). */ diff --git a/cli/shots/capture-web.ts b/cli/shots/capture-web.ts index 0229eeb..a2e4ff5 100644 --- a/cli/shots/capture-web.ts +++ b/cli/shots/capture-web.ts @@ -23,11 +23,15 @@ import { join } from 'node:path'; import type { ShotSpec, ShotsCapture } from '../lib/config'; import { log, warn } from '../lib/log'; import { type AuthPlan, expiredHint, landedOnLogin, maskSecrets, safeUrl } from './auth'; -import { shotsFor } from './devices'; +import { type CaptureDevice, shotsFor } from './devices'; import { applySelectors, candidates, probe } from './selectors'; -import type { FrameDims } from './lib'; +import { DEFAULT_LANDSCAPE, type FrameDims } from './lib'; -type Device = 'phone' | 'tablet'; +/** Viewport per device class; landscape defaults to shots.landscape.size's default when a caller passes only phone / tablet. */ +export type CaptureDims = Record<'phone' | 'tablet', FrameDims> & { landscape?: FrameDims }; +const dimsOf = (dims: CaptureDims, device: Device): FrameDims => dims[device] ?? DEFAULT_LANDSCAPE; + +type Device = CaptureDevice; export const STEPS = ['goto', 'waitFor', 'eval', 'delay', 'screenshot'] as const; export type Step = typeof STEPS[number]; export type Timing = Record; @@ -100,14 +104,14 @@ export async function hashServed(baseUrl: string): Promise { } /** Every web frame to capture, in a fixed order (lang, device, shot), with its URL and its input hash. */ -export function planWeb(cap: ShotsCapture, o: { langs: string[]; devices: Device[]; only: string[]; dims: Record; framesDir: string; - build: string; copyText?: (lang: string) => string; fonts?: string }): WebJob[] { +export function planWeb(cap: ShotsCapture, o: { langs: string[]; devices: Device[]; only: string[]; dims: CaptureDims; framesDir: string; + build: string; copyText?: (lang: string) => string; fonts?: string; allLandscape?: boolean }): WebJob[] { const jobs: WebJob[] = []; - for (const lang of o.langs) for (const device of o.devices) for (const [name, spec] of shotsFor(cap, device, o.only)) { + for (const lang of o.langs) for (const device of o.devices) for (const [name, spec] of shotsFor(cap, device, o.only, o.allLandscape)) { const q = (cap.query ?? '').replaceAll('{lang}', lang); const path = (spec.path ?? '/').replaceAll('{lang}', lang) + (q ? ((spec.path ?? '/').includes('?') ? '&' : '?') + q : ''); const url = (cap.baseUrl ?? '').replace(/\/$/, '') + path; - const hash = sha(JSON.stringify({ spec, url, dims: o.dims[device], session: cap.session ?? 'per-shot', build: o.build, copy: o.copyText?.(lang) ?? '', fonts: o.fonts ?? '' })); + const hash = sha(JSON.stringify({ spec, url, dims: dimsOf(o.dims, device), session: cap.session ?? 'per-shot', build: o.build, copy: o.copyText?.(lang) ?? '', fonts: o.fonts ?? '' })); const frame = `${lang}/${device}/${name}.png`; jobs.push({ lang, device, name, spec, url, path, out: join(o.framesDir, frame), frame, hash }); } @@ -137,7 +141,7 @@ export interface CaptureReport { /* eslint-disable @typescript-eslint/no-explicit-any */ /** Captures the jobs in a browser: per-shot contexts, or one page per language + device in per-language sessions. */ -export async function captureWeb(browser: any, cap: ShotsCapture, jobs: WebJob[], o: { concurrency: number; dims: Record; auth?: AuthPlan }): Promise { +export async function captureWeb(browser: any, cap: ShotsCapture, jobs: WebJob[], o: { concurrency: number; dims: CaptureDims; auth?: AuthPlan }): Promise { const auth = o.auth; const mask = (t: string): string => (auth ? maskSecrets(t, auth.secrets) : t); const expired = new Set(); @@ -147,8 +151,8 @@ export async function captureWeb(browser: any, cap: ShotsCapture, jobs: WebJob[] let finished = 0; const total = jobs.length; const newPage = async (j: WebJob): Promise<{ c: any; page: any; errs: string[] }> => { - const d = o.dims[j.device]; - const c = await browser.newContext({ viewport: { width: d.w, height: d.h }, deviceScaleFactor: d.dpr, hasTouch: true, isMobile: true, serviceWorkers: 'block', locale: j.lang, ...(auth?.contextOptions ?? {}) }); + const d = dimsOf(o.dims, j.device); + const c = await browser.newContext({ viewport: { width: d.w, height: d.h }, deviceScaleFactor: d.dpr, hasTouch: j.device !== 'landscape', isMobile: j.device !== 'landscape', serviceWorkers: 'block', locale: j.lang, ...(auth?.contextOptions ?? {}) }); // landscape = a desktop window: no touch, no mobile emulation // sign in once per context, cookies kept in it (request auth); a failed sign-in stops the whole capture if (auth) try { await auth.prepare(c); } catch (e) { await c.close(); throw Object.assign(new Error(mask((e as Error).message)), { authFailed: true }); } const page = await c.newPage(); @@ -167,7 +171,7 @@ export async function captureWeb(browser: any, cap: ShotsCapture, jobs: WebJob[] if (!expired.has(safeUrl(s.page.url()))) { expired.add(safeUrl(s.page.url())); warn('shots', `${j.lang}/${j.device}/${j.name}: ${mask(expiredHint(s.page.url()))}`); } throw new Error(`landed on the sign-in page ${safeUrl(s.page.url())}`); } - await applySelectors(s.page, j.spec, { device: j.device, w: o.dims[j.device].w, h: o.dims[j.device].h }, waitTimeout); // waitSelector, click: a miss names the selector and the size + await applySelectors(s.page, j.spec, { device: j.device, w: dimsOf(o.dims, j.device).w, h: dimsOf(o.dims, j.device).h }, waitTimeout); // waitSelector, click: a miss names the selector and the size if (j.spec.waitFor) await s.page.waitForFunction(j.spec.waitFor, null, { timeout: waitTimeout, polling: 50 }); t.waitFor = Date.now() - t0; t0 = Date.now(); for (const js of j.spec.eval ?? []) await s.page.evaluate(js); @@ -251,14 +255,14 @@ export function writeCaptureState(root: string, report: CaptureReport, cache: Ca /* eslint-disable @typescript-eslint/no-explicit-any */ /** `shots capture --dry --probe`: opens each page (no screenshot), runs the shot's waitFor, and reports per size which * selector candidates match. Returns the log lines; `missed` counts shots where no candidate of a list matched. */ -export async function probeSelectors(browser: any, jobs: WebJob[], o: { dims: Record; auth?: AuthPlan; timeoutMs?: number }): Promise<{ lines: string[]; missed: number }> { +export async function probeSelectors(browser: any, jobs: WebJob[], o: { dims: CaptureDims; auth?: AuthPlan; timeoutMs?: number }): Promise<{ lines: string[]; missed: number }> { const lines: string[] = []; let missed = 0; for (const j of jobs) { const lists = [['waitSelector', candidates(j.spec.waitSelector, j.device)], ...(Array.isArray(j.spec.click) && j.spec.click.some(c => typeof c !== 'string') ? j.spec.click : j.spec.click === undefined ? [] : [j.spec.click]) .map((c, i) => [`click[${i}]`, candidates(c as any, j.device)] as const)].filter(([, l]) => l.length) as [string, string[]][]; if (!lists.length) continue; - const d = o.dims[j.device]; - const c = await browser.newContext({ viewport: { width: d.w, height: d.h }, deviceScaleFactor: 1, hasTouch: true, isMobile: true, serviceWorkers: 'block', locale: j.lang, ...(o.auth?.contextOptions ?? {}) }); + const d = dimsOf(o.dims, j.device); + const c = await browser.newContext({ viewport: { width: d.w, height: d.h }, deviceScaleFactor: 1, hasTouch: j.device !== 'landscape', isMobile: j.device !== 'landscape', serviceWorkers: 'block', locale: j.lang, ...(o.auth?.contextOptions ?? {}) }); try { if (o.auth) await o.auth.prepare(c); const page = await c.newPage(); diff --git a/cli/shots/capture.ts b/cli/shots/capture.ts index c5b6d24..b0cedc4 100644 --- a/cli/shots/capture.ts +++ b/cli/shots/capture.ts @@ -1,9 +1,15 @@ // Raw frames from a running build of your app or game, from any engine. -// storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet] [--source web|ios-sim|android-emu|folder] +// storebound shots capture [--lang en,tr] [--only hero,shop] [--device phone|tablet|landscape] [--source web|ios-sim|android-emu|folder] // [--dry [--probe]] [--keep-booted] [--concurrency N] [--only-missing | --force] // Frames go to ///.png: the screen BELOW the status bar (the template draws one). +// Devices: phone, tablet and landscape (/landscape/.png, web source only: Mac App Store and Chromebook +// screenshots; a desktop window, no status bar crop). The default device list adds landscape when the project renders a +// landscape size (apple.mac, play.chromebook, shots.landscape.playTablets); then shots with no device (and 'both') are +// captured for landscape too, since render needs a landscape frame per scene. A shot says device: 'landscape' to be +// landscape only, 'phone' / 'tablet' to stay out of it. ios-sim / android-emu skip landscape with a warning. // shots.capture.source (default web): -// web headless Chromium (playwright), mobile viewport + touch at phone / tablet size. Each shot: +// web headless Chromium (playwright), mobile viewport + touch at phone / tablet size, or a desktop viewport (no touch) +// at shots.landscape.size (default 1440 x 900 @2x) for landscape. Each shot: // { path, waitFor?: JS expression that turns true, eval?: [JS], delayMs?, device? }; URL = baseUrl + path + // query, "{lang}" replaced. Parallel contexts, per-language page reuse, the input-hash cache and the // per-frame timing (goto / waitFor / eval / delay / screenshot): capture-web.ts. Signed-in apps: @@ -36,15 +42,16 @@ import { done, log, step, warn } from '../lib/log'; import { closeBrowser, launch } from './browser'; import { checkFrameFolder } from './check'; import { adbAppLocaleArgs, adbDemoExitArgs, adbDemoModeArgs, adbForceStopArgs, adbInstallArgs, adbScreencapArgs, adbStartArgs, adbStateArgs, adbTarget, - cropArgs, cropTopFor, fill, pickSimulator, shotsFor, simBootArgs, simBootStatusArgs, simInstallArgs, simLaunchArgs, simOpenUrlArgs, + cropArgs, cropTopFor, fill, CAPTURE_DEVICES, type CaptureDevice, pickSimulator, shotsFor, simBootArgs, simBootStatusArgs, simInstallArgs, simLaunchArgs, simOpenUrlArgs, simScreenshotArgs, simShutdownArgs, simStatusBarArgs, simStatusBarClearArgs, simTarget, SOURCES, type Source, TOOL_HINTS, validateCapture } from './devices'; -import { type CopyFile, copyText, type FrameDims, frameDims } from './lib'; +import { type CopyFile, copyText, type FrameDims, frameDims, landscapeDims, rendersLandscape } from './lib'; import { captureWeb, defaultConcurrency, probeSelectors, hashPaths, hashServed, planWeb, readCache, selectJobs, summaryLines, writeCaptureState } from './capture-web'; import { imageInfo } from './spec'; import { authPlan, safeUrl } from './auth'; import * as rt from '../lib/rt'; -type Device = 'phone' | 'tablet'; +type Device = CaptureDevice; +type PhoneTablet = 'phone' | 'tablet'; export function sh(cmd: string, args: string[], o: { allowFail?: boolean; timeout?: number } = {}): { out: Buffer; err: string; code: number } { const r = spawnSync(cmd, args, { timeout: o.timeout ?? 120_000, maxBuffer: 256 * 1024 * 1024 }); @@ -75,7 +82,7 @@ export function localeOf(config: ShipConfig, lang: string, source: Source): stri } /** Crop the status bar off a full-screen capture and store it as a 24-bit RGB frame. */ -function storeFrame(tmp: string, out: string, cropTop: ShotsCapture['cropTop'], device: Device, dims: FrameDims): void { +function storeFrame(tmp: string, out: string, cropTop: ShotsCapture['cropTop'], device: PhoneTablet, dims: FrameDims): void { const { w, h } = imageInfo(readFileSync(tmp)); if (!h) throw new Error('screenshot is not a PNG'); const top = cropTopFor(cropTop, device, h, dims); @@ -98,13 +105,20 @@ export async function run(ctx: Ctx): Promise { if (problems.length) throw new Error(`shots.capture:\n ${problems.join('\n ')}`); const langs = a.list('lang').length ? a.list('lang') : config.languages.map(l => l.id); const only = a.list('only'); - const devices: Device[] = a.get('device') ? [a.get('device') as Device] : ['phone', 'tablet']; - if (devices.some(d => d !== 'phone' && d !== 'tablet')) throw new Error('--device: phone | tablet'); + if (a.get('device') && !CAPTURE_DEVICES.includes(a.get('device') as Device)) throw new Error(`--device: ${CAPTURE_DEVICES.join(' | ')}`); + const landscapeOn = rendersLandscape(config); + let devices: Device[] = a.get('device') ? [a.get('device') as Device] : ['phone', 'tablet', ...(landscapeOn ? ['landscape' as const] : [])]; + const allLandscape = landscapeOn || a.get('device') === 'landscape'; // shots with no device / 'both' also make a landscape frame + if (source !== 'web' && source !== 'folder' && devices.includes('landscape')) { + warn('shots', `landscape frames (Mac, Chromebook) are not supported from ${source}: skipped; capture them from a web build (--source web) or put them in //landscape/ (--source folder)`); + devices = devices.filter(d => d !== 'landscape'); + } + const mobile = devices.filter((d): d is PhoneTablet => d !== 'landscape'); const framesDir = resolve(shots.frames); - const dims = frameDims(config); + const dims = { ...frameDims(config), landscape: landscapeDims(config) }; const tmpDir = join(root, '.storebound', 'tmp'); const target = (lang: string, device: Device, name: string) => { const d = join(framesDir, lang, device); if (!dry) mkdirSync(d, { recursive: true }); return join(d, `${name}.png`); }; - const total = langs.length * devices.reduce((t, d) => t + shotsFor(cap, d, only).length, 0); + const total = langs.length * devices.reduce((t, d) => t + shotsFor(cap, d, only, allLandscape).length, 0); let failed = 0, n = 0, i = 0; const progress = (what: string) => log('shots', step(++i, total, what)); /** Runs a simctl / adb step, or prints it with --dry. */ @@ -125,7 +139,7 @@ export async function run(ctx: Ctx): Promise { if (source === 'web') { if (dry) { - for (const lang of langs) for (const device of devices) for (const [name, s] of shotsFor(cap, device, only)) { + for (const lang of langs) for (const device of devices) for (const [name, s] of shotsFor(cap, device, only, allLandscape)) { progress(`${lang}/${device}/${name}.png <- ${cap.baseUrl}${(s.path ?? '/').replaceAll('{lang}', lang)}`); const sel: [string, string[]][] = [['waitSelector', candidates(s.waitSelector, device)], ...(Array.isArray(s.click) && s.click.some(c => typeof c !== 'string') ? s.click : s.click === undefined ? [] : [s.click]).map((c, k) => [`click[${k}]`, candidates(c as ShotSelector, device)] as [string, string[]])]; for (const [what, list] of sel) if (list.length) log('shots', ` ${what} on ${device} ${dims[device].w}x${dims[device].h}: ${list.join(' | ')}`); @@ -133,7 +147,7 @@ export async function run(ctx: Ctx): Promise { if (a.has('probe')) { // open the pages and test every candidate on each size (needs the app running at baseUrl) need(cap.baseUrl, 'shots.capture.baseUrl'); const auth = cap.auth ? authPlan(cap.auth, { root, baseUrl: cap.baseUrl! }) : undefined; - const jobs = planWeb(cap, { langs, devices, only, dims, framesDir, build: '', fonts: '' }); + const jobs = planWeb(cap, { langs, devices, only, dims, framesDir, build: '', fonts: '', allLandscape }); const browser = await launch(root, { headless: true, args: ['--mute-audio'] }); let r; try { r = await probeSelectors(browser, jobs, { dims, ...(auth ? { auth } : {}) }); } finally { await closeBrowser(browser); } @@ -152,7 +166,7 @@ export async function run(ctx: Ctx): Promise { let copy: CopyFile = {}; try { copy = JSON.parse(readFileSync(resolve(shots.copy), 'utf8')) as CopyFile; } catch { /* no copy yet */ } const fontsCss = join(root, '.storebound', 'fonts', 'fonts.css'); - const jobs = planWeb(cap, { langs, devices, only, dims, framesDir, build, copyText: l => copyText(l, copy[l]), + const jobs = planWeb(cap, { langs, devices, only, dims, framesDir, build, allLandscape, copyText: l => copyText(l, copy[l]), fonts: existsSync(fontsCss) ? readFileSync(fontsCss, 'utf8') : '' }); const cache = readCache(root); const { run: todo, skipped } = selectJobs(jobs, cache, a.has('force') ? 'force' : a.has('only-missing') ? 'only-missing' : 'changed'); @@ -174,7 +188,7 @@ export async function run(ctx: Ctx): Promise { const ios = need(cap.ios, 'shots.capture.ios'); if (!dry) { requireTool('xcrun'); requireTool('ffmpeg'); } const list = dry && !rt.which('xcrun') ? '{"devices":{}}' : sh('xcrun', ['simctl', 'list', 'devices', '-j']).out.toString(); - for (const device of devices) { + for (const device of mobile) { const want = simTarget(ios, device); const todo = shotsFor(cap, device, only); if (!todo.length) continue; @@ -222,7 +236,7 @@ export async function run(ctx: Ctx): Promise { const and = need(cap.android, 'shots.capture.android'); const adb = adbPath(); if (!dry) { requireTool(adb, 'adb'); requireTool('ffmpeg'); } - for (const device of devices) { + for (const device of mobile) { const todo = shotsFor(cap, device, only); if (!todo.length) continue; const serial = adbTarget(and, device); diff --git a/cli/shots/devices.ts b/cli/shots/devices.ts index 1fa9f20..3691f22 100644 --- a/cli/shots/devices.ts +++ b/cli/shots/devices.ts @@ -43,7 +43,7 @@ export function validateCapture(c: ShotsCapture | undefined): string[] { if (s.click !== undefined) for (const [i, c] of (Array.isArray(s.click) && s.click.some(x => typeof x !== 'string') ? s.click : [s.click]).entries()) e.push(...validateSelector(`shots.capture.shots.${name}.click[${i}]`, c)); } else if (s.waitSelector !== undefined || s.click !== undefined) e.push(`shots.capture.shots.${name}: waitSelector / click only apply to source web`); if (s.navigate && !['spa', 'reload'].includes(s.navigate)) e.push(`shots.capture.shots.${name}.navigate: spa | reload`); - if (s.device && !['phone', 'tablet', 'both'].includes(s.device)) e.push(`shots.capture.shots.${name}.device: phone | tablet | both`); + if (s.device && !['phone', 'tablet', 'both', 'landscape'].includes(s.device)) e.push(`shots.capture.shots.${name}.device: phone | tablet | both | landscape`); if (src === 'web' && s.path === undefined) e.push(`shots.capture.shots.${name}.path: URL path (source web)`); if ((src === 'web' || src === 'folder') && (s.args || s.extras)) e.push(`shots.capture.shots.${name}: args / extras only apply to ios-sim / android-emu`); for (const [k, v] of Object.entries(s.extras ?? {})) { @@ -96,9 +96,20 @@ export function adbTarget(and: NonNullable, device: 'ph return device === 'tablet' ? and.serials?.tablet : and.serials?.phone ?? and.serial; } -/** Which shots run on which device class. */ -export function shotsFor(c: ShotsCapture, device: 'phone' | 'tablet', only: string[] = []): [string, ShotSpec][] { - return Object.entries(c.shots ?? {}).filter(([name, s]) => (!only.length || only.includes(name)) && ((s.device ?? 'phone') === 'both' || (s.device ?? 'phone') === device)); +/** Capture device classes: phone / tablet frames (status bar cut) and desktop landscape frames (Mac, Chromebook). */ +export type CaptureDevice = 'phone' | 'tablet' | 'landscape'; +export const CAPTURE_DEVICES: readonly CaptureDevice[] = ['phone', 'tablet', 'landscape']; + +/** Which shots run on which device class. phone / tablet: device unset = phone, 'both' = phone + tablet (unchanged). + * landscape: the shots with device 'landscape'; with `allLandscape` (the project renders a landscape size, or + * --device landscape was asked for) also every shot with no device or 'both', because render needs a landscape frame + * for each scene. A shot that says 'phone' or 'tablet' explicitly stays off the landscape list. */ +export function shotsFor(c: ShotsCapture, device: CaptureDevice, only: string[] = [], allLandscape = false): [string, ShotSpec][] { + return Object.entries(c.shots ?? {}).filter(([name, s]) => { + if (only.length && !only.includes(name)) return false; + if (device === 'landscape') return s.device === 'landscape' || (allLandscape && (s.device === undefined || s.device === 'both')); + return s.device !== 'landscape' && ((s.device ?? 'phone') === 'both' || (s.device ?? 'phone') === device); + }); } // ---- iOS Simulator (xcrun simctl) ---- diff --git a/cli/shots/lib.ts b/cli/shots/lib.ts index f20964c..3087424 100644 --- a/cli/shots/lib.ts +++ b/cli/shots/lib.ts @@ -175,6 +175,15 @@ export function frameDims(config: Pick): Record<' return { phone: { ...DEFAULT_PHONE, ...config.shots?.phone }, tablet: { ...tablet, ...config.shots?.tablet } }; } +/** Landscape capture viewport (shots.landscape.size): a desktop window, 1440 x 900 CSS px @2x = 2880 x 1800 (the Mac size). No status bar. */ +export const DEFAULT_LANDSCAPE: FrameDims = { w: 1440, h: 900, dpr: 2, bar: 0 }; + +/** Viewport `shots capture` uses for landscape frames (/landscape/.png): shots.landscape.size over the default. */ +export function landscapeDims(config: Pick): FrameDims { + const s = config.shots?.landscape?.size; + return { ...DEFAULT_LANDSCAPE, ...(s ? { w: s.w, h: s.h, ...(s.dpr ? { dpr: s.dpr } : {}) } : {}), bar: 0 }; +} + /** Play tablet size keys (7" and 10"): optional on Play, switched by play.tablets. */ export const PLAY_TABLET_SIZES: readonly string[] = ['tab7', 'tab10']; @@ -193,6 +202,12 @@ export function defaultSizes(config: Pick, tablets : k.startsWith('ios') ? apple : PLAY_TABLET_SIZES.includes(k) ? play && tabs : play)); } +/** True when `shots render` draws a landscape size for this project (apple.mac, play.chromebook, shots.landscape.playTablets): + * it then needs /landscape/.png frames, which `shots capture` makes with the landscape device. Same rules as render. */ +export function rendersLandscape(config: Pick): boolean { + return defaultSizes(config).some(s => renderDims(s, config.shots).landscape); +} + /** Scenes of a variant (its order / subset, palette overrides), or the base scenes. */ export function variantScenes(shots: ShotsConfig, variant?: string): ShotScene[] { if (!variant) return shots.scenes; diff --git a/cli/shots/selectors.ts b/cli/shots/selectors.ts index 1efb778..7c84b60 100644 --- a/cli/shots/selectors.ts +++ b/cli/shots/selectors.ts @@ -4,7 +4,7 @@ // a list on the phone and a grid at 1180x820 needs different selectors; the miss message names the selector and the size. import type { ShotSelector } from '../lib/config'; -type Device = 'phone' | 'tablet'; +import type { CaptureDevice as Device } from './devices'; /** Candidates for one device: its own list first, then the shared ones, without repeats. */ export function candidates(sel: ShotSelector | undefined, device: Device): string[] { @@ -19,12 +19,12 @@ export function validateSelector(where: string, sel: unknown): string[] { const okList = (v: unknown): boolean => ok(v) || (Array.isArray(v) && v.length > 0 && v.every(ok)); if (okList(sel)) return []; if (sel && typeof sel === 'object' && !Array.isArray(sel)) { - const o = sel as Record, bad = Object.keys(o).filter(k => !['phone', 'tablet', 'any'].includes(k)); - if (bad.length) return [`${where}: unknown key ${bad.join(', ')} (phone | tablet | any)`]; - if (!Object.keys(o).length) return [`${where}: at least one of phone | tablet | any`]; + const o = sel as Record, bad = Object.keys(o).filter(k => !['phone', 'tablet', 'landscape', 'any'].includes(k)); + if (bad.length) return [`${where}: unknown key ${bad.join(', ')} (phone | tablet | landscape | any)`]; + if (!Object.keys(o).length) return [`${where}: at least one of phone | tablet | landscape | any`]; return Object.entries(o).filter(([, v]) => !okList(v)).map(([k]) => `${where}.${k}: a selector or a list of selectors`); } - return [`${where}: a selector, a list of selectors, or { phone, tablet, any }`]; + return [`${where}: a selector, a list of selectors, or { phone, tablet, landscape, any }`]; } /** Minimal Playwright surface used here, so tests can fake a page. */ diff --git a/skills/store-screenshots/SKILL.md b/skills/store-screenshots/SKILL.md index c2bccb1..ad3d9f7 100644 --- a/skills/store-screenshots/SKILL.md +++ b/skills/store-screenshots/SKILL.md @@ -83,7 +83,12 @@ the enum has them). No Duo app preview sizes are published. Google Play has no f alpha) and requires the set, and `apple screenshots --platform macos` uploads it as `APP_DESKTOP` to the macOS version (versions are per platform, pitfall 79; the iOS run uploads the iOS sets only and says where the Mac set goes). `validate` prints an info note when the app has a macOS version but no Mac screenshots. Frames: landscape -captures in `//landscape/.png`, `shots.landscape.size` CSS px (default 1440 x 900 @2x). +captures in `//landscape/.png`, `shots.landscape.size` CSS px (default 1440 x 900 @2x). Make them with +`storebound shots capture --device landscape` from a web build (a desktop viewport, no touch, no status bar crop); with +`apple.mac`, `play.chromebook` or `shots.landscape.playTablets` the default `capture` run adds the landscape device and +captures every shot with no `device` (and `both`) for it too, because render needs a landscape frame per scene; a shot +with `device: 'landscape'` is landscape only, `'phone'` / `'tablet'` stays out. `ios-sim` / `android-emu` have no +landscape device (skipped with a warning): use a web build or the folder source. **Landscape layout (Mac, Chromebook, Play tablets).** Copy in a column on one side (`shots.landscape.side`, default left), the scene's first frame on the other. `shots.landscape.frame`: `'window'` draws a Mac window (title bar with @@ -119,6 +124,8 @@ the icon, feature graphic and phone screenshots and prints `tablet screenshots: `///.png`, local, not committed. - `web` (default): `baseUrl`, `query` with `{lang}`, shots: `path` / `waitFor` / `eval` / `delayMs` / `device`. Phone 440 x 902 @3x and tablet 800 x 1240 @2x by default; the template draws the status bar above. + Landscape (Mac / Chromebook): `--device landscape` or `device: 'landscape'` per shot, a desktop viewport at + `shots.landscape.size` (default 1440 x 900 @2x), `waitSelector` / `click` take a `landscape` list too. Speed (many languages): frames run in parallel browser contexts (`--concurrency N`, `capture.concurrency`; default min(3, cores / 4) since game boots are GPU-heavy). `capture.session: 'per-language'` boots the app once per language and device and switches shots in that page (per shot `navigate: 'spa'` = pushState + popstate to its diff --git a/tests/capture-landscape.test.ts b/tests/capture-landscape.test.ts new file mode 100644 index 0000000..6768a76 --- /dev/null +++ b/tests/capture-landscape.test.ts @@ -0,0 +1,101 @@ +// `shots capture --device landscape`: desktop frames for Mac App Store / Chromebook screenshots from a web build. +// Dry runs and pure planning only: no browser, no simulator. +import { afterEach, describe, expect, test } from 'bun:test'; +import { rmSync } from 'node:fs'; +import type { ShipConfig } from '../cli/lib/config'; +import { planWeb } from '../cli/shots/capture-web'; +import { run as captureRun } from '../cli/shots/capture'; +import { shotsFor, validateCapture } from '../cli/shots/devices'; +import { frameDims, landscapeDims, rendersLandscape } from '../cli/shots/lib'; +import { BASE, capture, project, restore } from './helpers/store-mock'; + +afterEach(restore); + +const cap = { source: 'web', baseUrl: 'http://127.0.0.1:5173', shots: { + hero: { path: '/?scene=hero' }, wide: { path: '/?scene=wide', device: 'landscape' }, pad: { path: '/pad', device: 'tablet' }, both: { path: '/both', device: 'both' }, ph: { path: '/ph', device: 'phone' }, +} } as const; +const cfg = (over: Record = {}, shots: Record = {}): ShipConfig => + ({ ...BASE, ...over, shots: { frames: 'frames', copy: 'copy.json', scenes: [], capture: cap, ...shots } }) as unknown as ShipConfig; +const names = (c: Parameters[0], d: 'phone' | 'tablet' | 'landscape', all = false) => shotsFor(c, d, [], all).map(([n]) => n); + +describe('landscape device selection', () => { + test('phone / tablet unchanged; landscape only for explicit shots unless the project renders landscape', () => { + expect(names(cap, 'phone')).toEqual(['hero', 'both', 'ph']); + expect(names(cap, 'tablet')).toEqual(['pad', 'both']); + expect(names(cap, 'landscape')).toEqual(['wide']); + expect(names(cap, 'landscape', true)).toEqual(['hero', 'wide', 'both']); // not the explicit phone / tablet ones + }); + test('validateCapture accepts landscape and names it in the error', () => { + expect(validateCapture({ ...cap, shots: { a: { path: '/', device: 'landscape' } } })).toEqual([]); + expect(validateCapture({ ...cap, shots: { a: { path: '/', device: 'desktop' as 'both' } } }).join()).toContain('phone | tablet | both | landscape'); + }); + test('rendersLandscape follows the render rules (mac, chromebook, playTablets)', () => { + expect(rendersLandscape(cfg())).toBe(false); + expect(rendersLandscape(cfg({ apple: { ...BASE.apple!, mac: true } }))).toBe(true); + expect(rendersLandscape(cfg({ apple: undefined, play: { ...BASE.play!, chromebook: true } }))).toBe(true); + expect(rendersLandscape(cfg({}, { landscape: { playTablets: true } }))).toBe(true); + }); + test('landscapeDims: 1440 x 900 @2x default, shots.landscape.size overrides', () => { + expect(landscapeDims(cfg())).toEqual({ w: 1440, h: 900, dpr: 2, bar: 0 }); + expect(landscapeDims(cfg({}, { landscape: { size: { w: 1280, h: 800 } } }))).toEqual({ w: 1280, h: 800, dpr: 2, bar: 0 }); + expect(landscapeDims(cfg({}, { landscape: { size: { w: 1920, h: 1080, dpr: 1 } } }))).toEqual({ w: 1920, h: 1080, dpr: 1, bar: 0 }); + }); +}); + +describe('planWeb with landscape', () => { + test('jobs target /landscape/.png and the hash tracks the landscape viewport', () => { + const c = cfg(); + const base = { langs: ['en'], devices: ['landscape' as const], only: [], framesDir: '/f', build: 'b', allLandscape: true }; + const a = planWeb(cap, { ...base, dims: { ...frameDims(c), landscape: landscapeDims(c) } }); + expect(a.map(j => j.frame)).toEqual(['en/landscape/hero.png', 'en/landscape/wide.png', 'en/landscape/both.png']); + const b = planWeb(cap, { ...base, dims: { ...frameDims(c), landscape: { w: 1280, h: 800, dpr: 2, bar: 0 } } }); + expect(b[0]!.hash).not.toBe(a[0]!.hash); + }); +}); + +describe('capture --dry', () => { + const dry = async (config: ShipConfig, argv: string[]) => { + const p = project(config); + try { return await capture(() => captureRun(p.ctx(['--dry', ...argv], ['dry']))); } finally { rmSync(p.root, { recursive: true, force: true }); } + }; + test('--device landscape lists landscape targets, no phone / tablet', async () => { + const r = await dry(cfg(), ['--device', 'landscape', '--lang', 'en']); + expect(r.out).toContain('en/landscape/wide.png <- http://127.0.0.1:5173/?scene=wide'); + expect(r.out).toContain('en/landscape/hero.png'); // --device landscape captures every shot without a phone / tablet device + expect(r.out).not.toContain('en/phone/'); + expect(r.out).not.toContain('en/tablet/'); + expect(r.out).toContain('capture planned (dry run): 3 frames from web'); + }); + test('default devices add landscape only when the project renders a landscape size', async () => { + const plain = await dry(cfg(), ['--lang', 'en']); + expect(plain.out).not.toContain('en/landscape/hero.png'); + expect(plain.out).toContain('en/phone/hero.png'); + const mac = await dry(cfg({ apple: { ...BASE.apple!, mac: true } }), ['--lang', 'en']); + expect(mac.out).toContain('en/phone/hero.png'); + expect(mac.out).toContain('en/tablet/pad.png'); + for (const n of ['hero', 'wide', 'both']) expect(mac.out).toContain(`en/landscape/${n}.png`); + expect(mac.out).not.toContain('en/landscape/pad.png'); + expect(mac.out).not.toContain('en/landscape/ph.png'); + }); + test('shot selectors accept a landscape key and print the landscape viewport', async () => { + const c = cfg({ apple: { ...BASE.apple!, mac: true } }, { capture: { ...cap, shots: { hero: { path: '/', waitSelector: { phone: '#m', landscape: '#desk' } } } } }); + const r = await dry(c, ['--lang', 'en']); + expect(r.out).toContain('waitSelector on landscape 1440x900: #desk'); + expect(r.out).toContain('waitSelector on phone 440x902: #m'); + }); + test('ios-sim / android-emu skip landscape with a warning', async () => { + const mac = { apple: { ...BASE.apple!, mac: true } }; + const sim = await dry(cfg(mac, { capture: { source: 'ios-sim', ios: { bundleId: 'com.example.app', device: 'iPhone 17 Pro Max' }, shots: { hero: { path: '/', device: 'landscape' } } } }), ['--device', 'landscape', '--lang', 'en']); + expect(sim.err + sim.out).toContain('landscape frames (Mac, Chromebook) are not supported from ios-sim'); + expect(sim.out).toContain('0 frames'); + const and = await dry(cfg(mac, { capture: { source: 'android-emu', android: { package: 'com.example.app' }, shots: { hero: { path: '/' } } } }), ['--lang', 'en']); + expect(and.err + and.out).toContain('not supported from android-emu'); + expect(and.out).not.toContain('landscape/hero'); + }); + test('an unknown device is refused', async () => { + const p = project(cfg()); + try { + await expect(captureRun(p.ctx(['--dry', '--device', 'desktop'], ['dry']))).rejects.toThrow('--device: phone | tablet | landscape'); + } finally { rmSync(p.root, { recursive: true, force: true }); } + }); +}); diff --git a/tests/wave1.test.ts b/tests/wave1.test.ts index 894e88b..788ed78 100644 --- a/tests/wave1.test.ts +++ b/tests/wave1.test.ts @@ -290,6 +290,15 @@ describe('validate rules', () => { expect(f.find(x => x.code === 'availability')!.fix).toContain('Pricing and Availability'); expect(f.findIndex(x => x.level === 'ok')).toBeGreaterThan(f.findLastIndex(x => x.level === 'blocker')); }); + test('apple: products removed from sale are not blockers, unless the config still sells them', () => { + const s = appleOk(); + s.iaps = [...s.iaps, { productId: 'old1', state: 'DEVELOPER_REMOVED_FROM_SALE', reviewScreenshot: false }, { productId: 'old2', state: 'REMOVED_FROM_SALE', reviewScreenshot: false }]; + expect(appleRules(s).filter(f => f.level !== 'ok')).toEqual([]); + expect(appleRules(s).find(f => f.code === 'iap')!.msg).toBe('1 in-app purchases ready (2 removed from sale, not checked)'); + s.expectedProducts = ['p1', 'old1']; + const f = appleRules(s).find(x => x.code === 'iap')!; + expect([f.level, f.msg]).toEqual(['warn', 'old1: DEVELOPER_REMOVED_FROM_SALE, but the config still sells it']); + }); test('apple: non-exempt needs an approved declaration', () => { const s = appleOk(); s.build = { ...s.build!, usesNonExemptEncryption: true, declarationState: 'IN_REVIEW' }; From 53d57544bf29d70dc2f2ccecf02a05697c4bbaa2 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:17:34 +0700 Subject: [PATCH 34/73] storebound 0.8.65: version in package.json and every copy, CHANGELOG 0.8.65 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 2c2ec96..9376b20 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.64", + "version": "0.8.65", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 7adbb70..5450ba0 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.64", + "version": "0.8.65", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index c3532d1..9286507 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.64", + "version": "0.8.65", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f056b..fe2219b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.65 · 2026-11-03 + - `validate`: in-app purchases removed from sale (DEVELOPER_REMOVED_FROM_SALE, REMOVED_FROM_SALE) are no blockers; a warning only when the config still sells one. - `shots capture --device landscape`: Mac App Store / Chromebook frames from a web build (desktop viewport at `shots.landscape.size`, default 1440x900 @2x) into `/landscape/`; on by default when the project renders a landscape size. The simulator and emulator sources skip it with a warning. - `shots render` / `capture`: "playwright not found" now lists each place looked at and why it failed (an import error was reported as not found). diff --git a/apps/desktop/package.json b/apps/desktop/package.json index fe8ff48..de640b0 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.64", + "version": "0.8.65", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 5bbd8d6..7b457f8 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.64" +version = "0.8.65" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 92af0b2..98aac6b 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.64" +version = "0.8.65" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 33ecd9c..1e9d510 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.64", + "version": "0.8.65", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index ec54850..86875f3 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.64", + "version": "0.8.65", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index efb43c3..e9cabea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.64", + "version": "0.8.65", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 1e47c2ee60ae66f1e5b64266e8c6385e2a76a022 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:30:59 +0700 Subject: [PATCH 35/73] apple.macos listing / review notes per platform + iOS-only claim warnings; apple upload of a .pkg: bounded pkgutil, macOS processing wait, heartbeats; release 409 pattern --- CHANGELOG.md | 4 + cli/apple/listing.ts | 12 +-- cli/apple/release.ts | 2 +- cli/apple/review-details.ts | 16 ++-- cli/apple/testflight.ts | 8 +- cli/apple/upload.ts | 45 ++++++---- cli/check.ts | 8 +- cli/commands.ts | 2 +- cli/data/flags.json | 5 +- cli/lib/config.ts | 34 ++++++++ cli/lib/listing-mentions.ts | 3 +- cli/lib/mas.ts | 56 ++++++++---- cli/lib/review-details.ts | 13 +-- cli/lib/validate-rules.ts | 35 +++++++- cli/validate.ts | 4 +- skills/appstore-first-release/SKILL.md | 7 +- tests/macos-overrides.test.ts | 112 ++++++++++++++++++++++++ tests/upload-pkg-hang.test.ts | 114 +++++++++++++++++++++++++ 18 files changed, 417 insertions(+), 63 deletions(-) create mode 100644 tests/macos-overrides.test.ts create mode 100644 tests/upload-pkg-hang.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index fe2219b..b444832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## Unreleased +- `apple.macos: { listing, reviewNotes, gameCenter, noIap }`: an app with iOS and macOS versions gets its own Mac listing file and review notes (`apple listing --platform macos`, `apple review-details --platform macos`, new there); `validate` warns about iOS-only claims in a macOS version's texts (Game Center, tap / swipe, iPhone / iPad, in-app purchases with `noIap`). +- `apple upload `: reading the package is bounded (pkgutil signature check 90 s, expand 5 min, then the `apple build` .json) and logged; the processing wait finds macOS builds (it looked only at iOS and sat silently until --timeout); every slow read prints a heartbeat; an SSH / non-GUI session is warned about up front. +- `apple release`: a 409 on a release type change is recognized again (a stray control character had broken the pattern). + ## 0.8.65 · 2026-11-03 - `validate`: in-app purchases removed from sale (DEVELOPER_REMOVED_FROM_SALE, REMOVED_FROM_SALE) are no blockers; a warning only when the config still sells one. diff --git a/cli/apple/listing.ts b/cli/apple/listing.ts index 9649aa9..8ccb325 100644 --- a/cli/apple/listing.ts +++ b/cli/apple/listing.ts @@ -20,7 +20,7 @@ import { compactDiff } from '../lib/diff'; import { mergeAppleListing, overLimits } from '../lib/listing-pull'; import { counts, draftReason, draftSections, type ItemPlan, itemLines, planItem, planLocales, planVersion, short, type Skipped, type VersionPlan } from '../lib/listing-plan'; import { createOnce, findOrCreate, getById } from '../lib/upsert'; -import { appleName } from '../lib/config'; +import { appleName, listingPathFor } from '../lib/config'; import { wantedRelease } from '../lib/release-type'; import type { Ctx } from '../lib/ctx'; import { confirm, need } from '../lib/ctx'; @@ -29,10 +29,10 @@ import { ascClient, EDITABLE, type J, noAppInfo } from './asc'; import { stdinIsTTY } from '../lib/tty'; import { allVersions, type AscPlatform, parsePlatform, pickPlatform, platformLabel, versionsPath } from './platform'; -export function readAppleCopy(ctx: Ctx) { +export function readAppleCopy(ctx: Ctx, platform?: string) { const { config, resolve } = ctx.loaded; const only = ctx.args.list('only'); - const all = parseAppStoreListing(readFileSync(resolve(config.apple?.listing ?? 'store/appstore.md'), 'utf8')); + const all = parseAppStoreListing(readFileSync(resolve(listingPathFor(config, platform)), 'utf8')); return Object.fromEntries(Object.entries(all).filter(([l]) => !only.length || only.includes(l))); } @@ -63,7 +63,7 @@ async function pull(ctx: Ctx): Promise { const at = l.attributes; remote[at.locale] = { ...remote[at.locale], description: at.description ?? undefined, keywords: at.keywords ?? undefined, promotionalText: at.promotionalText ?? undefined, whatsNew: at.whatsNew ?? undefined }; } - const file = resolve(config.apple?.listing ?? 'store/appstore.md'); + const file = resolve(listingPathFor(config, platform)); const before = existsSync(file) ? readFileSync(file, 'utf8') : '# App Store listing copy\n\nPulled from App Store Connect by `storebound apple listing pull`.\n'; const r = mergeAppleListing(before, remote, appleName(config)); const over = overLimits(r.changes, 'apple'); @@ -104,8 +104,8 @@ type Asc = Awaited>; async function planListing(ctx: Ctx, c: Asc, appId: string, version: string, platform: AscPlatform): Promise { const { config, resolve } = ctx.loaded; const app = config.app; - const listing = readAppleCopy(ctx); - const md = readFileSync(resolve(config.apple?.listing ?? 'store/appstore.md'), 'utf8'); + const listing = readAppleCopy(ctx, platform); + const md = readFileSync(resolve(listingPathFor(config, platform)), 'utf8'); const drafts = draftSections(md, 'apple'); const include = ctx.args.has('include-drafts'); const skipped: Skipped[] = []; diff --git a/cli/apple/release.ts b/cli/apple/release.ts index aad0498..5913c62 100644 --- a/cli/apple/release.ts +++ b/cli/apple/release.ts @@ -150,7 +150,7 @@ async function setReleaseType(ctx: Ctx, c: Awaited> try { await c.asc('PATCH', `/v1/appStoreVersions/${v.id}`, { data: { type: 'appStoreVersions', id: v.id, attributes: Object.fromEntries(changes.map(ch => [ch.field, ch.to])) } }); } catch (e) { - if (/-> 409/.test((e as Error).message)) throw new Error(`${tag}: App Store Connect refuses the release type change now (409): ${(e as Error).message} + if (/-> 409\b/.test((e as Error).message)) throw new Error(`${tag}: App Store Connect refuses the release type change now (409): ${(e as Error).message} It is editable until App Review approves the version; after that use apple release --manual-release.`); throw e; } diff --git a/cli/apple/review-details.ts b/cli/apple/review-details.ts index 123cc50..8a0a566 100644 --- a/cli/apple/review-details.ts +++ b/cli/apple/review-details.ts @@ -1,10 +1,11 @@ // App Review information on the editable version: contact, demo account, notes. Idempotent. -// storebound apple review-details [--contact-from ] [--dry] +// storebound apple review-details [--platform ios|macos|tvos|visionos] [--contact-from ] [--dry] // The contact (name, phone, email) is personal data, so it is never in the config: it comes from // .storebound/credentials.json "reviewContact", or is copied from another app of the same team with --contact-from. // Demo account (reviewAccess.signInRequired: true): "reviewDemoAccount" in .storebound/credentials.json or // REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; masked in every log line. Notes: apple.info.reviewNotes plus -// reviewAccess.instructions and accounts.inApp (lib/review-details.ts). +// reviewAccess.instructions and accounts.inApp (lib/review-details.ts). --platform macos: apple.macos.reviewNotes +// replaces apple.info.reviewNotes when set (a Mac app may have no Game Center, IAP or ads). import { refuseTemplate } from '../lib/template-answers'; import type { Ctx } from '../lib/ctx'; import { need } from '../lib/ctx'; @@ -12,7 +13,8 @@ import { findReviewContact, maskSecret, maskUser, noContactMessage, reviewDemoAc import { reviewDetailPlan } from '../lib/review-details'; import { done, log } from '../lib/log'; import { createOnce } from '../lib/upsert'; -import { ascClient } from './asc'; +import { ascClient, EDITABLE, type J } from './asc'; +import { allVersions, parsePlatform, pickPlatform, platformLabel } from './platform'; type Attrs = Record; const shown = (k: string, v: unknown): string => { @@ -36,8 +38,10 @@ export async function run(ctx: Ctx): Promise { const { config, root } = ctx.loaded; refuseTemplate(config, ['reviewNotes', 'reviewAccess', 'accounts'], 'apple review-details (App Review notes, demo account requirement)'); const c = await ascClient(root, need(config.apple?.bundleId, 'apple.bundleId'), config.apple?.appId); - const version = await c.editableVersion(); - if (!version) throw new Error('no editable App Store version (apple listing --version x.y.z creates it)'); + const appId = await c.app(); + const platform = parsePlatform(ctx.args.get('platform')) ?? pickPlatform(await allVersions(c, appId), (x: J) => EDITABLE.has(x.attributes.appVersionState ?? x.attributes.appStoreState), undefined, 'an editable version'); + const version = await c.editableVersion(platform); + if (!version) throw new Error(`no editable ${platformLabel(platform)} App Store version (apple listing --version x.y.z creates it)`); let contact: Record | null = null; const from = ctx.args.get('contact-from'); @@ -57,7 +61,7 @@ export async function run(ctx: Ctx): Promise { } if (!contact) throw new Error(noContactMessage(root, checked)); - const { attributes, summary } = reviewDetailPlan(config, contact, reviewDemoAccount(root)); + const { attributes, summary } = reviewDetailPlan(config, contact, reviewDemoAccount(root), platform); const read = async () => (await c.maybe(`/v1/appStoreVersions/${version.id}/appStoreReviewDetail`))?.data ?? null; const cur = await read(); if (ctx.args.has('dry')) { diff --git a/cli/apple/testflight.ts b/cli/apple/testflight.ts index 24f35d4..35c7628 100644 --- a/cli/apple/testflight.ts +++ b/cli/apple/testflight.ts @@ -37,8 +37,8 @@ const TAG = 'testflight'; const USAGE = 'usage: storebound apple testflight status | groups [sync] | testers | what-to-test --build N | info | distribute --build N --group | wait --build N | expire --keep N | --older-than D'; /** The state of build `number` (of `marketing` version) right now; found: false while App Store Connect does not list it. */ -async function seeBuild(c: Asc, appId: string, number: string, marketing?: string): Promise { - const q = new URLSearchParams({ 'filter[app]': appId, 'filter[version]': number, 'filter[preReleaseVersion.platform]': 'IOS', include: 'preReleaseVersion,buildBetaDetail', limit: '50' }); +async function seeBuild(c: Asc, appId: string, number: string, marketing?: string, platform = 'IOS'): Promise { + const q = new URLSearchParams({ 'filter[app]': appId, 'filter[version]': number, 'filter[preReleaseVersion.platform]': platform, include: 'preReleaseVersion,buildBetaDetail', limit: '50' }); if (marketing) q.set('filter[preReleaseVersion.version]', marketing); const resp = await c.asc('GET', `/v1/builds?${q}`); const hits = buildsWithVersion(resp).filter(b => b.attributes.version === number && (!marketing || b.marketing === marketing)); @@ -54,13 +54,13 @@ export interface BuildWait { outcome: WaitOutcome; timedOut: boolean; seen: Buil * Polls build `number` until processing ends (VALID, or FAILED / INVALID) or `timeoutMs` passes; logs each state change. * `once` reads the state a single time. Shared by `testflight wait` and `apple upload` (which waits after the upload). */ -export async function waitForBuild(c: Asc, appId: string, number: string, o: { marketing?: string; timeoutMs: number; once?: boolean; tag?: string } & HeartbeatOptions): Promise { +export async function waitForBuild(c: Asc, appId: string, number: string, o: { marketing?: string; platform?: 'IOS' | 'MAC_OS'; timeoutMs: number; once?: boolean; tag?: string } & HeartbeatOptions): Promise { const started = Date.now(); let delay: number | null = null, last = ''; // polls are up to 2 minutes apart: a heartbeat in between says the wait is alive const beat = o.once ? null : heartbeat(ms => log(o.tag ?? TAG, `still waiting for build ${number}: ${last || 'first check'}, ${elapsed(ms)} of ${elapsed(o.timeoutMs)}`), o); try { for (;;) { - const seen = await seeBuild(c, appId, number, o.marketing); + const seen = await seeBuild(c, appId, number, o.marketing, o.platform); const outcome = waitOutcome(seen); const line = outcome === 'missing' ? 'not listed yet (App Store Connect lists it once processing starts)' : `${seen.processingState}${seen.internal ? `, internal ${seen.internal}` : ''}`; if (line !== last) { log(o.tag ?? TAG, `build ${number}${seen.version ? ` (${seen.version})` : ''}: ${line} [${Math.round((Date.now() - started) / 60_000)} min]`); last = line; } diff --git a/cli/apple/upload.ts b/cli/apple/upload.ts index a31574f..688bc56 100644 --- a/cli/apple/upload.ts +++ b/cli/apple/upload.ts @@ -28,7 +28,7 @@ import type { Ctx } from '../lib/ctx'; import { confirm, need } from '../lib/ctx'; import { done, log, printJson, warn } from '../lib/log'; import { compareBuild, nextBuildNumber, nextPollDelay, parseDuration, WAIT_EXIT } from '../lib/release'; -import { altoolArgs, buildUploadReqs, exportedIpas, ipaInfo, ipaVersionProblem, readLastBuild, showCmd, UPLOAD_DONE, uploadProblems, uploadSearchDirs } from '../lib/xcode'; +import { altoolArgs, buildUploadReqs, exportedIpas, ipaInfo, ipaVersionProblem, readLastBuild, remoteBuildSession, showCmd, UPLOAD_DONE, uploadProblems, uploadSearchDirs } from '../lib/xcode'; import { bundleTrackingIssues, ipaManifests } from '../lib/privacy-files'; import { BUILD_WAIT_EXIT } from '../lib/build-ops'; import { type Asc, ascClient, type J } from './asc'; @@ -51,6 +51,9 @@ function stop(legacy: number, message: string): never { const TAG = 'upload'; +/** Test hook: heartbeat options (short interval, manual ticker) for the reads, the upload and the processing wait. */ +export const hooks: { heartbeat?: HeartbeatOptions } = {}; + function md5File(path: string): string { const h = rt.hasher('md5'); const fd = openSync(path, 'r'); @@ -257,9 +260,14 @@ export async function run(ctx: Ctx): Promise { } else ipa = resolve(ipa); shipPhase('verify', `checking ${relative(root, ipa)}`); const isPkg = ipa.endsWith('.pkg'); + log(TAG, `${relative(root, ipa)}: reading ${isPkg ? 'the package (pkgutil)' : 'the IPA'} (${mb(statSync(ipa).size)})`); + // over SSH (no GUI session) anything that touches the login keychain can wait for a prompt nobody sees: say so up front + const remote = process.platform === 'darwin' ? remoteBuildSession(process.env, rt.spawnSync(['launchctl', 'managername'], { timeout: 5000 }).stdout.toString().trim()) : null; + if (remote) warn(TAG, `${remote}: the upload itself uses the App Store Connect API key (no keychain, no prompt), but pkgutil / altool can stall on a keychain or GUI prompt nobody sees here; every step has a timeout. If it stalls, run it in the Mac's logged-in GUI session (see storebound apple build --help, --allow-ssh)`); const platform: 'IOS' | 'MAC_OS' = isPkg ? 'MAC_OS' : 'IOS'; if (macos && !isPkg) throw new Error('--platform macos uploads a signed .pkg (storebound apple build --platform macos --tauri ), not an .ipa'); - const info: ReturnType = isPkg ? pkgInfo(ipa, bundleId) : ipaInfo(ipa); + const info: ReturnType = isPkg ? pkgInfo(ipa, bundleId, { say: m => log(TAG, m) }) : ipaInfo(ipa); + log(TAG, `${relative(root, ipa)}: ${info.bundleId} ${info.version} (${info.build})`); shipReport({ version: info.version, build: info.build, url: consoleUrl('asc.testflight') }); if (want && info.build !== want) throw new Error(`${relative(root, ipa)} is build ${info.build}, not ${want} (--build): did the last apple build fail?`); if (info.bundleId !== bundleId) throw new Error(`${relative(root, ipa)} is ${info.bundleId}, the config says ${bundleId}`); @@ -277,18 +285,21 @@ export async function run(ctx: Ctx): Promise { const wait = !a.has('no-wait'); const timeout = parseDuration(a.str('timeout', '60m')); + log(TAG, `asking App Store Connect about ${bundleId}: the app, the editable version, the builds, earlier uploads of build ${info.build}`); const c = await ascClient(root, bundleId, config.apple?.appId); - const appId = await c.app(); - // the IPA must belong to the version train being prepared (the editable App Store version): MARKETING_VERSION 1.0 - // from a project that ignored the intended version otherwise lands in the wrong train - const editable = await c.editableVersion(platform).catch(() => null); - const trainWhy = ipaVersionProblem(info.version, editable?.attributes?.versionString as string | undefined, 'the editable App Store version'); - if (trainWhy) { if (a.has('allow-version-mismatch')) warn(TAG, trainWhy); else throw new Error(`${relative(root, ipa)}: not uploaded, ${trainWhy}`); } - const builds = await c.all(`/v1/builds?filter[app]=${appId}&limit=200&fields[builds]=version,processingState`); + // every read has its own timeout and retries; the heartbeat says the run is alive while one of them waits + const { appId, editable, builds, already } = await withHeartbeat(ms => log(TAG, `still reading App Store Connect, ${elapsed(ms)}`), async () => { + const appId = await c.app(); + // the IPA must belong to the version train being prepared (the editable App Store version): MARKETING_VERSION 1.0 + // from a project that ignored the intended version otherwise lands in the wrong train + const editable = await c.editableVersion(platform).catch(() => null); + const builds = await c.all(`/v1/builds?filter[app]=${appId}&limit=200&fields[builds]=version,processingState`); + // the same IPA uploaded by an earlier run: nothing to send again, only the wait + const already = via === 'api' && !dry ? (await uploadsOf(c, appId, info, platform).catch(() => [])).find((u: J) => u.attributes?.state?.state === 'COMPLETE') : undefined; + return { appId, editable, builds, already }; + }, hooks.heartbeat); const numbers = builds.map(b => String(b.attributes.version)); const next = nextBuildNumber(numbers); - // the same IPA uploaded by an earlier run: nothing to send again, only the wait - const already = via === 'api' && !dry ? (await uploadsOf(c, appId, info, platform).catch(() => [])).find((u: J) => u.attributes?.state?.state === 'COMPLETE') : undefined; const onAsc = builds.find(b => String(b.attributes.version) === info.build); const decision = existingBuild({ ipa: relative(root, ipa), build: info.build, onAsc: !!onAsc, state: onAsc?.attributes?.processingState, uploadComplete: !!already, allowExisting: a.has('allow-existing'), next }); // the ship-step contract: a build number App Store Connect has already is "nothing to do" (exit 7), never a second upload @@ -300,14 +311,18 @@ export async function run(ctx: Ctx): Promise { return; } if (decision instanceof Error) throw decision; + log(TAG, `build ${info.build} is not on App Store Connect (next free: ${next})`); if (decision === 'recheck') { log(TAG, `build ${info.version} (${info.build}) is on App Store Connect already${already ? ` (build upload ${already.id})` : ''}; --allow-existing: not sending it again`); if (!wait) { if (json) printJson({ ...{ ipa: relative(root, ipa), version: info.version, build: info.build }, uploaded: true, alreadyUploaded: true }); done(TAG, `build ${info.build} already uploaded`); return; } - const r = await waitForBuild(c, appId, info.build, { marketing: info.version, timeoutMs: timeout, tag: TAG }); + const r = await waitForBuild(c, appId, info.build, { marketing: info.version, platform, timeoutMs: timeout, tag: TAG, ...hooks.heartbeat }); if (json) printJson({ ipa: relative(root, ipa), version: info.version, build: info.build, uploaded: true, alreadyUploaded: true, processingState: r.seen.processingState ?? null }); if (r.outcome === 'valid') { done(TAG, waitMessage(info.build, r)); return; } stop(r.outcome === 'failed' ? BUILD_WAIT_EXIT.failed : BUILD_WAIT_EXIT.timeout, waitMessage(info.build, r)); } + // (a build number App Store Connect has already ends above, before this: the clearer message) + const trainWhy = ipaVersionProblem(info.version, editable?.attributes?.versionString as string | undefined, 'the editable App Store version'); + if (trainWhy) { if (a.has('allow-version-mismatch')) warn(TAG, trainWhy); else throw new Error(`${relative(root, ipa)}: not uploaded, ${trainWhy}`); } if (numbers.length && compareBuild(info.build, next) < 0) warn(TAG, `build ${info.build} is lower than the highest uploaded one (next free: ${next}); Apple accepts it only if this version train has no higher build`); const reqs = buildUploadReqs(appId, info, basename(ipa), size, platform); const plan = via === 'api' @@ -327,14 +342,14 @@ export async function run(ctx: Ctx): Promise { shipPhase('upload', `uploading ${mb(size)} via ${via}`, 0); log(TAG, `${relative(root, ipa)}: ${info.bundleId} ${info.version} (${info.build}), ${mb(size)}, via ${via}, timeout ${a.str('timeout', '60m')}`); if (via === 'api') { - try { await apiUpload(c, appId, ipa, info, deadline, {}, platform); } catch (e) { if ((e as { exit?: number }).exit) { warn(TAG, (e as Error).message); stop((e as { exit: number }).exit, (e as Error).message); } throw e; } + try { await apiUpload(c, appId, ipa, info, deadline, hooks.heartbeat ?? {}, platform); } catch (e) { if ((e as { exit?: number }).exit) { warn(TAG, (e as Error).message); stop((e as { exit: number }).exit, (e as Error).message); } throw e; } } else { - try { await altoolUpload(root, ipa, deadline); } catch (e) { if ((e as { exit?: number }).exit) { warn(TAG, (e as Error).message); stop((e as { exit: number }).exit, (e as Error).message); } throw e; } + try { await altoolUpload(root, ipa, deadline, hooks.heartbeat); } catch (e) { if ((e as { exit?: number }).exit) { warn(TAG, (e as Error).message); stop((e as { exit: number }).exit, (e as Error).message); } throw e; } } if (!wait) { if (json) printJson({ ...summary, uploaded: true }); done(TAG, `build ${info.build} uploaded; storebound apple status shows when it is VALID`); return; } // the same poll as `storebound apple testflight wait`, within what is left of --timeout shipPhase('processing', `waiting for App Store Connect to process build ${info.build}`); - const r = await waitForBuild(c, appId, info.build, { marketing: info.version, timeoutMs: Math.max(0, deadline - Date.now()), tag: TAG }); + const r = await waitForBuild(c, appId, info.build, { marketing: info.version, platform, timeoutMs: Math.max(0, deadline - Date.now()), tag: TAG, ...hooks.heartbeat }); const state = r.timedOut || (r.outcome !== 'valid' && r.outcome !== 'failed') ? 'TIMEOUT' : r.seen.processingState ?? 'UNKNOWN'; if (json) printJson({ ...summary, uploaded: true, processingState: state }); if (r.outcome === 'valid') { done(TAG, `${waitMessage(info.build, r)}. Then: apple testflight distribute --build ${info.build} --group --dry`); return; } diff --git a/cli/check.ts b/cli/check.ts index 692967e..5311034 100644 --- a/cli/check.ts +++ b/cli/check.ts @@ -16,7 +16,7 @@ import { type BundleManifest, bundleTrackingIssues, ipaManifests, projectSdkMani import { trackingIssue } from './lib/privacy-manifest'; import { type AsoFinding, auditAso } from './lib/aso'; import { draftLocales } from './lib/aso-intel'; -import { appleName, playCodes } from './lib/config'; +import { appleName, listingPathFor, playCodes } from './lib/config'; import { fieldsMentions } from './lib/cross-store'; import { appBuildFile, pickGradle, versionSourceIssues, versionSourceMessage } from './lib/gradle'; import { playConsoleReminders } from './lib/console-plan'; @@ -107,6 +107,12 @@ export async function run(ctx: Ctx): Promise { try { const tr = findFastlaneTraces(dirname(path)); if (tr.length) for (const t of tr) note(traceMessage(t)); } catch (e) { warn('check', `fastlane traces: ${(e as Error).message}`); } // other platforms named in a store's text: App Store 2.3.10 / Play Metadata, a blocker (pitfall 77) try { for (const h of listingFileMentions(ctx.loaded)) problems.push(`other platform in ${hitLine(h)}`); } catch (e) { warn('check', `platform mentions: ${(e as Error).message}`); } + if (config.apple?.macos?.listing) tryDo('appstore listing (macOS)', () => { + const copy = parseAppStoreListing(readFileSync(resolve(listingPathFor(config, 'macos')), 'utf8')); + const missing = config.languages.filter(l => l.apple && !copy[l.apple]).map(l => l.apple); + if (missing.length) note(`macOS appstore listing has no section for ${missing.join(', ')}`); + return `${Object.keys(copy).length} locales`; + }); // listing translation drafts (storebound listing translate): fine to keep working on, not to push unreviewed for (const f of [config.apple ? resolve(config.apple.listing ?? 'store/appstore.md') : '', config.play ? resolve(config.play.listing ?? 'store/listing.md') : ''].filter(Boolean)) { if (!existsSync(f)) continue; diff --git a/cli/commands.ts b/cli/commands.ts index f644811..3cba163 100644 --- a/cli/commands.ts +++ b/cli/commands.ts @@ -85,7 +85,7 @@ export const COMMANDS: Record Promise, string]> = { 'apple listing': [() => import('./apple/listing'), 'version, build, name / subtitle / description / keywords per locale; pull [--write]: live texts back into the listing file (diff first); --platform ios|macos|tvos|visionos (default: the platform that has the version this needs; asks when several do)'], 'apple screenshots': [() => import('./apple/screenshots'), '6.9" + 6.5" (+ 13" iPad) screenshots per locale; --variant ; --repair-stuck [--dry] (replace only screenshots not COMPLETE, at their positions); --platform ios|macos|tvos|visionos (default: the platform that has the version this needs; asks when several do)'], 'apple appinfo': [() => import('./apple/appinfo'), 'categories, age rating, content rights, Free price, territories'], - 'apple review-details': [() => import('./apple/review-details'), 'App Review contact, demo account (from .storebound/, masked) + notes'], + 'apple review-details': [() => import('./apple/review-details'), 'App Review contact, demo account (from .storebound/, masked) + notes; --platform ios|macos|tvos|visionos (macos: apple.macos.reviewNotes when set)'], 'apple status': [() => import('./apple/status'), 'versions, builds, IAPs, review submissions (--wait-review, --cancel-submission ); --platform ios|macos|tvos|visionos (default: the platform that has the version this needs; asks when several do)'], 'apple creative-assets': [() => import('./apple/creative-assets'), 'Header and Search Results: product page header (21:9) and search results asset (3:2) per locale, or one universal 5244x2950 PNG; uploads to the Asset Library and places it once Apple approved it, reporting waiting ones per locale (MD5 upsert, safe to re-run); --add-for-review, --verify (read-only), --dry'], 'apple previews': [() => import('./apple/previews'), 'app preview videos per locale (MD5-idempotent, poster frame time code); --dry'], diff --git a/cli/data/flags.json b/cli/data/flags.json index d8952e6..44ebcb1 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -264,7 +264,8 @@ "with-version" ], "apple review-details": [ - "contact-from" + "contact-from", + "platform" ], "apple screenshots": [ "include-drafts", @@ -1580,7 +1581,7 @@ "storebound apple resubmit --build [--version 1.0.0] [--platform ios|macos|tvos|visionos] [--resolve-iaps] [--first-release] [--dry] [--yes] [--json]" ], "apple review-details": [ - "storebound apple review-details [--contact-from ] [--dry]" + "storebound apple review-details [--platform ios|macos|tvos|visionos] [--contact-from ] [--dry]" ], "apple screenshots": [ "storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4] [--variant b] [--dry]", diff --git a/cli/lib/config.ts b/cli/lib/config.ts index 5e48f4c..05b9fc0 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -707,6 +707,15 @@ export interface ShipConfig { * 2560 x 1600, 1440 x 900, 1280 x 800). Landscape layout from //landscape/ (shots.landscape). Uploaded * as APP_DESKTOP to the macOS version: `apple screenshots --platform macos`. */ mac?: boolean; + /** + * macOS App Store overrides (not `mac`, which only switches Mac screenshots on). An app with an iOS and a macOS + * version often needs different version texts and review notes (the Mac app may have no Game Center, in-app + * purchases or ads). `listing`: an App Store listing file used instead of apple.listing for `apple listing + * --platform macos`; `reviewNotes`: used instead of apple.info.reviewNotes by `apple review-details --platform macos`. + * `gameCenter: true`: the Mac app has Game Center (silences the Game Center check of `validate --platform macos`). + * `noIap: true`: the Mac app sells nothing (validate then flags in-app purchase lines in the Mac texts). + */ + macos?: { listing?: string; reviewNotes?: string; gameCenter?: boolean; noIap?: boolean }; /** "Header and Search Results" creative assets (`storebound apple creative-assets`, iOS / iPadOS 27+). Files under * //creative/: header.{png,jpg,mov,m4v,mp4} (3840x1646, 21:9), search.{...} (3:2, 1920x1280 to * 3840x2560) or universal.png (5244x2950) for both. `header` / `search` false skip that slot; `universal` is a @@ -1036,6 +1045,14 @@ export function validateExtras(cfg: Partial): string[] { e.push('play.developerAccount: the developer account name as Play Console shows it (1-100 characters)'); if (cfg.play?.name !== undefined && !(typeof cfg.play.name === 'string' && cfg.play.name.trim() && [...cfg.play.name].length <= 30)) e.push('play.name: 1-30 characters (Play app name)'); if (cfg.play?.free !== undefined && typeof cfg.play.free !== 'boolean') e.push('play.free: true (free) | false (paid)'); + const mo = cfg.apple?.macos; + if (mo !== undefined) { + if (typeof mo !== 'object' || mo === null || Array.isArray(mo)) e.push('apple.macos: { listing?: "store/appstore-macos.md", reviewNotes?: "...", gameCenter?: true, noIap?: true }'); + else { + for (const k of ['listing', 'reviewNotes'] as const) if (mo[k] !== undefined && (typeof mo[k] !== 'string' || !mo[k]!.trim())) e.push(`apple.macos.${k}: a non-empty string${k === 'listing' ? ' (path of the macOS App Store listing file)' : ''}`); + for (const k of ['gameCenter', 'noIap'] as const) if (mo[k] !== undefined && typeof mo[k] !== 'boolean') e.push(`apple.macos.${k}: true | false`); + } + } const ad = cfg.apple?.adhoc; if (ad?.method !== undefined && ad.method !== 'release-testing' && ad.method !== 'ad-hoc') e.push('apple.adhoc.method: release-testing | ad-hoc'); const ppp = cfg.prices?.ppp; @@ -1114,6 +1131,23 @@ function validateIarcDetails(d: IarcDetails | undefined): string[] { } /** Platforms of the app (app identity): app.platforms, else from the store sections. */ +/** True for the macOS platform in any spelling: "macos", "mac_os" (API name MAC_OS), "mac". Pure. */ +export const isMacosPlatform = (p: string | undefined | null): boolean => !!p && /^mac(_?os)?$/i.test(p.replace(/[\s-]/g, '')); + +/** The App Store listing file (as written in the config, relative) for a platform: apple.macos.listing for macOS when + * set, else apple.listing, else store/appstore.md. Pure. */ +export function listingPathFor(config: Pick, platform?: string | null): string { + const mac = isMacosPlatform(platform) ? config.apple?.macos?.listing?.trim() : ''; + return mac || config.apple?.listing || 'store/appstore.md'; +} + +/** The App Review notes text of the config for a platform: apple.macos.reviewNotes for macOS when set, else + * apple.info.reviewNotes. Pure; reviewAccess and account deletion lines are added by reviewNotes() in lib/review-details. */ +export function reviewNotesFor(config: Pick, platform?: string | null): string | undefined { + const mac = isMacosPlatform(platform) ? config.apple?.macos?.reviewNotes : undefined; + return mac?.trim() ? mac : config.apple?.info?.reviewNotes; +} + /** App Store name limit (characters). */ export const APPLE_NAME_MAX = 30; diff --git a/cli/lib/listing-mentions.ts b/cli/lib/listing-mentions.ts index f7f9fb5..b8aaac3 100644 --- a/cli/lib/listing-mentions.ts +++ b/cli/lib/listing-mentions.ts @@ -2,7 +2,7 @@ // report. Reads store/appstore.md and store/listing.md (or the config's listing paths). import { existsSync, readFileSync } from 'node:fs'; import { relative } from 'node:path'; -import type { Loaded } from './config'; +import { listingPathFor, type Loaded } from './config'; import { fileMentions, type PlatformHit } from './cross-store'; export function listingFileMentions(loaded: Pick, stores: { apple: boolean; play: boolean } = { apple: true, play: true }): PlatformHit[] { @@ -11,6 +11,7 @@ export function listingFileMentions(loaded: Pick { return parsePlist(readFileSync(p)) as Record; } +/** What bounds and reports the .pkg reading (tests inject a fake spawnSync and short limits). */ +export interface PkgInfoOptions { say?: (msg: string) => void; spawnSync?: typeof rt.spawnSync; checkMs?: number; expandMs?: number } +/** pkgutil --check-signature evaluates the certificate chain (revocation lookups over the network): never unbounded. */ +export const PKG_CHECK_MS = 90_000; +/** pkgutil --expand copies the whole archive to a temp folder: minutes for a big app, never unbounded. */ +export const PKG_EXPAND_MS = 5 * 60_000; + /** bundle id, version and build of a .pkg: pkgutil --expand on a Mac (PackageInfo), else the .json next to it that - * `apple build --platform macos` wrote. Refuses an unsigned or wrongly signed .pkg when pkgutil is there. */ -export function pkgInfo(pkg: string, expectBundleId?: string): { bundleId: string; version: string; build: string } { - if (rt.which('pkgutil')) { - const sig = parsePkgSignature(rt.spawnSync(['pkgutil', '--check-signature', pkg], { stdout: 'pipe', stderr: 'pipe' }).stdout.toString()); - const bad = pkgProblems(sig); - if (bad.length) throw new Error(`${basename(pkg)}: not uploaded:\n${bad.map(x => ` ${x}`).join('\n')}`); - const tmp = join(process.env.TMPDIR ?? '/tmp', `sb-pkg-${process.pid}-${Date.now()}`); - try { - if (rt.spawnSync(['pkgutil', '--expand', pkg, tmp], { stdout: 'pipe', stderr: 'pipe' }).exitCode === 0) { - for (const d of readdirSync(tmp)) { - const p = join(tmp, d, 'PackageInfo'); - const info = existsSync(p) ? parsePackageInfo(readFileSync(p, 'utf8')) : null; - if (info && (!expectBundleId || info.bundleId === expectBundleId)) return info; - } - } - } finally { try { rmSync(tmp, { recursive: true, force: true }); } catch { /* temp */ } } - } + * `apple build --platform macos` wrote. Refuses an unsigned or wrongly signed .pkg when pkgutil is there. Both pkgutil + * calls have a timeout (no stdin, so no prompt) and say what they do first; one that times out falls back to the + * .json file, else it fails with the reason (a silent hang over SSH, 10 min, was this read). */ +export function pkgInfo(pkg: string, expectBundleId?: string, o: PkgInfoOptions = {}): { bundleId: string; version: string; build: string } { + const say = o.say ?? (() => {}); + const spawnSync = o.spawnSync ?? rt.spawnSync; const side = `${pkg}.json`; + let timedOut = ''; + if (rt.which('pkgutil') || o.spawnSync) { + const checkMs = o.checkMs ?? PKG_CHECK_MS, expandMs = o.expandMs ?? PKG_EXPAND_MS; + say(`checking the signature of ${basename(pkg)} (pkgutil --check-signature, up to ${Math.round(checkMs / 1000)} s)`); + const chk = spawnSync(['pkgutil', '--check-signature', pkg], { stdout: 'pipe', stderr: 'pipe', timeout: checkMs }); + if (chk.exitCode === null && chk.signalCode) timedOut = `pkgutil --check-signature gave no answer in ${Math.round(checkMs / 1000)} s (it checks the certificate chain over the network)`; + else { + const bad = pkgProblems(parsePkgSignature(chk.stdout.toString())); + if (bad.length) throw new Error(`${basename(pkg)}: not uploaded:\n${bad.map(x => ` ${x}`).join('\n')}`); + const tmp = join(process.env.TMPDIR ?? '/tmp', `sb-pkg-${process.pid}-${Date.now()}`); + say(`reading bundle id, version and build (pkgutil --expand, up to ${Math.round(expandMs / 1000)} s; a big package takes a while)`); + try { + const ex = spawnSync(['pkgutil', '--expand', pkg, tmp], { stdout: 'pipe', stderr: 'pipe', timeout: expandMs }); + if (ex.exitCode === null && ex.signalCode) timedOut = `pkgutil --expand gave no answer in ${Math.round(expandMs / 1000)} s`; + else if (ex.exitCode === 0) { + for (const d of readdirSync(tmp)) { + const p = join(tmp, d, 'PackageInfo'); + const info = existsSync(p) ? parsePackageInfo(readFileSync(p, 'utf8')) : null; + if (info && (!expectBundleId || info.bundleId === expectBundleId)) return info; + } + } + } finally { try { rmSync(tmp, { recursive: true, force: true }); } catch { /* temp */ } } + } + } + if (timedOut) say(`${timedOut}: using ${basename(side)} (written by apple build) instead`); if (existsSync(side)) { const j = JSON.parse(readFileSync(side, 'utf8')) as { bundleId?: string; version?: string; build?: string; unsigned?: boolean }; if (j.unsigned) throw new Error(`${basename(pkg)} was built with --unsigned: the Mac App Store refuses it`); if (j.bundleId && j.version && j.build) return { bundleId: j.bundleId, version: j.version, build: j.build }; } + if (timedOut) throw new Error(`${basename(pkg)}: ${timedOut}, and there is no ${basename(side)} file from apple build to read instead: run it in the Mac's logged-in GUI session, or check the Mac's network`); throw new Error(`${basename(pkg)}: cannot read bundle id / version / build (needs pkgutil on a Mac, or the ${basename(side)} file apple build wrote)`); } diff --git a/cli/lib/review-details.ts b/cli/lib/review-details.ts index f397e3c..26153b8 100644 --- a/cli/lib/review-details.ts +++ b/cli/lib/review-details.ts @@ -3,14 +3,15 @@ // field takes up to 4000 bytes; a demo account must keep working during the whole review (Guideline 2.1). // https://developer.apple.com/help/app-store-connect/reference/app-information/platform-version-information // https://developer.apple.com/documentation/appstoreconnectapi/appstorereviewdetail/attributes-data.dictionary -import type { ShipConfig } from './config'; +import { reviewNotesFor, type ShipConfig } from './config'; import { type DemoAccount, maskSecret, maskUser } from './credentials'; export const NOTES_MAX_BYTES = 4000; -/** Notes for the reviewer: apple.info.reviewNotes, then reviewAccess.instructions, then where account deletion is. */ -export function reviewNotes(config: Pick): string { - const parts = [config.apple?.info?.reviewNotes?.trim() ?? '']; +/** Notes for the reviewer: apple.info.reviewNotes (macOS: apple.macos.reviewNotes when set), then reviewAccess.instructions, + * then where account deletion is. */ +export function reviewNotes(config: Pick, platform?: string): string { + const parts = [reviewNotesFor(config, platform)?.trim() ?? '']; const ins = config.reviewAccess?.instructions?.trim(); if (ins && !parts[0]!.includes(ins)) parts.push(`Sign-in: ${ins}`); const del = config.accounts?.enabled ? config.accounts.inApp?.trim() : ''; @@ -29,8 +30,8 @@ export interface ReviewDetailPlan { * (throws when it is missing, so a submission never goes out with "sign-in required" and no account); without it the * demo fields are cleared. */ -export function reviewDetailPlan(config: Pick, contact: Record, demo: DemoAccount | null): ReviewDetailPlan { - const notes = reviewNotes(config); +export function reviewDetailPlan(config: Pick, contact: Record, demo: DemoAccount | null, platform?: string): ReviewDetailPlan { + const notes = reviewNotes(config, platform); const bytes = new TextEncoder().encode(notes).length; if (bytes > NOTES_MAX_BYTES) throw new Error(`review notes are ${bytes} bytes; App Store Connect takes ${NOTES_MAX_BYTES}`); const required = !!config.reviewAccess?.signInRequired; diff --git a/cli/lib/validate-rules.ts b/cli/lib/validate-rules.ts index c1e5491..ad3593b 100644 --- a/cli/lib/validate-rules.ts +++ b/cli/lib/validate-rules.ts @@ -72,7 +72,10 @@ export interface AppleSnapshot { build: { number: string; processingState: string; usesNonExemptEncryption: boolean | null; declarationState: string | null } | null; /** Locales the config expects (apple: entries of `languages`). */ expectedLocales: string[]; - locales: { locale: string; name?: string; subtitle?: string; description?: string; keywords?: string; screenshots: Record }[]; + locales: { locale: string; name?: string; subtitle?: string; description?: string; keywords?: string; promotionalText?: string; whatsNew?: string; screenshots: Record }[]; + /** apple.macos facts for the macOS claim check (validate fills it): the config's macOS review notes (what `apple review-details + * --platform macos` would send) and the gameCenter / noIap switches. */ + macos?: { notes?: string; gameCenter?: boolean; noIap?: boolean }; requiredDisplayTypes: string[]; /** apple.iphoneDuo (iPhone Duo renders on) and whether the project has a play section, for the Duo note. */ iphoneDuo?: boolean; @@ -208,6 +211,35 @@ export function copyrightRules(s: Pick = { IOS: 'iOS', MAC_OS: 'macOS', TV_OS: 'tvOS', VISION_OS: 'visionOS' }; +const MACOS_CLAIMS: { kind: string; re: RegExp; needs?: 'noGameCenter' | 'noIap'; what: string }[] = [ + { kind: 'game-center', re: /game\s*center/i, needs: 'noGameCenter', what: 'Game Center (set apple.macos.gameCenter: true when the Mac app has it)' }, + { kind: 'touch', re: /\b(tap|taps|tapping|swipe|swipes|swiping|pinch|pinches)\b|touch[\s-]?screen/i, what: 'touch words (tap, swipe, pinch, touch screen)' }, + { kind: 'ios-device', re: /\b(iphone|ipad)s?\b/i, what: 'an iPhone / iPad mention' }, + { kind: 'iap', re: /in[\s-]app[\s-]purchases?|\biaps?\b|restore purchases/i, needs: 'noIap', what: 'an in-app purchase line (apple.macos.noIap is set)' }, +]; + +/** + * A macOS version's texts (description, promotional text, what's new, keywords, subtitle) and review notes (live, and + * the config's apple.macos.reviewNotes / apple.info.reviewNotes) that carry iOS-only claims. Warnings only. Game Center + * is flagged unless apple.macos.gameCenter is true; in-app purchase lines only when apple.macos.noIap is set. Pure. + */ +export function macosClaimRules(s: Pick): Finding[] { + if (s.version?.platform !== 'MAC_OS') return []; + const texts: { where: string; text: string }[] = []; + for (const l of s.locales) for (const k of ['subtitle', 'description', 'promotionalText', 'whatsNew', 'keywords'] as const) if (l[k]) texts.push({ where: `${l.locale} ${k}`, text: l[k]! }); + if (s.reviewDetail?.notes) texts.push({ where: 'review notes (on the store)', text: s.reviewDetail.notes }); + if (s.macos?.notes) texts.push({ where: 'review notes (config)', text: s.macos.notes }); + const out: Finding[] = []; + for (const c of MACOS_CLAIMS) { + if (c.needs === 'noGameCenter' && s.macos?.gameCenter) continue; + if (c.needs === 'noIap' && !s.macos?.noIap) continue; + const hits = [...new Set(texts.filter(t => c.re.test(t.text)).map(t => t.where))]; + if (hits.length) out.push({ store: 'apple', level: 'warn', code: 'macos-claims', msg: `macOS version ${s.version.versionString}: ${c.what} in ${hits.slice(0, 6).join(', ')}${hits.length > 6 ? ` (+${hits.length - 6} more)` : ''}`, + fix: 'a separate macOS listing file (apple.macos.listing, then storebound apple listing --platform macos) and apple.macos.reviewNotes (storebound apple review-details --platform macos)' }); + } + return out; +} + export function appleRules(s: AppleSnapshot): Finding[] { const f: Finding[] = []; const add = (level: Level, code: string, msg: string, fix?: string, action?: FixAction, url?: string) => f.push({ store: 'apple', level, code, msg, fix, ...(action ? { action } : {}), ...(url ? { url } : {}) }); @@ -232,6 +264,7 @@ export function appleRules(s: AppleSnapshot): Finding[] { add('warn', 'version-platform', `version ${o.versionString} (${name}) is ${o.state} too: this report covers ${vl || 'iOS'} only`, `storebound validate --platform ${name.toLowerCase()}; storebound apple status lists every platform`); } f.push(...copyrightRules(s)); + f.push(...macosClaimRules(s)); if (!s.build) add('blocker', 'build', 'no build attached to the version', 'storebound apple listing --version x.y.z --build N (pick the build number you just uploaded)'); else { diff --git a/cli/validate.ts b/cli/validate.ts index b95f7a2..773359b 100644 --- a/cli/validate.ts +++ b/cli/validate.ts @@ -22,6 +22,7 @@ import { firstProductReport } from './apple/first-products'; import { requiredDisplayTypes } from './apple/screenshots'; import { pendingScreenshots, setRows, type ShotRow, updateLedger } from './apple/screenshot-health'; import { type Loaded, playCategoryOf, playCodes, profileOf, sellsOn } from './lib/config'; +import { reviewNotes } from './lib/review-details'; import { reviewDemoAccount } from './lib/credentials'; import { allSubscriptions, basePlanId } from './lib/subscriptions'; import type { Ctx } from './lib/ctx'; @@ -143,7 +144,7 @@ export async function collectApple(ctx: Ctx): Promise { shotRows.push(...setRows(shots, l.attributes.locale, s.attributes.screenshotDisplayType)); } const ia = infoLocs.get(l.attributes.locale) ?? {}; - locales.push({ locale: l.attributes.locale, name: ia.name, subtitle: ia.subtitle, description: l.attributes.description, keywords: l.attributes.keywords, screenshots }); + locales.push({ locale: l.attributes.locale, name: ia.name, subtitle: ia.subtitle, description: l.attributes.description, keywords: l.attributes.keywords, promotionalText: l.attributes.promotionalText ?? undefined, whatsNew: l.attributes.whatsNew ?? undefined, screenshots }); } reviewDetail = (await c.maybe(`/v1/appStoreVersions/${v.id}/appStoreReviewDetail`))?.data?.attributes ?? null; } @@ -188,6 +189,7 @@ export async function collectApple(ctx: Ctx): Promise { expectedLocales: config.languages.map(l => l.apple).filter((x): x is string => !!x), requiredDisplayTypes: requiredDisplayTypes(config.apple, platform), iphoneDuo: !!config.apple?.iphoneDuo, play: !!config.play, + macos: platform === 'MAC_OS' ? { notes: reviewNotes(config, 'macos'), gameCenter: config.apple?.macos?.gameCenter, noIap: config.apple?.macos?.noIap } : undefined, macVersion: every.some(x => platformOf(x) === 'MAC_OS'), mac: !!config.apple?.mac, priceSchedule: !!sched?.included?.some((x: J) => x.type === 'appPrices'), availability: !!avail?.data, diff --git a/skills/appstore-first-release/SKILL.md b/skills/appstore-first-release/SKILL.md index 4f90081..e41c8c5 100644 --- a/skills/appstore-first-release/SKILL.md +++ b/skills/appstore-first-release/SKILL.md @@ -63,7 +63,12 @@ answers the compliance facts no file proves, all in one batch at the start. 10. **API · Review details.** `storebound apple review-details` (contact from `.storebound/credentials.json` `reviewContact`, or `--contact-from `; notes from the config). Apps behind a sign-in: the demo account from `.storebound/` (`review-access` skill). Apps with accounts: in-app deletion - (`account-deletion` skill). + (`account-deletion` skill). An app with an iOS **and** a macOS version: `--platform macos` (`apple listing`, `apple + review-details`) uses `apple.macos.listing` (its own appstore file) and `apple.macos.reviewNotes` when set, else + the iOS ones; the Mac app often has no Game Center, IAP or ads, so say so there. `storebound validate --platform + macos` warns about iOS-only claims in the Mac texts and notes (Game Center unless `apple.macos.gameCenter: true`, + tap / swipe / pinch / touch screen, iPhone / iPad, and IAP lines when `apple.macos.noIap: true`). Not `apple.mac` + (that only turns Mac screenshots on). 11. **API · In-app purchases and subscriptions.** `store-iap-setup` and `store-subscriptions` skills. First IAPs and subscriptions go to review **with** this version: `storebound apple iap-submit --with-version --dry`, then (after the owner's yes, since it submits) `storebound apple iap-submit --with-version --yes`. On a real first diff --git a/tests/macos-overrides.test.ts b/tests/macos-overrides.test.ts new file mode 100644 index 0000000..ac9c9f2 --- /dev/null +++ b/tests/macos-overrides.test.ts @@ -0,0 +1,112 @@ +// apple.macos: per-platform listing file and review notes for an app with an iOS and a macOS App Store version, the +// config check, and the validate warning for iOS-only claims in a macOS version's texts. +import { describe, expect, test } from 'bun:test'; +import { isMacosPlatform, listingPathFor, reviewNotesFor, validateExtras, type ShipConfig } from '../cli/lib/config'; +import { reviewDetailPlan, reviewNotes } from '../cli/lib/review-details'; +import { appleRules, macosClaimRules, type AppleSnapshot } from '../cli/lib/validate-rules'; + +const cfg = (apple: Record) => ({ apple: { bundleId: 'com.example.app', ...apple } }) as unknown as Pick; +const contact = { contactFirstName: 'A', contactLastName: 'B', contactPhone: '+10000000000', contactEmail: 'a@example.com' }; + +describe('platform helpers', () => { + test('spellings of macOS', () => { + for (const p of ['macos', 'MAC_OS', 'macOS', 'mac']) expect(isMacosPlatform(p)).toBe(true); + for (const p of ['ios', 'IOS', 'tvos', '', undefined]) expect(isMacosPlatform(p)).toBe(false); + }); + test('listingPathFor: macOS override, else apple.listing, else the default', () => { + const c = cfg({ listing: 'store/ios.md', macos: { listing: 'store/mac.md' } }); + expect(listingPathFor(c, 'macos')).toBe('store/mac.md'); + expect(listingPathFor(c, 'MAC_OS')).toBe('store/mac.md'); + expect(listingPathFor(c, 'ios')).toBe('store/ios.md'); + expect(listingPathFor(c)).toBe('store/ios.md'); + expect(listingPathFor(cfg({ macos: {} }), 'macos')).toBe('store/appstore.md'); + expect(listingPathFor(cfg({ listing: 'store/ios.md', macos: { reviewNotes: 'x' } }), 'macos')).toBe('store/ios.md'); + }); + test('reviewNotesFor: macOS override, else apple.info.reviewNotes', () => { + const c = cfg({ info: { reviewNotes: 'iOS notes' }, macos: { reviewNotes: 'Mac notes' } }); + expect(reviewNotesFor(c, 'macos')).toBe('Mac notes'); + expect(reviewNotesFor(c, 'ios')).toBe('iOS notes'); + expect(reviewNotesFor(cfg({ info: { reviewNotes: 'iOS notes' }, macos: {} }), 'macos')).toBe('iOS notes'); + }); +}); + +describe('review details plan', () => { + const c = { ...cfg({ info: { reviewNotes: 'iOS notes: Game Center, IAP' }, macos: { reviewNotes: 'Mac notes: no purchases' } }), reviewAccess: { signInRequired: false, instructions: 'No sign-in.' } } as Pick; + test('macos picks the Mac notes, ios and default keep the iOS notes; the shared sign-in line stays', () => { + expect(reviewDetailPlan(c, contact, null, 'macos').attributes.notes).toBe('Mac notes: no purchases\n\nSign-in: No sign-in.'); + expect(reviewDetailPlan(c, contact, null, 'ios').attributes.notes).toBe('iOS notes: Game Center, IAP\n\nSign-in: No sign-in.'); + expect(reviewDetailPlan(c, contact, null).attributes.notes).toBe(reviewNotes(c)); + }); +}); + +describe('config check', () => { + test('apple.macos shape', () => { + expect(validateExtras({ apple: { bundleId: 'com.example.app', macos: { listing: 'a.md', reviewNotes: 'x', gameCenter: true, noIap: true } } } as never)).toEqual([]); + const bad = validateExtras({ apple: { bundleId: 'com.example.app', macos: { listing: '', gameCenter: 'yes', noIap: 1 } } } as never); + expect(bad.some(m => m.startsWith('apple.macos.listing'))).toBe(true); + expect(bad.some(m => m.startsWith('apple.macos.gameCenter'))).toBe(true); + expect(bad.some(m => m.startsWith('apple.macos.noIap'))).toBe(true); + expect(validateExtras({ apple: { bundleId: 'com.example.app', macos: 'x' } } as never).some(m => m.startsWith('apple.macos:'))).toBe(true); + }); +}); + +describe('validate: iOS-only claims on a macOS version', () => { + const loc = (o: Record) => [{ locale: 'en-US', screenshots: {}, ...o }]; + const snap = (over: Partial): Pick => + ({ version: { versionString: '1.0.0', state: 'PREPARE_FOR_SUBMISSION', platform: 'MAC_OS' }, locales: [], reviewDetail: null, ...over }); + const codes = (f: { msg: string }[]) => f.map(x => x.msg); + + test('Game Center, touch words and iPhone mentions warn; nothing blocks', () => { + const f = macosClaimRules(snap({ locales: loc({ description: 'Compete on Game Center. Tap and swipe to play on your iPhone.' }) })); + expect(f.length).toBe(3); + expect(f.every(x => x.level === 'warn' && x.code === 'macos-claims')).toBe(true); + expect(codes(f).join('\n')).toContain('en-US description'); + }); + test('promotional text, what\'s new, keywords and live review notes are read', () => { + const f = macosClaimRules(snap({ locales: loc({ promotionalText: 'Use the touch screen', whatsNew: 'Pinch to zoom', keywords: 'ipad' }), reviewDetail: { notes: 'Sign in with Game Center' } })); + const all = codes(f).join('\n'); + expect(all).toContain('en-US promotionalText'); + expect(all).toContain('en-US whatsNew'); + expect(all).toContain('en-US keywords'); + expect(all).toContain('review notes (on the store)'); + }); + test('the config review notes the Mac would use are checked too', () => { + expect(codes(macosClaimRules(snap({ macos: { notes: 'Game Center leaderboards are in the menu' } }))).join()).toContain('review notes (config)'); + }); + test('apple.macos.gameCenter silences Game Center; IAP lines only with noIap', () => { + const text = loc({ description: 'Game Center scores. Remove ads with an in-app purchase.' }); + expect(macosClaimRules(snap({ locales: text, macos: { gameCenter: true } }))).toEqual([]); + const f = macosClaimRules(snap({ locales: text, macos: { gameCenter: true, noIap: true } })); + expect(f.length).toBe(1); + expect(f[0]!.msg).toContain('in-app purchase'); + }); + test('words that only look similar do not match; iOS versions are never checked', () => { + expect(macosClaimRules(snap({ locales: loc({ description: 'Contact the support team; a stapler, a tapestry, an iPhoneless desk.' }) }))).toEqual([]); + expect(macosClaimRules(snap({ version: { versionString: '1.0.0', state: 'PREPARE_FOR_SUBMISSION', platform: 'IOS' }, locales: loc({ description: 'Game Center, tap' }) }))).toEqual([]); + }); + test('appleRules includes the warning', () => { + const base = { expectedLocales: [], requiredDisplayTypes: [], iaps: [], expectedProducts: [], ageRating: null, priceSchedule: false, availability: false, build: null, privacyUrl: { url: 'https://example.com', status: 200 } }; + const f = appleRules({ ...base, ...snap({ locales: loc({ description: 'Tap here', screenshots: {} as never }) }) } as AppleSnapshot); + expect(f.some(x => x.code === 'macos-claims' && x.level === 'warn')).toBe(true); + }); +}); + +describe('apple listing reads the platform file', () => { + test('readAppleCopy(ctx, "macos") reads apple.macos.listing, ios reads apple.listing', async () => { + const { mkdtempSync, writeFileSync } = await import('node:fs'); + const { tmpdir } = await import('node:os'); + const { join, resolve } = await import('node:path'); + const { readAppleCopy } = await import('../cli/apple/listing'); + const { parseArgs } = await import('../cli/lib/args'); + const fence = '`'.repeat(3); + const sec = (d: string) => ['## en-US', '', '### subtitle', fence, 'Sub', fence, '', '### promotionalText', fence, 'Promo', fence, '', '### keywords', fence, 'run,time', fence, '', '### description', fence, d, fence, ''].join('\n'); + const dir = mkdtempSync(join(tmpdir(), 'sb-macos-')); + writeFileSync(join(dir, 'ios.md'), sec('Play on iPhone with Game Center.')); + writeFileSync(join(dir, 'mac.md'), sec('Play on your Mac.')); + const loaded = { config: cfg({ listing: 'ios.md', macos: { listing: 'mac.md' } }), resolve: (p: string) => resolve(dir, p), root: dir }; + const ctx = { loaded, args: parseArgs([]) } as never; + expect(readAppleCopy(ctx, 'macos')['en-US']?.description).toContain('Mac'); + expect(readAppleCopy(ctx, 'ios')['en-US']?.description).toContain('iPhone'); + expect(readAppleCopy(ctx)['en-US']?.description).toContain('iPhone'); + }); +}); diff --git a/tests/upload-pkg-hang.test.ts b/tests/upload-pkg-hang.test.ts new file mode 100644 index 0000000..f4e1890 --- /dev/null +++ b/tests/upload-pkg-hang.test.ts @@ -0,0 +1,114 @@ +// `apple upload --platform macos` once printed nothing for 10 minutes over SSH although the build number was +// VALID on App Store Connect. Causes: pkgutil --check-signature / --expand ran unbounded and silent, and the processing +// wait polled the IOS platform only, so a Mac build was "not listed yet" for the whole --timeout. These tests keep +// every slow step logged and bounded, and an already-VALID build number ends at once (no upload, no wait). +import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, setDefaultTimeout, test } from 'bun:test'; +import { mkdtempSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { hooks, run as appleUpload } from '../cli/apple/upload'; +import { PKG_CHECK_MS, PKG_EXPAND_MS, pkgInfo } from '../cli/lib/mas'; +import { HEARTBEAT_MS } from '../cli/lib/progress'; +import type { SyncResult } from '../cli/lib/rt'; +import { ascEnv, BASE, project, restore } from './helpers/store-mock'; +import { installStores, type Stores, uninstallStores, writes } from './helpers/fake-stores'; + +const SIDE = JSON.stringify({ bundleId: 'com.example.notes', version: '1.2.0', build: '7' }); +const files = (): Record => ({ 'build/macos/Example.pkg': 'pkg', 'build/macos/Example.pkg.json': SIDE }); +const result = (o: Partial): SyncResult => ({ exitCode: 0, signalCode: null, success: true, stdout: Buffer.alloc(0), stderr: Buffer.alloc(0), ...o }); +const timedOut = result({ exitCode: null, signalCode: 'SIGTERM', success: false }); +const SIGNED = 'Package "Bare.pkg":\n Status: signed by a certificate trusted by macOS\n Certificate Chain:\n 1. 3rd Party Mac Developer Installer: Example (ABCDE12345)\n Expires: 2030-01-01\n 2. Apple Worldwide Developer Relations Certification Authority\n 3. Apple Root CA\n'; + +type Seen = { argv: string[]; timeout?: number }; +const fake = (seen: Seen[], answer: (argv: string[]) => SyncResult) => ((argv: string[], o: { timeout?: number }) => { seen.push({ argv, timeout: o.timeout }); return answer(argv); }) as never; + +/** Runs fn with log output captured (log.ts writes through console). */ +async function logged(fn: () => Promise): Promise<{ text: string; error: Error | null }> { + const out: string[] = []; + const log = console.log, err = console.error, warn = console.warn; + console.log = console.error = console.warn = (...a: unknown[]) => { out.push(a.map(String).join(' ')); }; + let error: Error | null = null; + try { await fn(); } catch (e) { error = e as Error; } finally { console.log = log; console.error = err; console.warn = warn; } + return { text: out.join('\n'), error }; +} + +describe('pkgInfo: bounded and never silent', () => { + test('the signature check has a timeout and a log line; when it times out the .json apple build wrote is used', () => { + const p = project(BASE, files()); + const said: string[] = [], seen: Seen[] = []; + const info = pkgInfo(join(p.root, 'build/macos/Example.pkg'), 'com.example.notes', { say: m => said.push(m), spawnSync: fake(seen, () => timedOut) }); + expect(info).toEqual({ bundleId: 'com.example.notes', version: '1.2.0', build: '7' }); + expect(seen).toHaveLength(1); + expect(seen[0]!.timeout).toBe(PKG_CHECK_MS); + expect(said[0]).toContain('pkgutil --check-signature'); + expect(said.at(-1)).toContain('gave no answer'); + expect(said.at(-1)).toContain('Example.pkg.json'); + }); + + test('the expand is bounded too; a timeout without the .json file is an error that names the cause', () => { + const p = project(BASE, { 'build/macos/Bare.pkg': 'pkg' }); + const said: string[] = [], seen: Seen[] = []; + const spawnSync = fake(seen, argv => (argv[1] === '--check-signature' ? result({ stdout: Buffer.from(SIGNED) }) : timedOut)); + let error: Error | null = null; + try { pkgInfo(join(p.root, 'build/macos/Bare.pkg'), undefined, { say: m => said.push(m), spawnSync, expandMs: 5000 }); } catch (e) { error = e as Error; } + expect(error?.message).toContain('pkgutil --expand gave no answer'); + expect(error?.message).toContain('Bare.pkg.json'); + expect(seen.map(x => x.argv[1])).toEqual(['--check-signature', '--expand']); + expect(seen[1]!.timeout).toBe(5000); + expect(said.some(m => m.includes('pkgutil --expand'))).toBe(true); + expect(PKG_EXPAND_MS).toBeGreaterThan(PKG_CHECK_MS); + }); +}); + +describe('apple upload of a .pkg (fake stores)', () => { + setDefaultTimeout(30_000); + let s: Stores; + const path = process.env.PATH; + beforeAll(() => { ascEnv(); }); + afterAll(restore); + beforeEach(() => { s = installStores(); process.env.PATH = mkdtempSync(join(tmpdir(), 'sb-nopkgutil-')); }); // no pkgutil: the .json is read + afterEach(() => { uninstallStores(); process.env.PATH = path; hooks.heartbeat = undefined; }); + + test('an already VALID build number ends at once: clear message, no upload, no wait, every slow step logged first', async () => { + s.asc.put({ type: 'builds', id: 'b-7', attributes: { version: '7', processingState: 'VALID' }, rels: { app: '6400000101' } }); + const p = project(BASE, files()); + const started = Date.now(); + const r = await logged(() => appleUpload(p.ctx(['build/macos/Example.pkg', '--platform', 'macos', '--yes']))); + expect(Date.now() - started).toBeLessThan(10_000); + expect(r.error?.message).toContain('already on App Store Connect (VALID)'); + expect(writes(s.calls)).toEqual([]); + expect(s.calls.some(c => decodeURIComponent(c.path).includes('preReleaseVersion.platform'))).toBe(false); // no processing poll + expect(s.asc.parts).toEqual([]); + expect(r.text).toContain('reading the package'); + expect(r.text).toContain('asking App Store Connect'); + expect(r.text.indexOf('reading the package')).toBeLessThan(r.text.indexOf('asking App Store Connect')); + }); + + test('--allow-existing on a Mac build: the wait polls MAC_OS and prints a heartbeat while a poll is in flight', async () => { + s.asc.put({ type: 'builds', id: 'b-7', attributes: { version: '7', processingState: 'VALID' }, rels: { app: '6400000101' } }); + const p = project(BASE, files()); + let beat: (() => void) | null = null; + hooks.heartbeat = { everyMs: 1000, ticker: f => { beat = f; return () => { beat = null; }; } }; + const inner = globalThis.fetch, polls: string[] = []; + globalThis.fetch = (async (input: string | URL | Request, init?: RequestInit) => { + if (decodeURIComponent(String(input)).includes('preReleaseVersion.platform')) { + (beat as (() => void) | null)?.(); // the poll is in flight: time passes + polls.push(decodeURIComponent(String(input))); + // the fake does not implement include=: answer the way App Store Connect does + return new Response(JSON.stringify({ data: [{ type: 'builds', id: 'b-7', attributes: { version: '7', processingState: 'VALID' }, relationships: { preReleaseVersion: { data: { type: 'preReleaseVersions', id: 'pv-1' } } } }], included: [{ type: 'preReleaseVersions', id: 'pv-1', attributes: { version: '1.2.0' } }] }), { status: 200 }); + } + return inner(input as never, init); + }) as typeof fetch; + const r = await logged(() => appleUpload(p.ctx(['build/macos/Example.pkg', '--platform', 'macos', '--yes', '--allow-existing']))); + expect(r.error).toBeNull(); + expect(r.text).toMatch(/still waiting for build 7: first check/); + expect(r.text).toContain('build 7 is VALID'); + expect(polls).toHaveLength(1); + expect(polls[0]).toContain('filter[preReleaseVersion.platform]=MAC_OS'); + expect(writes(s.calls)).toEqual([]); + }); + + test('the default heartbeat is at least once a minute', () => { + expect(HEARTBEAT_MS).toBeLessThanOrEqual(60_000); + }); +}); From d88ed3ec55c40f49c19bb4c3f440524c73331780 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:32:38 +0700 Subject: [PATCH 36/73] mcp: apple_review_details takes platform (macOS version, apple.macos.reviewNotes) --- cli/mcp-tools.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/mcp-tools.ts b/cli/mcp-tools.ts index 17c7cf5..da72820 100644 --- a/cli/mcp-tools.ts +++ b/cli/mcp-tools.ts @@ -219,7 +219,8 @@ export const TOOLS: ToolDef[] = [ { name: 'apple_appinfo', title: 'App Store app info', command: ['apple', 'appinfo'], write: true, network: true, idempotent: true, description: 'Categories, age rating declaration, content rights, Free price and availability (when missing).' }, { name: 'apple_review_details', title: 'App Review information', command: ['apple', 'review-details'], write: true, network: true, idempotent: true, - description: 'App Review contact and, when reviewAccess.signInRequired, the demo account (both from .storebound/credentials.json or env, masked in the output), plus the review notes (apple.info.reviewNotes, sign-in instructions, where account deletion is).' }, + description: 'App Review contact and, when reviewAccess.signInRequired, the demo account (both from .storebound/credentials.json or env, masked in the output), plus the review notes (apple.info.reviewNotes, or apple.macos.reviewNotes for platform macos; sign-in instructions, where account deletion is). Written to the editable version of the platform.', + props: { platform }, args: i => opt('platform', i.platform) }, { name: 'apple_encryption', title: 'Export compliance answer', command: ['apple', 'encryption'], write: true, network: true, idempotent: true, description: 'Answer export compliance for builds from apple.usesNonExemptEncryption in the config (never guesses).', props: { build: { type: 'string', description: 'Build number (default: every build without an answer)' } }, args: i => opt('build', i.build) }, From 68467ffe9b335e0de360cb23d1fba286d105e302 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:40:06 +0700 Subject: [PATCH 37/73] apple build --platform macos: --tauri takes tauri..conf.json (tauri.appstore.conf.json found by itself), entitlements from --entitlements / apple.macos.entitlements / the merged config, Developer-ID-only keys refused or warned --- cli/apple/build-mas.ts | 33 ++++-- cli/apple/build.ts | 2 +- cli/data/flags.json | 6 +- cli/lib/config.ts | 8 +- cli/lib/mas.ts | 95 +++++++++++++++-- skills/build-and-sign/SKILL.md | 7 ++ tests/mas-entitlements.test.ts | 182 +++++++++++++++++++++++++++++++++ 7 files changed, 312 insertions(+), 21 deletions(-) create mode 100644 tests/mas-entitlements.test.ts diff --git a/cli/apple/build-mas.ts b/cli/apple/build-mas.ts index 6440af6..85de5d6 100644 --- a/cli/apple/build-mas.ts +++ b/cli/apple/build-mas.ts @@ -1,6 +1,6 @@ // Mac App Store build of a Tauri app: `tauri build --bundles app`, signed for the Mac App Store, then productbuild to a .pkg. // storebound apple build --platform macos --tauri [--path-free] [--target universal-apple-darwin] -// [--version x.y.z] [--build-number N] [--profile ] [--out build/macos] [--unsigned] [--dry] [--json] +// [--entitlements ] [--allow-entitlements] [--version x.y.z] [--build-number N] [--profile ] [--out build/macos] [--unsigned] [--dry] [--json] // Steps: Tauri project -> version / build number (next free one on App Store Connect, every platform) -> signing // identities from the keychain ("Apple Distribution" or "3rd Party Mac Developer Application"; "Mac Installer // Distribution" or "3rd Party Mac Developer Installer") -> Mac App Store provisioning profile (--profile, installed, or @@ -27,7 +27,7 @@ import { prebuildFor, prebuildsDone, runPrebuild } from '../lib/web-assets'; import { preCheckCommand } from '../lib/pre-check'; import { pump } from '../lib/runner'; import { - appProblems, entitlementKeysOf, entitlementsXml, findBuiltApp, findTauri, leakNeedles, masEntitlements, type MasProfile, masSteps, pathFreeEnv, pickMasIdentities, + appProblems, entitlementKeysOf, entitlementsSource, entitlementsXml, findBuiltApp, findTauri, leakNeedles, masEntitlementProblems, masEntitlements, type MasProfile, masSteps, pathFreeEnv, pickMasIdentities, pickMasProfiles, pkgProblems, parsePkgSignature, readAppInfo, scanPathLeaks, tauriOverlay, categoryId, } from '../lib/mas'; import { readdirSync } from 'node:fs'; @@ -167,17 +167,31 @@ export async function run(ctx: Ctx, platform: string = process.platform): Promis const prebuild = prebuildFor(config, 'apple') ?? null; const prebuildSkip = !prebuild ? undefined : a.has('no-prebuild') ? '--no-prebuild' : prebuildsDone().has(prebuild) ? 'already ran in this flow run' : undefined; const appCheck = config.apple?.macAppCheck?.trim() || null; - const existingEnt = tauri.entitlements && existsSync(tauri.entitlements) ? (parsePlist(readFileSync(tauri.entitlements)) as Record) : undefined; + // entitlements: --entitlements, apple.macos.entitlements, the merged Tauri config (the first one that is set) + const entFlag = a.get('entitlements'), entCfg = config.apple?.macos?.entitlements; + const entSrc = entitlementsSource({ flag: entFlag ? resolve(entFlag) : undefined, config: entCfg ? resolve(entCfg) : undefined, tauri: tauri.entitlements }); + let existingEnt: Record | undefined; + if (entSrc) { + if (existsSync(entSrc.file)) existingEnt = parsePlist(readFileSync(entSrc.file)) as Record; + else if (entSrc.source !== 'tauri config bundle.macOS.entitlements') throw new Error(`${entSrc.source}: ${entSrc.file} does not exist`); + else warn(TAG, `${entSrc.source}: ${relative(root, entSrc.file)} does not exist, using the sandbox defaults only`); + } const ent = masEntitlements({ teamId: team, bundleId, existing: existingEnt }); - const plan = { platform: 'MAC_OS', tauri: relative(root, tauri.confPath), target, version, build: buildNo, teamId: teamId, unsigned, pathFree, appIdentity, installerIdentity, - profile: profile ? basenameOf(profile) : null, entitlements: Object.keys(ent), tauriOverlay: overlay, env: Object.fromEntries(Object.entries(env).map(([k, v]) => [k, k === 'RUSTFLAGS' ? v.replaceAll(home, '~') : v])), + const entCheck = masEntitlementProblems(ent); + const allowEnt = a.has('allow-entitlements'); + const plan = { platform: 'MAC_OS', tauri: relative(root, tauri.confPath), tauriOverlayFile: tauri.overlayPath ? relative(root, tauri.overlayPath) : null, target, version, build: buildNo, teamId: teamId, unsigned, pathFree, appIdentity, installerIdentity, + profile: profile ? basenameOf(profile) : null, entitlements: Object.keys(ent), entitlementsSource: entSrc ? { source: entSrc.source, file: relative(root, entSrc.file) } : null, + entitlementProblems: entCheck, tauriOverlay: overlay, env: Object.fromEntries(Object.entries(env).map(([k, v]) => [k, k === 'RUSTFLAGS' ? v.replaceAll(home, '~') : v])), prebuild, ...(prebuildSkip ? { prebuildSkip } : {}), appCheck, steps: [showCmd(steps.tauri, null), showCmd(steps.codesignVerify, null), showCmd(steps.productbuild, null), showCmd(steps.pkgCheck, null)], out: relative(root, out) || '.', pkg: relative(root, pkg) }; if (dry) { if (json) { printJson(plan); return; } log(TAG, `Tauri ${tauri.productName} (${bundleId}) ${version} (${buildNo}) for ${target}, ${unsigned ? 'UNSIGNED' : 'Mac App Store signing'}${pathFree ? ', path-free' : ''}`); log(TAG, identityLine({ platform, appIdentity, installerIdentity, profile: plan.profile })); - log(TAG, `entitlements: ${plan.entitlements.join(', ')}`); + if (tauri.overlayPath) log(TAG, `Tauri overlay ${plan.tauriOverlayFile}${tauri.overlayAuto ? ' (found next to tauri.conf.json)' : ''}: merged over tauri.conf.json, passed to tauri build --config`); + log(TAG, `entitlements from ${entSrc?.source ?? 'the sandbox defaults'}${entSrc ? ` (${plan.entitlementsSource!.file})` : ''}: ${plan.entitlements.join(', ')}`); + for (const e of entCheck.errors) warn(TAG, `entitlement ${e}${allowEnt ? '' : ' (the real build stops here; --allow-entitlements builds anyway)'}`); + for (const w of entCheck.warnings) warn(TAG, `entitlement ${w}`); if (pathFree) log(TAG, `RUSTFLAGS: ${plan.env.RUSTFLAGS}`); if (prebuild) log(TAG, prebuildSkip ? `prebuild skipped (${prebuildSkip}): ${prebuild}` : `would run the prebuild: ${prebuild}`); for (const s of plan.steps) log(TAG, `would run: ${s}`); @@ -185,6 +199,11 @@ export async function run(ctx: Ctx, platform: string = process.platform): Promis done(TAG, 'macOS build planned (dry run)'); return; } + if (tauri.overlayPath) log(TAG, `Tauri overlay ${plan.tauriOverlayFile}${tauri.overlayAuto ? ' (found next to tauri.conf.json)' : ''}: merged over tauri.conf.json, passed to tauri build --config`); + log(TAG, `entitlements from ${entSrc?.source ?? 'the sandbox defaults'}${entSrc ? ` (${plan.entitlementsSource!.file})` : ''}: ${plan.entitlements.join(', ')}`); + for (const w of entCheck.warnings) warn(TAG, `entitlement ${w}`); + for (const e of entCheck.errors) if (allowEnt) warn(TAG, `entitlement ${e} (--allow-entitlements)`); + if (entCheck.errors.length && !allowEnt) throw new Error(`the entitlements (from ${entSrc?.source ?? 'the sandbox defaults'}) do not belong in a Mac App Store build:\n${entCheck.errors.map(x => ` ${x}`).join('\n')}\n Point the build at the App Store plist: --entitlements , apple.macos.entitlements, or a tauri.appstore.conf.json overlay next to tauri.conf.json (--allow-entitlements builds anyway).`); if (!mac) throw new Error('apple build --platform macos needs macOS (tauri build, codesign, productbuild)'); const remote = remoteBuildSession(process.env, run1(['launchctl', 'managername'], 5000).out.trim()); if (remote && !unsigned && !a.has('allow-ssh')) throw new Error(`${sshBuildRefusal(remote, { unlockFlag: false })} @@ -205,7 +224,7 @@ export async function run(ctx: Ctx, platform: string = process.platform): Promis const entOut = unsigned ? null : entitlementKeysOf(run1(['codesign', '-d', '--entitlements', ':-', appDir]).out); const leaks = pathFree || a.has('scan-paths') ? scanPathLeaks(appDir, leakNeedles(home, user, root)) : []; const checks = appProblems({ info: readAppInfo(appDir), entitlements: entOut, hasProfile: existsSync(join(appDir, 'Contents', 'embedded.provisionprofile')), leaks }, - { bundleId, version, build: buildNo, signed: !unsigned, pathFree }); + { bundleId, version, build: buildNo, signed: !unsigned, pathFree, allowEntitlements: allowEnt }); for (const w of checks.warnings) warn(TAG, w); if (checks.errors.length) throw new Error(`${basenameOf(appDir)} was built, but the Mac App Store would refuse it:\n${checks.errors.map(x => ` ${x}`).join('\n')}`); if (appCheck) { diff --git a/cli/apple/build.ts b/cli/apple/build.ts index 18093db..1655081 100644 --- a/cli/apple/build.ts +++ b/cli/apple/build.ts @@ -1,5 +1,5 @@ // Archive and export an App Store IPA with xcodebuild, no Xcode UI. -// storebound apple build --platform macos --tauri [--path-free] [--unsigned] [--target T] [--profile F] [--version x.y.z] [--build-number N] [--out D] +// storebound apple build --platform macos --tauri [--path-free] [--unsigned] [--target T] [--profile F] [--entitlements ] [--allow-entitlements] [--version x.y.z] [--build-number N] [--out D] // (Mac App Store build of a Tauri app: cli/apple/build-mas.ts) // storebound apple build [--version 1.2.0] [--build-number N] [--scheme S] [--workspace W | --project P] // [--configuration Release] [--out build/ios] [--no-prebuild] [--allow-stale-web] [--dry] [--json] diff --git a/cli/data/flags.json b/cli/data/flags.json index 44ebcb1..9e5aed1 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -69,12 +69,14 @@ "apple build": [ "allow-app-group-gap", "allow-device-gap", + "allow-entitlements", "allow-ssh", "allow-stale-web", "allow-version-mismatch", "build-number", "configuration", "derived-data", + "entitlements", "env-file", "evidence", "keychain", @@ -1181,6 +1183,7 @@ "allow-app-group-gap", "allow-availability-changes", "allow-device-gap", + "allow-entitlements", "allow-existing", "allow-origin", "allow-price-changes", @@ -1243,6 +1246,7 @@ "download", "enable", "end", + "entitlements", "env-file", "every", "evidence", @@ -1506,7 +1510,7 @@ "storebound apple appinfo [--dry] [--json] [--allow-price-changes] [--allow-availability-changes]" ], "apple build": [ - "storebound apple build --platform macos --tauri [--path-free] [--unsigned] [--target T] [--profile F] [--version x.y.z] [--build-number N] [--out D]", + "storebound apple build --platform macos --tauri [--path-free] [--unsigned] [--target T] [--profile F] [--entitlements ] [--allow-entitlements] [--version x.y.z] [--build-number N] [--out D]", "storebound apple build [--version 1.2.0] [--build-number N] [--scheme S] [--workspace W | --project P]" ], "apple bundle": [ diff --git a/cli/lib/config.ts b/cli/lib/config.ts index 05b9fc0..01da2ed 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -714,8 +714,10 @@ export interface ShipConfig { * --platform macos`; `reviewNotes`: used instead of apple.info.reviewNotes by `apple review-details --platform macos`. * `gameCenter: true`: the Mac app has Game Center (silences the Game Center check of `validate --platform macos`). * `noIap: true`: the Mac app sells nothing (validate then flags in-app purchase lines in the Mac texts). + * `entitlements`: the Mac App Store entitlements plist of `apple build --platform macos --tauri` (e.g. "src-tauri/Entitlements.appstore.plist"), + * used instead of the Tauri config's bundle.macOS.entitlements (a project with a Developer ID channel keeps that one there); `--entitlements ` wins over it. */ - macos?: { listing?: string; reviewNotes?: string; gameCenter?: boolean; noIap?: boolean }; + macos?: { listing?: string; reviewNotes?: string; gameCenter?: boolean; noIap?: boolean; entitlements?: string }; /** "Header and Search Results" creative assets (`storebound apple creative-assets`, iOS / iPadOS 27+). Files under * //creative/: header.{png,jpg,mov,m4v,mp4} (3840x1646, 21:9), search.{...} (3:2, 1920x1280 to * 3840x2560) or universal.png (5244x2950) for both. `header` / `search` false skip that slot; `universal` is a @@ -1047,9 +1049,9 @@ export function validateExtras(cfg: Partial): string[] { if (cfg.play?.free !== undefined && typeof cfg.play.free !== 'boolean') e.push('play.free: true (free) | false (paid)'); const mo = cfg.apple?.macos; if (mo !== undefined) { - if (typeof mo !== 'object' || mo === null || Array.isArray(mo)) e.push('apple.macos: { listing?: "store/appstore-macos.md", reviewNotes?: "...", gameCenter?: true, noIap?: true }'); + if (typeof mo !== 'object' || mo === null || Array.isArray(mo)) e.push('apple.macos: { listing?: "store/appstore-macos.md", reviewNotes?: "...", gameCenter?: true, noIap?: true, entitlements?: "src-tauri/Entitlements.appstore.plist" }'); else { - for (const k of ['listing', 'reviewNotes'] as const) if (mo[k] !== undefined && (typeof mo[k] !== 'string' || !mo[k]!.trim())) e.push(`apple.macos.${k}: a non-empty string${k === 'listing' ? ' (path of the macOS App Store listing file)' : ''}`); + for (const k of ['listing', 'reviewNotes', 'entitlements'] as const) if (mo[k] !== undefined && (typeof mo[k] !== 'string' || !mo[k]!.trim())) e.push(`apple.macos.${k}: a non-empty string${k === 'listing' ? ' (path of the macOS App Store listing file)' : k === 'entitlements' ? ' (path of the Mac App Store entitlements plist)' : ''}`); for (const k of ['gameCenter', 'noIap'] as const) if (mo[k] !== undefined && typeof mo[k] !== 'boolean') e.push(`apple.macos.${k}: true | false`); } } diff --git a/cli/lib/mas.ts b/cli/lib/mas.ts index 96346f6..b080e57 100644 --- a/cli/lib/mas.ts +++ b/cli/lib/mas.ts @@ -18,20 +18,52 @@ export interface TauriProject { category?: string; minOs?: string; entitlements?: string; + /** The overlay file merged over the base config (tauri..conf.json), absolute; passed to `tauri build --config` too. */ + overlayPath?: string; + /** True when the overlay was found next to tauri.conf.json without being named (tauri.appstore.conf.json / tauri.mas.conf.json). */ + overlayAuto?: boolean; conf: Record; } +/** Overlay files that are picked up on their own for a Mac App Store build, in this order. */ +export const MAS_OVERLAY_NAMES = ['tauri.appstore.conf.json', 'tauri.mas.conf.json'] as const; + +/** JSON merge patch (RFC 7386, what Tauri's --config does): objects merge, null removes a key, anything else (arrays too) replaces. */ +export function mergePatch(base: unknown, patch: unknown): unknown { + if (patch === null || typeof patch !== 'object' || Array.isArray(patch)) return patch; + const out: Record = base !== null && typeof base === 'object' && !Array.isArray(base) ? { ...(base as Record) } : {}; + for (const [k, v] of Object.entries(patch as Record)) { + if (v === null) delete out[k]; + else out[k] = mergePatch(out[k], v); + } + return out; +} + +/** tauri..conf.json (an overlay), not tauri.conf.json itself. */ +export const isOverlayFile = (p: string): boolean => /(^|[\\/])tauri\.[^\\/]+\.conf\.json$/.test(p); + const SKIP = new Set(['node_modules', 'target', '.git', 'dist', 'build', '.storebound', 'Pods']); -/** The Tauri project: `hint` (a folder with tauri.conf.json, or the file itself) or the only tauri.conf.json found. */ +/** The Tauri project: `hint` (a folder with tauri.conf.json, or a tauri.conf.json / tauri.conf.json5 / tauri..conf.json + * file) or the only tauri.conf.json found. An overlay file (tauri..conf.json) is merged over the base + * tauri.conf.json of its folder; tauri.appstore.conf.json / tauri.mas.conf.json next to the base config is picked up on its own. */ export function findTauri(root: string, hint?: string): TauriProject { const names = ['tauri.conf.json', 'tauri.conf.json5']; - let confPath: string | undefined; + let confPath: string | undefined, overlayPath: string | undefined, overlayAuto = false; + const autoOverlay = (): void => { const o = MAS_OVERLAY_NAMES.map(n => join(dirname(confPath!), n)).find(existsSync); if (o) { overlayPath = o; overlayAuto = true; } }; if (hint && hint !== 'true') { const p = join(root, hint); - if (/tauri\.conf\.json5?$/.test(p) && existsSync(p)) confPath = p; - else confPath = names.map(n => join(p, n)).find(existsSync); - if (!confPath) throw new Error(`--tauri ${hint}: no tauri.conf.json in it`); + if (isOverlayFile(p)) { + if (!existsSync(p)) throw new Error(`--tauri ${hint}: no such file`); + overlayPath = p; + confPath = names.map(n => join(dirname(p), n)).find(existsSync); + if (!confPath) throw new Error(`--tauri ${hint}: no tauri.conf.json next to this overlay (the base config it is merged over)`); + } else { + if (/tauri\.conf\.json5?$/.test(p) && existsSync(p)) confPath = p; + else confPath = names.map(n => join(p, n)).find(existsSync); + if (!confPath) throw new Error(`--tauri ${hint}: no tauri.conf.json in it`); + autoOverlay(); + } } else { const hits: string[] = []; const walk = (dir: string, d: number): void => { @@ -43,16 +75,22 @@ export function findTauri(root: string, hint?: string): TauriProject { walk(root, 4); if (hits.length !== 1) throw new Error(hits.length ? `several Tauri projects (${hits.map(h => relative(root, h)).join(', ')}): pass --tauri ` : 'no tauri.conf.json found: pass --tauri '); confPath = hits[0]!; + autoOverlay(); } let conf: Record; try { conf = JSON.parse(readFileSync(confPath, 'utf8')); } catch (e) { throw new Error(`${confPath}: not valid JSON (${(e as Error).message}); tauri.conf.json5 / Tauri.toml are not read, use tauri.conf.json`); } + if (overlayPath) { + let patch: unknown; + try { patch = JSON.parse(readFileSync(overlayPath, 'utf8')); } catch (e) { throw new Error(`${overlayPath}: not valid JSON (${(e as Error).message})`); } + conf = mergePatch(conf, patch) as Record; + } const mac = conf.bundle?.macOS ?? {}; const productName = String(conf.productName ?? ''); if (!productName) throw new Error(`${confPath}: productName is missing`); const dir = dirname(confPath); return { dir, confPath, cwd: dirname(dir), productName, identifier: String(conf.identifier ?? ''), version: typeof conf.version === 'string' ? conf.version : undefined, category: typeof conf.bundle?.category === 'string' ? conf.bundle.category : undefined, minOs: typeof mac.minimumSystemVersion === 'string' ? mac.minimumSystemVersion : undefined, - entitlements: typeof mac.entitlements === 'string' ? join(dir, mac.entitlements) : undefined, conf }; + entitlements: typeof mac.entitlements === 'string' ? join(dir, mac.entitlements) : undefined, ...(overlayPath ? { overlayPath, overlayAuto } : {}), conf }; } /** Tauri's category names (and Apple's public.app-category.* ids) -> the LSApplicationCategoryType Tauri writes; null when unknown. */ @@ -79,6 +117,43 @@ export function masEntitlements(o: { teamId: string; bundleId: string; existing? }; } +/** Where the entitlements of a Mac App Store build come from, first hit wins: `--entitlements `, the config's + * `apple.macos.entitlements`, the merged Tauri config's `bundle.macOS.entitlements`. Paths are already absolute. Pure. */ +export function entitlementsSource(o: { flag?: string; config?: string; tauri?: string }): { file: string; source: string } | null { + if (o.flag) return { file: o.flag, source: '--entitlements' }; + if (o.config) return { file: o.config, source: 'apple.macos.entitlements' }; + if (o.tauri) return { file: o.tauri, source: 'tauri config bundle.macOS.entitlements' }; + return null; +} + +/** Entitlements that App Store Connect refuses in a Mac App Store build (a Developer ID / development leftover). */ +export const MAS_REFUSED_KEYS: Record = { + 'com.apple.security.get-task-allow': 'a development entitlement, App Store Connect refuses it', + 'com.apple.security.cs.disable-library-validation': 'a Developer ID hardened-runtime exception, App Store Connect refuses it', +}; + +/** Hardened-runtime exceptions and Developer ID habits that do not belong in a Mac App Store build. App Review may + * question them or the sandbox ignores them, but they are not an automatic upload refusal: a warning, not a stop. */ +export const MAS_SUSPECT_KEYS: Record = { + 'com.apple.security.cs.allow-jit': 'hardened-runtime exception for Developer ID builds; App Review asks why a sandboxed app needs it', + 'com.apple.security.cs.allow-unsigned-executable-memory': 'hardened-runtime exception for Developer ID builds; App Review asks why', + 'com.apple.security.cs.disable-executable-page-protection': 'hardened-runtime exception for Developer ID builds', + 'com.apple.security.cs.allow-dyld-environment-variables': 'hardened-runtime exception for Developer ID builds', + 'com.apple.security.cs.debugger': 'hardened-runtime exception for Developer ID builds (a debugger cannot be sandboxed)', + 'com.apple.security.automation.apple-events': 'needs NSAppleEventsUsageDescription in Info.plist and a reason in the review notes; usually a Developer ID leftover', +}; + +/** The entitlements of a Mac App Store build against the two lists above (a key set to false is fine). Pure. */ +export function masEntitlementProblems(ent: Record | null | undefined): { errors: string[]; warnings: string[] } { + const errors: string[] = [], warnings: string[] = []; + for (const [k, v] of Object.entries(ent ?? {})) { + if (v === false) continue; + if (MAS_REFUSED_KEYS[k]) errors.push(`${k} is set: ${MAS_REFUSED_KEYS[k]}`); + else if (MAS_SUSPECT_KEYS[k]) warnings.push(`${k} is set: ${MAS_SUSPECT_KEYS[k]}`); + } + return { errors, warnings }; +} + export const entitlementsXml = (e: Record): string => toXmlPlist(e); /** Keys of an entitlements plist (XML or what `codesign -d --entitlements :-` prints). */ @@ -170,7 +245,7 @@ export const leakNeedles = (home: string, user: string, root: string): string[] export interface AppFacts { info: Record; entitlements: Record | null; hasProfile: boolean; leaks: Leak[] } /** Problems (stop) and warnings of a built .app before it goes into a .pkg. Pure. */ -export function appProblems(f: AppFacts, o: { bundleId: string; version: string; build: string; signed: boolean; pathFree: boolean }): { errors: string[]; warnings: string[] } { +export function appProblems(f: AppFacts, o: { bundleId: string; version: string; build: string; signed: boolean; pathFree: boolean; allowEntitlements?: boolean }): { errors: string[]; warnings: string[] } { const errors: string[] = [], warnings: string[] = []; const s = (k: string): string | undefined => (typeof f.info[k] === 'string' ? f.info[k] as string : undefined); if (s('CFBundleIdentifier') !== o.bundleId) errors.push(`CFBundleIdentifier is ${s('CFBundleIdentifier') ?? 'missing'}, not ${o.bundleId}`); @@ -184,7 +259,9 @@ export function appProblems(f: AppFacts, o: { bundleId: string; version: string; else { for (const k of MAS_REQUIRED) if (f.entitlements[k] === undefined) errors.push(`entitlement ${k} is missing`); if (f.entitlements['com.apple.security.app-sandbox'] !== true) errors.push('com.apple.security.app-sandbox is not true'); - if (f.entitlements['com.apple.security.get-task-allow'] === true) errors.push('com.apple.security.get-task-allow is true: a development entitlement, App Store Connect refuses it'); + const ep = masEntitlementProblems(f.entitlements); + (o.allowEntitlements ? warnings : errors).push(...ep.errors); + warnings.push(...ep.warnings); } if (!f.hasProfile) errors.push('Contents/embedded.provisionprofile is missing: a Mac App Store app needs its provisioning profile inside (Tauri bundle.macOS.files)'); } @@ -230,7 +307,7 @@ export interface MasPlanInput { export function masSteps(i: MasPlanInput): { tauri: string[]; productbuild: string[]; codesignVerify: string[]; pkgCheck: string[] } { const appPath = join(i.tauri.dir, 'target', i.target, 'release', 'bundle', 'macos', `${i.tauri.productName}.app`); return { - tauri: [...i.tauriCmd, 'build', '--bundles', 'app', '--target', i.target, '--config', i.configFile], + tauri: [...i.tauriCmd, 'build', '--bundles', 'app', '--target', i.target, ...(i.tauri.overlayPath ? ['--config', i.tauri.overlayPath] : []), '--config', i.configFile], codesignVerify: ['codesign', '--verify', '--deep', '--strict', '--verbose=2', appPath], productbuild: ['productbuild', '--component', appPath, '/Applications', ...(i.unsigned || !i.installerIdentity ? [] : ['--sign', i.installerIdentity]), i.pkg], pkgCheck: ['pkgutil', '--check-signature', i.pkg], diff --git a/skills/build-and-sign/SKILL.md b/skills/build-and-sign/SKILL.md index 844e24a..b8f6d47 100644 --- a/skills/build-and-sign/SKILL.md +++ b/skills/build-and-sign/SKILL.md @@ -112,6 +112,13 @@ when the owner said so for this run). The MCP server offers only `apple_signing_ the generated entitlements (app sandbox, application / team identifier, your own keys kept), the embedded profile, hardened runtime and `bundleVersion`. Set `bundle.category` and `bundle.macOS.minimumSystemVersion` in tauri.conf.json (the build stops without LSApplicationCategoryType / LSMinimumSystemVersion). + A project with a Developer ID and a Mac App Store channel keeps two plists: `--tauri` takes the folder or a + `tauri..conf.json` overlay (merged over tauri.conf.json like Tauri's `--config`, and passed to `tauri build` + too; `tauri.appstore.conf.json` / `tauri.mas.conf.json` next to tauri.conf.json is picked up on its own). The + entitlements plist comes from `--entitlements `, else `apple.macos.entitlements`, else the merged + `bundle.macOS.entitlements`; the plan shows the source and the final keys. `get-task-allow` and + `cs.disable-library-validation` stop the build (App Store Connect refuses them); other hardened-runtime exceptions + (`cs.allow-jit`, `cs.allow-unsigned-executable-memory`, `automation.apple-events`...) warn. `--allow-entitlements` builds anyway. 5. Checks of the .app (sandbox, no get-task-allow, profile inside, version / build), `codesign --verify`, then `productbuild --component /Applications --sign ` and `pkgutil --check-signature`. 6. `--path-free`: rustc remaps the checkout, CARGO_HOME, RUSTUP_HOME and the home folder, no debug info, symbols stripped; diff --git a/tests/mas-entitlements.test.ts b/tests/mas-entitlements.test.ts new file mode 100644 index 0000000..4e62c5d --- /dev/null +++ b/tests/mas-entitlements.test.ts @@ -0,0 +1,182 @@ +// Mac App Store entitlements of a Tauri build (cli/lib/mas.ts, cli/apple/build-mas.ts): the overlay config +// (tauri..conf.json) merged over tauri.conf.json, the source order of the entitlements plist, and the check of +// Developer ID / development keys that do not belong in a Mac App Store build. +import { afterAll, describe, expect, test } from 'bun:test'; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { run as buildMas } from '../cli/apple/build-mas'; +import type { ShipConfig } from '../cli/lib/config'; +import { appProblems, entitlementsSource, entitlementsXml, findTauri, masEntitlementProblems, masSteps, mergePatch, tauriOverlay } from '../cli/lib/mas'; +import { BASE, capture, project } from './helpers/store-mock'; + +const tmp = mkdtempSync(join(tmpdir(), 'sb-masent-')); +afterAll(() => rmSync(tmp, { recursive: true, force: true })); + +const BASE_CONF = { productName: 'Demo App', identifier: 'com.example.notes', version: '1.2.3', bundle: { category: 'Utility', macOS: { entitlements: 'Entitlements.plist', minimumSystemVersion: '12.0' } } }; +const OVERLAY = { bundle: { macOS: { entitlements: 'Entitlements.appstore.plist' } } }; +const DEVID = { 'com.apple.security.cs.disable-library-validation': true, 'com.apple.security.cs.allow-jit': true, 'com.apple.security.network.client': true }; +const APPSTORE = { 'com.apple.security.files.user-selected.read-only': true, 'com.apple.security.network.client': true }; + +function fixture(files: Record = {}): { root: string; dir: string } { + const root = mkdtempSync(join(tmp, 'p-')); + const dir = join(root, 'src-tauri'); + mkdirSync(dir, { recursive: true }); + writeFileSync(join(dir, 'tauri.conf.json'), JSON.stringify(BASE_CONF)); + for (const [n, v] of Object.entries(files)) writeFileSync(join(dir, n), typeof v === 'string' ? v : JSON.stringify(v)); + return { root, dir }; +} + +describe('merge patch', () => { + test('objects merge, null removes, arrays and scalars replace', () => { + expect(mergePatch({ a: { b: 1, c: 2 }, d: [1, 2], e: 1 }, { a: { b: 9 }, d: [3], e: null })).toEqual({ a: { b: 9, c: 2 }, d: [3] }); + expect(mergePatch({ a: 1 }, { a: { x: 1 } })).toEqual({ a: { x: 1 } }); + expect(mergePatch('x', 5)).toBe(5); + }); +}); + +describe('overlay config', () => { + test('an overlay file path is merged over the base config in its folder', () => { + const { root, dir } = fixture({ 'tauri.appstore.conf.json': OVERLAY }); + const t = findTauri(root, 'src-tauri/tauri.appstore.conf.json'); + expect(t.overlayPath).toBe(join(dir, 'tauri.appstore.conf.json')); + expect(t.overlayAuto).toBe(false); + expect(t.entitlements).toBe(join(dir, 'Entitlements.appstore.plist')); + expect(t.productName).toBe('Demo App'); + expect(t.minOs).toBe('12.0'); + }); + test('a folder picks up tauri.appstore.conf.json, then tauri.mas.conf.json, on its own; a scan does too', () => { + const a = fixture({ 'tauri.appstore.conf.json': OVERLAY }); + expect(findTauri(a.root, 'src-tauri')).toMatchObject({ overlayPath: join(a.dir, 'tauri.appstore.conf.json'), overlayAuto: true }); + expect(findTauri(a.root).overlayAuto).toBe(true); + const m = fixture({ 'tauri.mas.conf.json': OVERLAY }); + expect(findTauri(m.root, 'src-tauri').overlayPath).toBe(join(m.dir, 'tauri.mas.conf.json')); + const both = fixture({ 'tauri.appstore.conf.json': OVERLAY, 'tauri.mas.conf.json': { bundle: { macOS: { entitlements: 'other.plist' } } } }); + expect(findTauri(both.root, 'src-tauri').entitlements).toBe(join(both.dir, 'Entitlements.appstore.plist')); + }); + test('naming the base file directly still auto-detects; no overlay means none', () => { + const { root, dir } = fixture({ 'tauri.appstore.conf.json': OVERLAY }); + expect(findTauri(root, 'src-tauri/tauri.conf.json').entitlements).toBe(join(dir, 'Entitlements.appstore.plist')); + const plain = fixture(); + const t = findTauri(plain.root, 'src-tauri'); + expect(t.overlayPath).toBeUndefined(); + expect(t.entitlements).toBe(join(plain.dir, 'Entitlements.plist')); + }); + test('an overlay without a base config, a missing file, bad JSON', () => { + const root = mkdtempSync(join(tmp, 'o-')); + mkdirSync(join(root, 'x'), { recursive: true }); + writeFileSync(join(root, 'x/tauri.appstore.conf.json'), '{}'); + expect(() => findTauri(root, 'x/tauri.appstore.conf.json')).toThrow('no tauri.conf.json next to this overlay'); + const { root: r2 } = fixture(); + expect(() => findTauri(r2, 'src-tauri/tauri.nope.conf.json')).toThrow('no such file'); + const bad = fixture({ 'tauri.appstore.conf.json': '{ nope' }); + expect(() => findTauri(bad.root, 'src-tauri')).toThrow('not valid JSON'); + }); + test('tauri build gets the overlay first and storebound\'s own overlay last', () => { + const { root, dir } = fixture({ 'tauri.appstore.conf.json': OVERLAY }); + const tauri = findTauri(root, 'src-tauri'); + const input = { tauri, tauriCmd: ['tauri'], target: 'universal-apple-darwin', out: join(root, 'out'), configFile: join(root, 'out/tauri.mas.conf.json'), entitlementsFile: 'e', profile: null, + appIdentity: null, installerIdentity: null, version: '1.0.0', build: '1', unsigned: true, pathFree: false, pkg: 'x.pkg' }; + const argv = masSteps(input).tauri; + const cfgs = argv.flatMap((x, i) => (x === '--config' ? [argv[i + 1]] : [])); + expect(cfgs).toEqual([join(dir, 'tauri.appstore.conf.json'), input.configFile]); + const plain = masSteps({ ...input, tauri: findTauri(fixture().root, 'src-tauri') }).tauri; + expect(plain.filter(x => x === '--config').length).toBe(1); + expect(tauriOverlay({ appIdentity: 'id', entitlementsFile: 'e', profile: null, version: '1', build: '1', unsigned: false })).toBeTruthy(); + }); +}); + +describe('entitlements source order', () => { + test('flag, then config, then the Tauri config', () => { + expect(entitlementsSource({ flag: '/f', config: '/c', tauri: '/t' })).toEqual({ file: '/f', source: '--entitlements' }); + expect(entitlementsSource({ config: '/c', tauri: '/t' })).toEqual({ file: '/c', source: 'apple.macos.entitlements' }); + expect(entitlementsSource({ tauri: '/t' })).toEqual({ file: '/t', source: 'tauri config bundle.macOS.entitlements' }); + expect(entitlementsSource({})).toBeNull(); + }); +}); + +describe('entitlement key check', () => { + test('refused keys are errors, hardened-runtime exceptions warnings, false values and fine keys pass', () => { + const r = masEntitlementProblems({ + ...DEVID, 'com.apple.security.get-task-allow': true, 'com.apple.security.cs.allow-unsigned-executable-memory': true, + 'com.apple.security.cs.disable-executable-page-protection': true, 'com.apple.security.cs.allow-dyld-environment-variables': true, + 'com.apple.security.automation.apple-events': true, 'com.apple.security.cs.debugger': false, 'com.apple.security.files.user-selected.read-only': true, + }); + expect(r.errors.map(e => e.split(' ')[0])).toEqual(['com.apple.security.cs.disable-library-validation', 'com.apple.security.get-task-allow']); + expect(r.warnings.map(e => e.split(' ')[0]).sort()).toEqual([ + 'com.apple.security.automation.apple-events', 'com.apple.security.cs.allow-dyld-environment-variables', 'com.apple.security.cs.allow-jit', + 'com.apple.security.cs.allow-unsigned-executable-memory', 'com.apple.security.cs.disable-executable-page-protection', + ]); + expect(masEntitlementProblems(APPSTORE)).toEqual({ errors: [], warnings: [] }); + expect(masEntitlementProblems(null)).toEqual({ errors: [], warnings: [] }); + }); + test('the built app is checked too; --allow-entitlements turns the errors into warnings', () => { + const facts = { + info: { CFBundleIdentifier: 'com.example.notes', CFBundleShortVersionString: '1.0.0', CFBundleVersion: '5', LSApplicationCategoryType: 'public.app-category.utilities', LSMinimumSystemVersion: '12.0', ITSAppUsesNonExemptEncryption: false }, + entitlements: { 'com.apple.security.app-sandbox': true, 'com.apple.application-identifier': 'T.com.example.notes', 'com.apple.developer.team-identifier': 'T', ...DEVID }, + hasProfile: true, leaks: [], + }; + const o = { bundleId: 'com.example.notes', version: '1.0.0', build: '5', signed: true, pathFree: false }; + const r = appProblems(facts, o); + expect(r.errors.join()).toContain('disable-library-validation'); + expect(r.warnings.join()).toContain('allow-jit'); + const allowed = appProblems(facts, { ...o, allowEntitlements: true }); + expect(allowed.errors).toEqual([]); + expect(allowed.warnings.join()).toContain('disable-library-validation'); + }); +}); + +// the whole command, as a dry run (no store, no Mac) +describe('apple build --platform macos --dry', () => { + const CONFIG: ShipConfig = { ...BASE }; + const files = (extra: Record = {}): Record => ({ + 'src-tauri/tauri.conf.json': JSON.stringify(BASE_CONF), + 'src-tauri/tauri.appstore.conf.json': JSON.stringify(OVERLAY), + 'src-tauri/Entitlements.plist': entitlementsXml(DEVID), + 'src-tauri/Entitlements.appstore.plist': entitlementsXml(APPSTORE), + ...extra, + }); + const dry = async (cfg: ShipConfig, f: Record, argv: string[]): Promise<{ plan: any; err: string }> => { + const p = project(cfg, f); + const r = await capture(() => buildMas(p.ctx(['--tauri', 'src-tauri', '--unsigned', '--build-number', '7', '--dry', '--json', ...argv]), 'linux')); + return { plan: JSON.parse(r.out.slice(r.out.indexOf('{'))), err: r.err }; + }; + test('the App Store overlay is found and its plist used, not the Developer ID one', async () => { + const { plan } = await dry(CONFIG, files(), []); + expect(String(plan.tauriOverlayFile).replaceAll("\\", "/")).toBe('src-tauri/tauri.appstore.conf.json'); + expect({ ...plan.entitlementsSource, file: plan.entitlementsSource.file.replaceAll("\\", "/") }).toEqual({ source: 'tauri config bundle.macOS.entitlements', file: 'src-tauri/Entitlements.appstore.plist' }); + expect(plan.entitlements).toContain('com.apple.security.files.user-selected.read-only'); + expect(plan.entitlements).not.toContain('com.apple.security.cs.disable-library-validation'); + expect(plan.entitlementProblems).toEqual({ errors: [], warnings: [] }); + expect(plan.steps[0]).toContain('tauri.appstore.conf.json'); + }); + test('the Developer ID plist is reported (error under a real build, a warning here)', async () => { + const f = files(); delete (f as Record)['src-tauri/tauri.appstore.conf.json']; + const { plan, err } = await dry(CONFIG, f, []); + expect(plan.entitlementsSource.file.replaceAll("\\", "/")).toBe('src-tauri/Entitlements.plist'); + expect(plan.entitlementProblems.errors.join()).toContain('disable-library-validation'); + expect(plan.entitlementProblems.warnings.join()).toContain('allow-jit'); + expect(err).toBe(''); // --json prints only the plan + const pj = project(CONFIG, f); + const text = await capture(() => buildMas(pj.ctx(['--tauri', 'src-tauri', '--unsigned', '--build-number', '7', '--dry']), 'linux')); + expect(text.err).toContain('disable-library-validation'); + expect(text.err).toContain('--allow-entitlements'); + expect(text.out).toContain('entitlements from tauri config'); + }); + test('--entitlements beats apple.macos.entitlements beats the Tauri config', async () => { + const f = files({ 'a.plist': entitlementsXml({ 'com.apple.security.files.downloads.read-only': true }), 'b.plist': entitlementsXml({ 'com.apple.security.files.user-selected.read-write': true }) }); + delete (f as Record)['src-tauri/tauri.appstore.conf.json']; + const cfg: ShipConfig = { ...CONFIG, apple: { ...CONFIG.apple!, macos: { entitlements: 'a.plist' } } }; + const viaConfig = await dry(cfg, f, []); + expect(viaConfig.plan.entitlementsSource).toEqual({ source: 'apple.macos.entitlements', file: 'a.plist' }); + expect(viaConfig.plan.entitlements).toContain('com.apple.security.files.downloads.read-only'); + const viaFlag = await dry(cfg, f, ['--entitlements', 'b.plist']); + expect(viaFlag.plan.entitlementsSource).toEqual({ source: '--entitlements', file: 'b.plist' }); + expect(viaFlag.plan.entitlements).toContain('com.apple.security.files.user-selected.read-write'); + expect(viaFlag.plan.entitlements).not.toContain('com.apple.security.files.downloads.read-only'); + }); + test('a named plist that does not exist stops the run', async () => { + const p = project(CONFIG, files()); + await expect(buildMas(p.ctx(['--tauri', 'src-tauri', '--unsigned', '--build-number', '7', '--dry', '--entitlements', 'nope.plist']), 'linux')).rejects.toThrow('does not exist'); + }); +}); From f1a9229cf9bc92bc5ee3ca95fb5825141179fe4a Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:40:51 +0700 Subject: [PATCH 38/73] changelog: macOS entitlements, MCP review-details platform --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b444832..d5370a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - `apple.macos: { listing, reviewNotes, gameCenter, noIap }`: an app with iOS and macOS versions gets its own Mac listing file and review notes (`apple listing --platform macos`, `apple review-details --platform macos`, new there); `validate` warns about iOS-only claims in a macOS version's texts (Game Center, tap / swipe, iPhone / iPad, in-app purchases with `noIap`). - `apple upload `: reading the package is bounded (pkgutil signature check 90 s, expand 5 min, then the `apple build` .json) and logged; the processing wait finds macOS builds (it looked only at iOS and sat silently until --timeout); every slow read prints a heartbeat; an SSH / non-GUI session is warned about up front. +- `apple build --platform macos`: `--tauri` takes a `tauri..conf.json` overlay (merged over tauri.conf.json and passed to `tauri build --config`; `tauri.appstore.conf.json` / `tauri.mas.conf.json` next to it are used by themselves); the Mac App Store entitlements come from `--entitlements`, `apple.macos.entitlements` or the merged config (a two-channel project signed the App Store app with its Developer ID plist); the plan lists the final keys, `get-task-allow` / `cs.disable-library-validation` stop the build (`--allow-entitlements`), other hardened-runtime exceptions warn. +- MCP `apple_review_details` takes `platform`. - `apple release`: a 409 on a release type change is recognized again (a stray control character had broken the pattern). ## 0.8.65 · 2026-11-03 From 700fcc4d66ebbbd8910d0dee5bd3957321ee8f11 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 3 Nov 2026 23:43:46 +0700 Subject: [PATCH 39/73] storebound 0.8.66: version in package.json and every copy, CHANGELOG 0.8.66 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 9376b20..4f26e9f 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.65", + "version": "0.8.66", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5450ba0..d39b3e1 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.65", + "version": "0.8.66", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 9286507..590594e 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.65", + "version": "0.8.66", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index d5370a1..58e67bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.66 · 2026-11-03 + - `apple.macos: { listing, reviewNotes, gameCenter, noIap }`: an app with iOS and macOS versions gets its own Mac listing file and review notes (`apple listing --platform macos`, `apple review-details --platform macos`, new there); `validate` warns about iOS-only claims in a macOS version's texts (Game Center, tap / swipe, iPhone / iPad, in-app purchases with `noIap`). - `apple upload `: reading the package is bounded (pkgutil signature check 90 s, expand 5 min, then the `apple build` .json) and logged; the processing wait finds macOS builds (it looked only at iOS and sat silently until --timeout); every slow read prints a heartbeat; an SSH / non-GUI session is warned about up front. - `apple build --platform macos`: `--tauri` takes a `tauri..conf.json` overlay (merged over tauri.conf.json and passed to `tauri build --config`; `tauri.appstore.conf.json` / `tauri.mas.conf.json` next to it are used by themselves); the Mac App Store entitlements come from `--entitlements`, `apple.macos.entitlements` or the merged config (a two-channel project signed the App Store app with its Developer ID plist); the plan lists the final keys, `get-task-allow` / `cs.disable-library-validation` stop the build (`--allow-entitlements`), other hardened-runtime exceptions warn. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index de640b0..99ef72b 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.65", + "version": "0.8.66", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 7b457f8..91828d7 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.65" +version = "0.8.66" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 98aac6b..6a96d05 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.65" +version = "0.8.66" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 1e9d510..8198625 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.65", + "version": "0.8.66", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 86875f3..71908e6 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.65", + "version": "0.8.66", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index e9cabea..5b460ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.65", + "version": "0.8.66", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 64cb16e337097b9db3a81fc207c0b47554eecbdf Mon Sep 17 00:00:00 2001 From: CRT Date: Wed, 4 Nov 2026 00:17:04 +0700 Subject: [PATCH 40/73] apple build --platform macos: apple.macos.prebuild, not the iOS project's build.prebuild --- CHANGELOG.md | 2 ++ cli/apple/build-mas.ts | 9 ++++++--- cli/lib/config.ts | 8 +++++--- tests/mas-entitlements.test.ts | 9 +++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e67bb..2559431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- `apple build --platform macos`: runs `apple.macos.prebuild` (new) before `tauri build`, no longer `build.prebuild` / `apple.prebuild`, which belong to the iOS project (a Capacitor sync or OTA gate ran for a Tauri Mac build); the dry run names the skipped one. + ## 0.8.66 · 2026-11-03 - `apple.macos: { listing, reviewNotes, gameCenter, noIap }`: an app with iOS and macOS versions gets its own Mac listing file and review notes (`apple listing --platform macos`, `apple review-details --platform macos`, new there); `validate` warns about iOS-only claims in a macOS version's texts (Game Center, tap / swipe, iPhone / iPad, in-app purchases with `noIap`). diff --git a/cli/apple/build-mas.ts b/cli/apple/build-mas.ts index 85de5d6..6c16e59 100644 --- a/cli/apple/build-mas.ts +++ b/cli/apple/build-mas.ts @@ -162,9 +162,12 @@ export async function run(ctx: Ctx, platform: string = process.platform): Promis const overlay = tauriOverlay({ appIdentity, entitlementsFile: entFile, profile, version, build: buildNo, unsigned, minOs: tauri.minOs, category }); const input = { tauri, tauriCmd, target, out, configFile, entitlementsFile: entFile, profile, appIdentity, installerIdentity: installerIdentity ?? '', version, build: buildNo, unsigned, pathFree, pkg }; const steps = masSteps(input); - // the same hooks as apple build: build.prebuild / apple.prebuild first (a project computes its build-time env there), - // apple.macAppCheck on the built .app before productbuild (e.g. a project's own check that a value was stamped in) - const prebuild = prebuildFor(config, 'apple') ?? null; + // apple.macos.prebuild first (a project computes its build-time env there), apple.macAppCheck on the built .app before + // productbuild (e.g. a project's own check that a value was stamped in). build.prebuild / apple.prebuild belong to the + // iOS / Android project (a Capacitor sync, an OTA gate) and are not run for a Tauri Mac build + const prebuild = config.apple?.macos?.prebuild?.trim() || null; + const mobilePrebuild = prebuildFor(config, 'apple'); + if (!prebuild && mobilePrebuild && !json) log(TAG, `not run for the Mac build: ${mobilePrebuild} (build.prebuild / apple.prebuild are for the iOS project; set apple.macos.prebuild for the Mac)`); const prebuildSkip = !prebuild ? undefined : a.has('no-prebuild') ? '--no-prebuild' : prebuildsDone().has(prebuild) ? 'already ran in this flow run' : undefined; const appCheck = config.apple?.macAppCheck?.trim() || null; // entitlements: --entitlements, apple.macos.entitlements, the merged Tauri config (the first one that is set) diff --git a/cli/lib/config.ts b/cli/lib/config.ts index 01da2ed..cd3acd1 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -716,8 +716,10 @@ export interface ShipConfig { * `noIap: true`: the Mac app sells nothing (validate then flags in-app purchase lines in the Mac texts). * `entitlements`: the Mac App Store entitlements plist of `apple build --platform macos --tauri` (e.g. "src-tauri/Entitlements.appstore.plist"), * used instead of the Tauri config's bundle.macOS.entitlements (a project with a Developer ID channel keeps that one there); `--entitlements ` wins over it. + * `prebuild`: shell command `apple build --platform macos` runs first in the project root (build.prebuild / + * apple.prebuild are the iOS project's and are not run for the Mac build); `--no-prebuild` skips it. */ - macos?: { listing?: string; reviewNotes?: string; gameCenter?: boolean; noIap?: boolean; entitlements?: string }; + macos?: { listing?: string; reviewNotes?: string; gameCenter?: boolean; noIap?: boolean; entitlements?: string; prebuild?: string }; /** "Header and Search Results" creative assets (`storebound apple creative-assets`, iOS / iPadOS 27+). Files under * //creative/: header.{png,jpg,mov,m4v,mp4} (3840x1646, 21:9), search.{...} (3:2, 1920x1280 to * 3840x2560) or universal.png (5244x2950) for both. `header` / `search` false skip that slot; `universal` is a @@ -1049,9 +1051,9 @@ export function validateExtras(cfg: Partial): string[] { if (cfg.play?.free !== undefined && typeof cfg.play.free !== 'boolean') e.push('play.free: true (free) | false (paid)'); const mo = cfg.apple?.macos; if (mo !== undefined) { - if (typeof mo !== 'object' || mo === null || Array.isArray(mo)) e.push('apple.macos: { listing?: "store/appstore-macos.md", reviewNotes?: "...", gameCenter?: true, noIap?: true, entitlements?: "src-tauri/Entitlements.appstore.plist" }'); + if (typeof mo !== 'object' || mo === null || Array.isArray(mo)) e.push('apple.macos: { listing?: "store/appstore-macos.md", reviewNotes?: "...", gameCenter?: true, noIap?: true, entitlements?: "src-tauri/Entitlements.appstore.plist", prebuild?: "" }'); else { - for (const k of ['listing', 'reviewNotes', 'entitlements'] as const) if (mo[k] !== undefined && (typeof mo[k] !== 'string' || !mo[k]!.trim())) e.push(`apple.macos.${k}: a non-empty string${k === 'listing' ? ' (path of the macOS App Store listing file)' : k === 'entitlements' ? ' (path of the Mac App Store entitlements plist)' : ''}`); + for (const k of ['listing', 'reviewNotes', 'entitlements', 'prebuild'] as const) if (mo[k] !== undefined && (typeof mo[k] !== 'string' || !mo[k]!.trim())) e.push(`apple.macos.${k}: a non-empty string${k === 'listing' ? ' (path of the macOS App Store listing file)' : k === 'entitlements' ? ' (path of the Mac App Store entitlements plist)' : ''}`); for (const k of ['gameCenter', 'noIap'] as const) if (mo[k] !== undefined && typeof mo[k] !== 'boolean') e.push(`apple.macos.${k}: true | false`); } } diff --git a/tests/mas-entitlements.test.ts b/tests/mas-entitlements.test.ts index 4e62c5d..3de48d6 100644 --- a/tests/mas-entitlements.test.ts +++ b/tests/mas-entitlements.test.ts @@ -175,6 +175,15 @@ describe('apple build --platform macos --dry', () => { expect(viaFlag.plan.entitlements).toContain('com.apple.security.files.user-selected.read-write'); expect(viaFlag.plan.entitlements).not.toContain('com.apple.security.files.downloads.read-only'); }); + test('only apple.macos.prebuild runs before the Mac build; the iOS project\'s build.prebuild is named, not run', async () => { + const mobile: ShipConfig = { ...CONFIG, build: { prebuild: 'npx cap sync' } }; + expect((await dry(mobile, files(), [])).plan.prebuild).toBeNull(); + const text = await capture(() => buildMas(project(mobile, files()).ctx(['--tauri', 'src-tauri', '--unsigned', '--build-number', '7', '--dry']), 'linux')); + expect(text.out).toContain('not run for the Mac build: npx cap sync'); + const mac: ShipConfig = { ...mobile, apple: { ...CONFIG.apple!, macos: { prebuild: 'bun run desktop:env' } } }; + expect((await dry(mac, files(), [])).plan.prebuild).toBe('bun run desktop:env'); + expect((await dry(mac, files(), ['--no-prebuild'])).plan.prebuildSkip).toBe('--no-prebuild'); + }); test('a named plist that does not exist stops the run', async () => { const p = project(CONFIG, files()); await expect(buildMas(p.ctx(['--tauri', 'src-tauri', '--unsigned', '--build-number', '7', '--dry', '--entitlements', 'nope.plist']), 'linux')).rejects.toThrow('does not exist'); From 31f863ed0614b919047729718c9742416ae6d466 Mon Sep 17 00:00:00 2001 From: CRT Date: Wed, 4 Nov 2026 00:20:45 +0700 Subject: [PATCH 41/73] storebound 0.8.67: version in package.json and every copy, CHANGELOG 0.8.67 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 4f26e9f..d7c9e2f 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.66", + "version": "0.8.67", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index d39b3e1..f107b02 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.66", + "version": "0.8.67", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 590594e..c36badf 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.66", + "version": "0.8.67", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 2559431..70f4cf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.67 · 2026-11-03 + - `apple build --platform macos`: runs `apple.macos.prebuild` (new) before `tauri build`, no longer `build.prebuild` / `apple.prebuild`, which belong to the iOS project (a Capacitor sync or OTA gate ran for a Tauri Mac build); the dry run names the skipped one. ## 0.8.66 · 2026-11-03 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 99ef72b..cd3f783 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.66", + "version": "0.8.67", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 91828d7..b59f665 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.66" +version = "0.8.67" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 6a96d05..a0d6f88 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.66" +version = "0.8.67" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 8198625..4f84fdb 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.66", + "version": "0.8.67", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 71908e6..92aa54d 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.66", + "version": "0.8.67", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 5b460ab..f5d0387 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.66", + "version": "0.8.67", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 0950ef2c99a84900208361e6c093fb01586169eb Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 6 Nov 2026 21:01:19 +0700 Subject: [PATCH 42/73] desktop: the app's own CLI on the terminal PATH (launcher rewritten on every start; npm installs stay first) --- CHANGELOG.md | 2 ++ cli/lib/cli-shim.ts | 81 ++++++++++++++++++++++++++++++++++++++++++ cli/serve.ts | 3 ++ tests/cli-shim.test.ts | 47 ++++++++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 cli/lib/cli-shim.ts create mode 100644 tests/cli-shim.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 70f4cf1..38eb3e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- Desktop app: `storebound` works in a terminal with only the app installed. On every start the app puts a launcher for its own CLI on the PATH (Windows: `%LOCALAPPDATA%\storebound\bin`, added to the user PATH once; macOS / Linux: `~/.local/bin`, added to `~/.zprofile` / `~/.profile` when missing). An npm / bun install stays first, a file that is not the app's launcher is never overwritten, AppImage runs skip it, `STOREBOUND_NO_CLI_SHIM=1` turns it off. + ## 0.8.67 · 2026-11-03 - `apple build --platform macos`: runs `apple.macos.prebuild` (new) before `tauri build`, no longer `build.prebuild` / `apple.prebuild`, which belong to the iOS project (a Capacitor sync or OTA gate ran for a Tauri Mac build); the dry run names the skipped one. diff --git a/cli/lib/cli-shim.ts b/cli/lib/cli-shim.ts new file mode 100644 index 0000000..8ece9b1 --- /dev/null +++ b/cli/lib/cli-shim.ts @@ -0,0 +1,81 @@ +// The desktop app's own storebound on the terminal: the app ships the CLI as its sidecar, and on every start the sidecar +// puts a small launcher on the person's PATH, so `storebound` works in a terminal without an npm install. +// Windows %LOCALAPPDATA%\storebound\bin\storebound.cmd, that folder appended to the user PATH (once) +// macOS / Linux ~/.local/bin/storebound (a sh launcher), ~/.local/bin added to ~/.zprofile / ~/.profile when missing +// An npm / bun install stays first: the folder is appended, and a launcher is never written over a file that is not +// ours (the marker line). Rewritten on every start, so a moved or updated app fixes itself. Not from an AppImage (its +// mount path changes per run) or a dev run. STOREBOUND_NO_CLI_SHIM=1 turns it off. +import { existsSync, mkdirSync, readFileSync, writeFileSync, chmodSync, appendFileSync } from 'node:fs'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; +import * as rt from './rt'; + +export const SHIM_MARKER = 'storebound desktop launcher'; + +export interface ShimPlan { + /** Why nothing is written (null: write). */ + skip: string | null; + file: string; + content: string; + /** The folder to add to PATH when it is not on it (Windows: the user PATH; else a shell profile line). */ + pathDir: string; + /** macOS / Linux: the shell profile that gets the PATH line. */ + profile?: string; +} + +/** What to write for the sidecar at `exe`. Pure. */ +export function shimPlan(o: { exe: string; platform: string; home: string; env: Record }): ShimPlan { + const win = o.platform === 'win32'; + const local = o.env.LOCALAPPDATA ?? join(o.home, 'AppData', 'Local'); + const dir = win ? join(local, 'storebound', 'bin') : join(o.home, '.local', 'bin'); + const file = join(dir, win ? 'storebound.cmd' : 'storebound'); + const content = win + ? `@echo off\r\nrem ${SHIM_MARKER}\r\n"${o.exe}" %*\r\n` + : `#!/bin/sh\n# ${SHIM_MARKER}\nexec '${o.exe.replace(/'/g, `'\\''`)}' "$@"\n`; + const skip = o.env.STOREBOUND_NO_CLI_SHIM ? 'STOREBOUND_NO_CLI_SHIM is set' + : o.env.APPIMAGE || /^\/tmp\/\.mount_/.test(o.exe) ? 'an AppImage (its path changes per run)' + : null; + return { skip, file, content, pathDir: dir, ...(win ? {} : { profile: join(o.home, o.platform === 'darwin' ? '.zprofile' : '.profile') }) }; +} + +/** True when `dir` is one of the PATH entries (case-insensitive on Windows). Pure. */ +export function onPath(dir: string, path: string | undefined, platform: string): boolean { + const norm = (s: string) => { const t = s.replace(/[\\/]+$/, ''); return platform === 'win32' ? t.toLowerCase() : t; }; + return (path ?? '').split(platform === 'win32' ? ';' : ':').some(p => p && norm(p) === norm(dir)); +} + +/** Writes the launcher and the PATH entry; returns what it did, one line each. Never throws. */ +export function ensureCliShim(exe: string = process.execPath, platform: string = process.platform, env: Record = process.env, home: string = homedir()): string[] { + const done: string[] = []; + try { + const p = shimPlan({ exe, platform, home, env }); + if (p.skip) return [`terminal launcher skipped: ${p.skip}`]; + if (existsSync(p.file)) { + const cur = readFileSync(p.file, 'utf8'); + if (!cur.includes(SHIM_MARKER)) return [`terminal launcher not written: ${p.file} exists and is not ours`]; + if (cur === p.content) done.push(`terminal launcher up to date: ${p.file}`); + } + if (!done.length) { + mkdirSync(p.pathDir, { recursive: true }); + writeFileSync(p.file, p.content); + if (platform !== 'win32') chmodSync(p.file, 0o755); + done.push(`terminal launcher written: ${p.file}`); + } + if (platform === 'win32') { + // the user PATH from the registry (not this process's, which a running app inherited before the change) + const q = rt.spawnSync(['reg', 'query', 'HKCU\\Environment', '/v', 'Path'], { stdout: 'pipe', stderr: 'pipe', timeout: 10_000 }); + const userPath = /Path\s+REG_(?:EXPAND_)?SZ\s+(.*)/i.exec(new TextDecoder().decode(q.stdout ?? new Uint8Array()))?.[1]?.trim() ?? ''; + if (!onPath(p.pathDir, userPath, platform)) { + // SetEnvironmentVariable keeps REG_EXPAND_SZ entries as typed and tells open Explorer windows (new terminals see it) + const ps = `$p=[Environment]::GetEnvironmentVariable('Path','User'); if(-not $p){$p=''}; if(($p -split ';') -notcontains '${p.pathDir}'){ [Environment]::SetEnvironmentVariable('Path', ($p.TrimEnd(';') + ';${p.pathDir}').TrimStart(';'), 'User') }`; + const r = rt.spawnSync(['powershell', '-NoProfile', '-NonInteractive', '-Command', ps], { stdout: 'pipe', stderr: 'pipe', timeout: 30_000 }); + done.push(r.success ? `added to the user PATH: ${p.pathDir} (new terminals)` : `user PATH not changed (exit ${r.exitCode})`); + } + } else if (!onPath(p.pathDir, env.PATH, platform) && p.profile) { + const line = `export PATH="$PATH:$HOME/.local/bin" # ${SHIM_MARKER}`; + const cur = existsSync(p.profile) ? readFileSync(p.profile, 'utf8') : ''; + if (!cur.includes(SHIM_MARKER)) { appendFileSync(p.profile, `${cur && !cur.endsWith('\n') ? '\n' : ''}${line}\n`); done.push(`added ~/.local/bin to PATH in ${p.profile} (new terminals)`); } + } + } catch (e) { done.push(`terminal launcher failed: ${(e as Error).message.split('\n')[0]}`); } + return done; +} diff --git a/cli/serve.ts b/cli/serve.ts index f5f08c0..6407728 100644 --- a/cli/serve.ts +++ b/cli/serve.ts @@ -28,6 +28,7 @@ import { androidSdk, detectTools } from './lib/tools'; import { compiled, pickCallEnv, runCommand, type RunOptions, type Running } from './lib/runner'; import { inputSchema, notSentProp, type ToolDef, TOOLS, toArgv, validateInput } from './mcp-tools'; import * as rt from './lib/rt'; +import { ensureCliShim } from './lib/cli-shim'; type Id = string | number; interface Msg { jsonrpc?: string; id?: Id | null; method?: string; params?: unknown } @@ -613,6 +614,8 @@ export async function serveStdio(): Promise { const send: Send = o => { process.stdout.write(JSON.stringify(o) + '\n'); }; const session = new Session(send); console.error(`[storebound serve] ${pkg.version} on stdio (${DESKTOP_PROTOCOL}), waiting for session.hello`); + // the app's own CLI on the terminal PATH (lib/cli-shim.ts); only the bundled sidecar, after the handshake had its turn + if (compiled()) setTimeout(() => { for (const l of ensureCliShim()) console.error(`[storebound serve] ${l}`); }, 2000); let buf = ''; const decoder = new TextDecoder(); const reader = rt.stdinStream().getReader(); diff --git a/tests/cli-shim.test.ts b/tests/cli-shim.test.ts new file mode 100644 index 0000000..036e4c5 --- /dev/null +++ b/tests/cli-shim.test.ts @@ -0,0 +1,47 @@ +import { describe, expect, test } from 'bun:test'; +import { mkdtempSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { ensureCliShim, onPath, SHIM_MARKER, shimPlan } from '../cli/lib/cli-shim'; + +describe('desktop terminal launcher', () => { + test('per platform: file, content, PATH folder, profile', () => { + const w = shimPlan({ exe: 'C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe', platform: 'win32', home: 'C:\\Users\\a', env: { LOCALAPPDATA: 'C:\\Users\\a\\AppData\\Local' } }); + expect(w.file.endsWith('storebound.cmd')).toBe(true); + expect(w.content).toContain('"C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe" %*'); + expect(w.skip).toBeNull(); + const m = shimPlan({ exe: "/Applications/store'bound.app/Contents/MacOS/storebound", platform: 'darwin', home: '/Users/a', env: {} }); + expect(m.content).toContain(`exec '/Applications/store'\\''bound.app/Contents/MacOS/storebound' "$@"`); + expect(m.profile!.endsWith('.zprofile')).toBe(true); + expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/home/a', env: {} }).profile!.endsWith('.profile')).toBe(true); + }); + test('skips AppImage runs and the opt-out', () => { + expect(shimPlan({ exe: '/tmp/.mount_sbX/usr/bin/storebound', platform: 'linux', home: '/h', env: {} }).skip).toContain('AppImage'); + expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/h', env: { STOREBOUND_NO_CLI_SHIM: '1' } }).skip).toContain('STOREBOUND_NO_CLI_SHIM'); + }); + test('onPath: trailing slashes, case on Windows only', () => { + expect(onPath('C:\\A\\bin', 'c:\\a\\bin\\;D:\\x', 'win32')).toBe(true); + expect(onPath('/h/.local/bin', '/usr/bin:/h/.local/bin/', 'linux')).toBe(true); + expect(onPath('/h/.local/bin', '/usr/bin:/H/.local/bin', 'linux')).toBe(false); + }); + test('writes once, rewrites a moved app, never touches a file that is not ours, adds the profile line once', () => { + const home = mkdtempSync(join(tmpdir(), 'sb-shim-')); + const env = { PATH: '/usr/bin' }; + const first = ensureCliShim('/opt/a/storebound', 'linux', env, home); + expect(first.join('\n')).toContain('terminal launcher written'); + expect(first.join('\n')).toContain('added ~/.local/bin to PATH'); + const file = join(home, '.local', 'bin', 'storebound'); + expect(readFileSync(file, 'utf8')).toContain(SHIM_MARKER); + expect(ensureCliShim('/opt/a/storebound', 'linux', env, home).join()).toContain('up to date'); + expect(ensureCliShim('/opt/b/storebound', 'linux', env, home).join()).toContain('written'); + expect(readFileSync(file, 'utf8')).toContain('/opt/b/storebound'); + expect(readFileSync(join(home, '.profile'), 'utf8').split(SHIM_MARKER).length - 1).toBe(2 - 1); + writeFileSync(file, '#!/bin/sh\nexec npm-storebound "$@"\n'); + expect(ensureCliShim('/opt/c/storebound', 'linux', env, home).join()).toContain('is not ours'); + expect(readFileSync(file, 'utf8')).toContain('npm-storebound'); + if (process.platform === 'win32') return; // a C:\ temp folder has a colon: no POSIX PATH can name it + const home2 = mkdtempSync(join(tmpdir(), 'sb-shim-')); + mkdirSync(join(home2, '.local', 'bin'), { recursive: true }); + expect(ensureCliShim('/opt/a/storebound', 'linux', { PATH: `/usr/bin:${join(home2, '.local', 'bin')}` }, home2).join()).not.toContain('PATH'); + }); +}); From 36ef9c2c5c199ea152e79bb0866551627342bab5 Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 6 Nov 2026 21:04:14 +0700 Subject: [PATCH 43/73] tests: placeholder home folders in the launcher test (scrub) --- tests/cli-shim.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cli-shim.test.ts b/tests/cli-shim.test.ts index 036e4c5..c515923 100644 --- a/tests/cli-shim.test.ts +++ b/tests/cli-shim.test.ts @@ -6,14 +6,14 @@ import { ensureCliShim, onPath, SHIM_MARKER, shimPlan } from '../cli/lib/cli-shi describe('desktop terminal launcher', () => { test('per platform: file, content, PATH folder, profile', () => { - const w = shimPlan({ exe: 'C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe', platform: 'win32', home: 'C:\\Users\\a', env: { LOCALAPPDATA: 'C:\\Users\\a\\AppData\\Local' } }); + const w = shimPlan({ exe: 'C:\\Users\\you\\AppData\\Local\\storebound\\storebound.exe', platform: 'win32', home: 'C:\\Users\\you', env: { LOCALAPPDATA: 'C:\\Users\\you\\AppData\\Local' } }); expect(w.file.endsWith('storebound.cmd')).toBe(true); - expect(w.content).toContain('"C:\\Users\\a\\AppData\\Local\\storebound\\storebound.exe" %*'); + expect(w.content).toContain('"C:\\Users\\you\\AppData\\Local\\storebound\\storebound.exe" %*'); expect(w.skip).toBeNull(); - const m = shimPlan({ exe: "/Applications/store'bound.app/Contents/MacOS/storebound", platform: 'darwin', home: '/Users/a', env: {} }); + const m = shimPlan({ exe: "/Applications/store'bound.app/Contents/MacOS/storebound", platform: 'darwin', home: '/Users/you', env: {} }); expect(m.content).toContain(`exec '/Applications/store'\\''bound.app/Contents/MacOS/storebound' "$@"`); expect(m.profile!.endsWith('.zprofile')).toBe(true); - expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/home/a', env: {} }).profile!.endsWith('.profile')).toBe(true); + expect(shimPlan({ exe: '/usr/bin/storebound', platform: 'linux', home: '/home/you', env: {} }).profile!.endsWith('.profile')).toBe(true); }); test('skips AppImage runs and the opt-out', () => { expect(shimPlan({ exe: '/tmp/.mount_sbX/usr/bin/storebound', platform: 'linux', home: '/h', env: {} }).skip).toContain('AppImage'); From d05294ebcd94ccb0dd850c0198a3178551954196 Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 6 Nov 2026 21:07:22 +0700 Subject: [PATCH 44/73] apple submit/resubmit --platform macos: apple.macos.noIap leaves IAPs out, no Game Center switch without apple.macos.gameCenter; pitfalls #128 --- CHANGELOG.md | 1 + bun.lock | 830 +++++++++++++++++++++++++++++++++ cli/apple/resubmit.ts | 9 +- cli/lib/config.ts | 8 + skills/store-pitfalls/SKILL.md | 9 + tests/resubmit.test.ts | 20 + 6 files changed, 875 insertions(+), 2 deletions(-) create mode 100644 bun.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index 38eb3e2..978d68e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## Unreleased - Desktop app: `storebound` works in a terminal with only the app installed. On every start the app puts a launcher for its own CLI on the PATH (Windows: `%LOCALAPPDATA%\storebound\bin`, added to the user PATH once; macOS / Linux: `~/.local/bin`, added to `~/.zprofile` / `~/.profile` when missing). An npm / bun install stays first, a file that is not the app's launcher is never overwritten, AppImage runs skip it, `STOREBOUND_NO_CLI_SHIM=1` turns it off. +- `apple resubmit` / `apple submit --platform macos`: `apple.macos.noIap` leaves every in-app purchase out of the macOS submission and, without `apple.macos.gameCenter: true`, the Game Center switch is not touched (no `gameCenterAppVersions` call); the dry run names what it left out and why (pitfalls #128). ## 0.8.67 · 2026-11-03 diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..f43b978 --- /dev/null +++ b/bun.lock @@ -0,0 +1,830 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "storebound", + "devDependencies": { + "@mermaid-js/mermaid-cli": "12.0.0", + "@phosphor-icons/core": "2.1.1", + "@types/bun": "1.3.0", + "playwright": "1.55.0", + "playwright-core": "1.55.0", + "simple-icons": "16.34.0", + "typescript": "5.9.3", + }, + "peerDependencies": { + "playwright": ">=1.45", + }, + "optionalPeers": [ + "playwright", + ], + }, + "apps/desktop": { + "name": "@storebound/desktop", + "version": "0.8.67", + "dependencies": { + "@phosphor-icons/react": "^2.1.10", + "@tauri-apps/api": "^2.12.0", + "@visx/axis": "^4.0.0", + "@visx/curve": "^4.0.0", + "@visx/event": "^4.0.0", + "@visx/gradient": "^4.0.0", + "@visx/group": "^4.0.0", + "@visx/responsive": "^4.0.0", + "@visx/scale": "^4.0.0", + "@visx/shape": "^4.0.0", + "@visx/tooltip": "^4.0.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", + }, + "devDependencies": { + "@tauri-apps/cli": "^2.12.1", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "@vitejs/plugin-react": "^4.7.0", + "typescript": "5.9.3", + "vite": "^6.3.0", + }, + }, + }, + "packages": { + "@antfu/install-pkg": ["@antfu/install-pkg@2.1.0", "", { "dependencies": { "package-manager-detector": "^1.8.0", "tinyexec": "^1.3.1" } }, "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw=="], + + "@babel/code-frame": ["@babel/code-frame@7.29.7", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw=="], + + "@babel/compat-data": ["@babel/compat-data@7.29.7", "", {}, "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg=="], + + "@babel/core": ["@babel/core@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", "@babel/helper-compilation-targets": "^7.29.7", "@babel/helper-module-transforms": "^7.29.7", "@babel/helpers": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/template": "^7.29.7", "@babel/traverse": "^7.29.7", "@babel/types": "^7.29.7", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA=="], + + "@babel/generator": ["@babel/generator@7.29.8", "", { "dependencies": { "@babel/parser": "^7.29.8", "@babel/types": "^7.29.8", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.29.7", "", { "dependencies": { "@babel/compat-data": "^7.29.7", "@babel/helper-validator-option": "^7.29.7", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g=="], + + "@babel/helper-globals": ["@babel/helper-globals@7.29.7", "", {}, "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.29.7", "", { "dependencies": { "@babel/traverse": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.29.7", "", { "dependencies": { "@babel/helper-module-imports": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7", "@babel/traverse": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.29.7", "", {}, "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.11", "", {}, "sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.29.7", "", {}, "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw=="], + + "@babel/helpers": ["@babel/helpers@7.29.10", "", { "dependencies": { "@babel/template": "^7.29.7", "@babel/types": "^7.29.8" } }, "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg=="], + + "@babel/parser": ["@babel/parser@7.29.11", "", { "dependencies": { "@babel/types": "^7.29.11" }, "bin": "./bin/babel-parser.js" }, "sha512-OZ6+oaK7GMyg3IfCpj8JOmn8n+w2rJbDT0LLfVDTLb1ZFeKDh3AiNELgCMUw175IJHSkLl74hG0M0VLsvx+gag=="], + + "@babel/plugin-transform-react-jsx-self": ["@babel/plugin-transform-react-jsx-self@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw=="], + + "@babel/plugin-transform-react-jsx-source": ["@babel/plugin-transform-react-jsx-source@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q=="], + + "@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="], + + "@babel/traverse": ["@babel/traverse@7.29.10", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.8", "@babel/helper-globals": "^7.29.7", "@babel/parser": "^7.29.9", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "debug": "^4.3.1" } }, "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ=="], + + "@babel/types": ["@babel/types@7.29.11", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.11", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ=="], + + "@braintree/sanitize-url": ["@braintree/sanitize-url@7.1.2", "", {}, "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA=="], + + "@chevrotain/cst-dts-gen": ["@chevrotain/cst-dts-gen@13.2.0", "", { "dependencies": { "@chevrotain/gast": "13.2.0", "@chevrotain/types": "13.2.0" } }, "sha512-bA9dvWlhAUcHkNwU+8w9yiUxJPlj/Lm3VqS7MD+NbIR/7LmpNLuK/AWNFdCo/T3SK5ND0/UHf3IJvl/Jn/i6yg=="], + + "@chevrotain/gast": ["@chevrotain/gast@13.2.0", "", { "dependencies": { "@chevrotain/types": "13.2.0" } }, "sha512-bCARdAsG+eEbOveSXcOAC7pVxA04I1ionzeMOwIYf5NX7SaS7zgn4Dgug2BSqoL+iyKeMNSorQjsFSHJHsCNwg=="], + + "@chevrotain/regexp-to-ast": ["@chevrotain/regexp-to-ast@13.2.0", "", {}, "sha512-kxpUkLtiaK09ph+dib+Yvm+3sWSnuwlo25gqfKRgTPNmF6H7uW4gVkMjaRdtnN783S9sM6vUNWh9CsxYX4QwKw=="], + + "@chevrotain/types": ["@chevrotain/types@13.2.0", "", {}, "sha512-7qrYHRlKfWf2AvBfJi5eVOrKAkbxvMFsy/iIHTGIiApNcEecCaVIdR+mIQhyCBsTDJxBz4JWXHMo6krbhR9hVg=="], + + "@chevrotain/utils": ["@chevrotain/utils@13.2.0", "", {}, "sha512-SzKYY68rseOrb9KILVzPsl6SjkQtdWw01SRGB5aCVI5kFcHltQsOYV3JB0Ffst72DgkvHCyDQ0NLwxtmCCf97Q=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.25.12", "", { "os": "android", "cpu": "arm" }, "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.12", "", { "os": "android", "cpu": "arm64" }, "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.25.12", "", { "os": "android", "cpu": "x64" }, "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.12", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.12", "", { "os": "linux", "cpu": "arm" }, "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.12", "", { "os": "linux", "cpu": "ia32" }, "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.12", "", { "os": "linux", "cpu": "x64" }, "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.12", "", { "os": "none", "cpu": "arm64" }, "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.12", "", { "os": "none", "cpu": "x64" }, "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.12", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.12", "", { "os": "openbsd", "cpu": "x64" }, "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.25.12", "", { "os": "none", "cpu": "arm64" }, "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.12", "", { "os": "sunos", "cpu": "x64" }, "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.12", "", { "os": "win32", "cpu": "ia32" }, "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="], + + "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="], + + "@floating-ui/dom": ["@floating-ui/dom@1.8.0", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="], + + "@floating-ui/react": ["@floating-ui/react@0.27.20", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.9", "@floating-ui/utils": "^0.2.12", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=17.0.0", "react-dom": ">=17.0.0" } }, "sha512-CMqMy7OaXl9W0eq1Uy7L7i2Y/anPvHmFmESd2CEw0t5YvZhcVCeo4MBevAmswRllX7Y2dEidA4ozGPunLSTQpw=="], + + "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.9", "", { "dependencies": { "@floating-ui/dom": "^1.8.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg=="], + + "@floating-ui/utils": ["@floating-ui/utils@0.2.12", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="], + + "@fontsource-variable/recursive": ["@fontsource-variable/recursive@5.3.0", "", {}, "sha512-4B4/lWCVeZgdbpJdIIU1sOVO/ECjjM673ohuxvyQ6uCK41TPlGzKRNokKY84noUgGYnpwc//MW4k2KrOMY19jQ=="], + + "@fontsource/open-sans": ["@fontsource/open-sans@5.3.0", "", {}, "sha512-V1bdMlGNyZrJwzrdusshMOw2YR0aqYDL7kOo9dkxUEKl8dFv66A9HLckOOXl572sG/7ohhDQrCrTFGSn9LZcSw=="], + + "@fortawesome/fontawesome-free": ["@fortawesome/fontawesome-free@7.3.1", "", {}, "sha512-wmglKKPDIkgV3aWlZzWECCPoGIkYCulzBwxG9+w7rc5BGapZ6cPMpoPOT8k36J0Ni7PPX6c/rsoMWfS4d1MUMg=="], + + "@headlessui/react": ["@headlessui/react@2.2.10", "", { "dependencies": { "@floating-ui/react": "^0.26.16", "@react-aria/focus": "^3.20.2", "@react-aria/interactions": "^3.25.0", "@tanstack/react-virtual": "^3.13.9", "use-sync-external-store": "^1.5.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, "sha512-5pVLNK9wlpxTUTy9GpgbX/SdcRh+HBnPktjM2wbiLTH4p+2EPHBO1aoSryUCuKUIItdDWO9ITlhUL8UnUN/oIA=="], + + "@headlessui/tailwindcss": ["@headlessui/tailwindcss@0.2.2", "", { "peerDependencies": { "tailwindcss": "^3.0 || ^4.0" } }, "sha512-xNe42KjdyA4kfUKLLPGzME9zkH7Q3rOZ5huFihWNWOQFxnItxPB3/67yBI8/qBfY8nwBRx5GHn4VprsoluVMGw=="], + + "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], + + "@iconify/utils": ["@iconify/utils@3.1.7", "", { "dependencies": { "@antfu/install-pkg": "^2.0.1", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w=="], + + "@internationalized/date": ["@internationalized/date@3.12.4", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-M1dEn4c1U1HsSlaVR8upZtSqvXrTkHDfv18H01uCSJyjVLDxnBR38v/fMxecmlwXKR4i9HeZcmgQAPE6A+aGJQ=="], + + "@internationalized/number": ["@internationalized/number@3.6.9", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-GgWy2caO/+hV9sT/oCTWGHvbjmJMPT9kkXzoKRLnkEq7adghhR7UprhvY9sXrKfrp3NcDfhF6QQHXR1KfQbB8g=="], + + "@internationalized/string": ["@internationalized/string@3.2.10", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-PDx6//vHSpRnHfxqMqto11zQvhsaU74O3mKv2F/0eicGZcl9NLjQmGlbHz/LsJh5tLKp4A4L7ZVTzN1/MmMTvA=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], + + "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + + "@mermaid-js/layout-tidy-tree": ["@mermaid-js/layout-tidy-tree@1.0.1", "", { "dependencies": { "d3": "^7.9.0" }, "peerDependencies": { "mermaid": "^11.0.2 || ^12.0.0" } }, "sha512-suZgFgQQHYuAxiEiNVgPJwOoXi/keXV6DghCL3rT4K9DmX7xYQ2XZI2suiBVs/fj1gn/OoXIWB2DFSmeY7trvw=="], + + "@mermaid-js/mermaid-cli": ["@mermaid-js/mermaid-cli@12.0.0", "", { "dependencies": { "@fontsource-variable/recursive": "^5.3.0", "@fontsource/open-sans": "^5.3.0", "@fortawesome/fontawesome-free": "^7.0.1", "@mermaid-js/mermaid-zenuml": "^1.0.1", "chalk": "^6.0.0", "commander": "^15.0.0", "import-meta-resolve": "^4.1.0", "katex": "^0.16.25", "mermaid": "^12.0.0", "p-limit": "^7.0.0" }, "optionalDependencies": { "@mermaid-js/layout-tidy-tree": "^1.0.1" }, "peerDependencies": { "puppeteer": "^25.0.0" }, "bin": { "mmdc": "src/cli.js" } }, "sha512-AA18uaJtWVlM5PX7RGBxrVrqTTesmEaWCmfV+l5RkD6A1CnpUAtPpL+wWhkQAZrDSfyAw5FZyj084MsnDIPY3g=="], + + "@mermaid-js/mermaid-zenuml": ["@mermaid-js/mermaid-zenuml@1.0.1", "", { "dependencies": { "@zenuml/core": "^3.47.9" }, "peerDependencies": { "mermaid": "^10 || ^11 || ^12" } }, "sha512-O5DiRODoFVNgugOVloxcDXmd+bXe/sbGlDh3onnzuE4EWtgTWwaAlWuPPOXbU9QESsztnD4Gtnu7dr+tYLFE0A=="], + + "@mermaid-js/parser": ["@mermaid-js/parser@2.0.1", "", { "dependencies": { "@chevrotain/types": "~13.2.0" } }, "sha512-j37dj/h6p6pots1L7pLPPNuABEEu9WP4OYg9pW1g+nYG331j0+3canE9OagtYdytYvdSAMG+2fKU5cxep6LgjA=="], + + "@napi-rs/canvas": ["@napi-rs/canvas@0.1.100", "", { "optionalDependencies": { "@napi-rs/canvas-android-arm64": "0.1.100", "@napi-rs/canvas-darwin-arm64": "0.1.100", "@napi-rs/canvas-darwin-x64": "0.1.100", "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.100", "@napi-rs/canvas-linux-arm64-gnu": "0.1.100", "@napi-rs/canvas-linux-arm64-musl": "0.1.100", "@napi-rs/canvas-linux-riscv64-gnu": "0.1.100", "@napi-rs/canvas-linux-x64-gnu": "0.1.100", "@napi-rs/canvas-linux-x64-musl": "0.1.100", "@napi-rs/canvas-win32-arm64-msvc": "0.1.100", "@napi-rs/canvas-win32-x64-msvc": "0.1.100" } }, "sha512-xglYA6q3XO5P3BNJYxVZ1IV7DLVjp1Py6nwag88YntrS+3vKHyYcMqXVS4ZztJmwz2uGvz1FWhI/4LgbR5uQDA=="], + + "@napi-rs/canvas-android-arm64": ["@napi-rs/canvas-android-arm64@0.1.100", "", { "os": "android", "cpu": "arm64" }, "sha512-hjhCKhntPv9+t4ckHymdx0phYNcVW+GKQR6Lzw2zE+pOVjOplSmtx9nNNknTjbEDLcuLZqA1y8ufKg1XfgftzQ=="], + + "@napi-rs/canvas-darwin-arm64": ["@napi-rs/canvas-darwin-arm64@0.1.100", "", { "os": "darwin", "cpu": "arm64" }, "sha512-2PcswRaC7Ly645DGt88///zuFDhJxJYdKAs1uU3mfk1atYkXufgcgLfBpk6Tm12nCQBaNt1wpybuPZ4qOhTo8A=="], + + "@napi-rs/canvas-darwin-x64": ["@napi-rs/canvas-darwin-x64@0.1.100", "", { "os": "darwin", "cpu": "x64" }, "sha512-ePNZtj7pNIva/siZMg+HmbeozkIjqUIYdoymH8HaA3qK7LfzFN4WMBM8G6HQ9ZC+H3+Dnn5pqtiXpgLykaPOhw=="], + + "@napi-rs/canvas-linux-arm-gnueabihf": ["@napi-rs/canvas-linux-arm-gnueabihf@0.1.100", "", { "os": "linux", "cpu": "arm" }, "sha512-d5cDB48oWFGU8/XPhUOFAlySgb/VAu7D+s8fi55K1Pcfg8aPplHWqMgibhVLU8ky7Pyg/fuiVLz4Nf3JrSTuUA=="], + + "@napi-rs/canvas-linux-arm64-gnu": ["@napi-rs/canvas-linux-arm64-gnu@0.1.100", "", { "os": "linux", "cpu": "arm64" }, "sha512-rDxgxRu69RvDlX/bh9o22DxLsGr8EqsNgotL9+RwQE1S0b0cqeatqsw6aW45mukm0B42DIAaAacKaYQ8cqS1nw=="], + + "@napi-rs/canvas-linux-arm64-musl": ["@napi-rs/canvas-linux-arm64-musl@0.1.100", "", { "os": "linux", "cpu": "arm64" }, "sha512-K3mDW66N+xT2/V439u1alFANiBUjdEx2gLiNYnCmUsva5jZMxWTjafBYwTzYK+EMFMHrUoabuU+T1BIP5CgbYQ=="], + + "@napi-rs/canvas-linux-riscv64-gnu": ["@napi-rs/canvas-linux-riscv64-gnu@0.1.100", "", { "os": "linux", "cpu": "none" }, "sha512-mooqUBTIsccZpnoQC4NgrC1v6C1vof39etLNMnBwCY+p0gajWJvAHLGQ6g/gGyS5YrpDW+GefSN4+Cvcr08UWw=="], + + "@napi-rs/canvas-linux-x64-gnu": ["@napi-rs/canvas-linux-x64-gnu@0.1.100", "", { "os": "linux", "cpu": "x64" }, "sha512-1eCvkDCazm7FFhsT7DfGOdSaHgZVK3bt/dSBl5EWHOWmnz+I7j8tPseJqqD81NF+MH21jKUK4wQSDjN0mdhnTg=="], + + "@napi-rs/canvas-linux-x64-musl": ["@napi-rs/canvas-linux-x64-musl@0.1.100", "", { "os": "linux", "cpu": "x64" }, "sha512-20arT6lnI19S68qNlii73TSEDbECNgzMz2EpldC1V3mZFuRkeujXkcebRk0LRJe9SEUAooYiLokfMViY8IX7yA=="], + + "@napi-rs/canvas-win32-arm64-msvc": ["@napi-rs/canvas-win32-arm64-msvc@0.1.100", "", { "os": "win32", "cpu": "arm64" }, "sha512-DZFFT1wIAg37LJw37yhMRFfjATd3vTQzjZ1Yki8u2vhO6Hi5VE6BVaGQ1aaDu7xb4iMErz+9EOwjpS7xcxFeBw=="], + + "@napi-rs/canvas-win32-x64-msvc": ["@napi-rs/canvas-win32-x64-msvc@0.1.100", "", { "os": "win32", "cpu": "x64" }, "sha512-MyT1j3mHC2+Lu4pBi9mKyMJhtP6U7k7EldY7sj/uS5gJA65gTXt8MefJQXLJo5d/vZbuWmfxzkEUNc/urV3pHA=="], + + "@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="], + + "@phosphor-icons/core": ["@phosphor-icons/core@2.1.1", "", {}, "sha512-v4ARvrip4qBCImOE5rmPUylOEK4iiED9ZyKjcvzuezqMaiRASCHKcRIuvvxL/twvLpkfnEODCOJp5dM4eZilxQ=="], + + "@phosphor-icons/react": ["@phosphor-icons/react@2.1.10", "", { "peerDependencies": { "react": ">= 16.8", "react-dom": ">= 16.8" } }, "sha512-vt8Tvq8GLjheAZZYa+YG/pW7HDbov8El/MANW8pOAz4eGxrwhnbfrQZq0Cp4q8zBEu8NIhHdnr+r8thnfRSNYA=="], + + "@puppeteer/browsers": ["@puppeteer/browsers@3.2.6", "", { "dependencies": { "modern-tar": "^0.8.6", "yargs": "^18.0.0" }, "peerDependencies": { "proxy-agent": ">=8.0.1", "yauzl": "^2.10.0 || ^3.4.0" }, "optionalPeers": ["proxy-agent", "yauzl"], "bin": { "browsers": "lib/main-cli.js" } }, "sha512-MJP29gVoHznmqmwhH1tlZqzfeQ3aylTpSSa6WKZXtkwYUH02i9imBmWGTyZrbnAou5paX78SE4jMAUqnEPf8ug=="], + + "@react-aria/focus": ["@react-aria/focus@3.22.1", "", { "dependencies": { "@swc/helpers": "^0.5.0", "react-aria": "^3.48.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-CPxtkyrBi/HYY5P3lE/57sQ6qfa0lN8E55TOm89H0kNGv0lKt+/0zP7lWERzBjRr5IxBVrQX4gFEowBN52LPaA=="], + + "@react-aria/interactions": ["@react-aria/interactions@3.28.1", "", { "dependencies": { "@react-types/shared": "^3.34.0", "@swc/helpers": "^0.5.0", "react-aria": "^3.48.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-Bqb+HrD5I5MHS2SKBhISYqo2SW8Y2dfzgF/Y1lIJq7xqLxheo9vzxPGEHhz+XzkgGfoqEJx8A6a3C7uiqS3HWA=="], + + "@react-types/shared": ["@react-types/shared@3.37.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-VNlZuifu4tHdxWPfHvoMfKsHA9kVTCGkduv5vKVTdinm8wHFJNhyVB5RzIMiRFj0q3RKoCbP68u2zaoBSiFueg=="], + + "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.27", "", {}, "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA=="], + + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.66.0", "", { "os": "android", "cpu": "arm" }, "sha512-7y4XeoUHPecjfUDRmap8U0q6bjfLAPn7uOGT8BKyqy8uNDOjsGS8rlBhOx6sZLVwwjN6hapvGl2mW9/IS6UNww=="], + + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.66.0", "", { "os": "android", "cpu": "arm64" }, "sha512-e8WugYZXpgqrlMXLCudYVRAxAcK7AIY36JxRDwFRD38L9q62G1VsEUW6ijXxzjxYjNB8i1zo3B/ycIQ/qjLC/Q=="], + + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.66.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-6vkDCfyDjNLokh+Rt1D2KtNgFFMEPdkWha/mbtP4cSjh9xiN8T/JBS/A7nDYKjmMAXHrvR9J3AzUk2LtFbIBLg=="], + + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.66.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-/mzZAX0+Q6eXxvkR0HB0RZCCrsbmFD8DpsvCQoMYABDfq/DjqkbfytuJ7GvZ4AhR/Mgis2fXbZrGqfbcK2Z5fA=="], + + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.66.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-JQJx9E8tUjGqed1RevDmoHaS3V30ODdV8uyvGxlwd4K5se6bkPrMeltSybqAtpJ+ltDRfo7FORQaJG2Hd5nGog=="], + + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.66.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-GEaUQQjMaG7X1304qMgqLjzCKv6CdDirzJSS+UqUs3xhJ9X2Kjzu0JDbLoUU42FWxwmZqz+SsgU1SlQv9GNRVA=="], + + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.66.0", "", { "os": "linux", "cpu": "arm" }, "sha512-DgmAU9N0NhDQDzHgFUocDio7zRO8jR/nY/obDGvCR8zbJ6J77Fg6X49yPuExJUpYPbC82EOaRhG969pWzUSnHQ=="], + + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.66.0", "", { "os": "linux", "cpu": "arm" }, "sha512-zG09YZ+sk/HoHq+P9gYB0EseQ3M20RbDuKGWey6fbiMDV1LxfXvhgSW9jDaCcvFPMgfLXpimzXY+UYvA8R2mLQ=="], + + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.66.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-vlArhgyXbcVc1D4WZPoiYuqJIaMiSHBj6etRXua0KlfjlZeuiQyVAPYi0/N49O4mSp3u1iGUBLEjNa8ec81XZg=="], + + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.66.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-RxJZtk0G87YPotDaRDvRqStV8cbqLSC5TroHvQHHKsqBg0ok64RxKgtXeFsa7FBcy7mb4crBrG3xK8USWIqWNA=="], + + "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.66.0", "", { "os": "linux", "cpu": "none" }, "sha512-qlGcw959PrLLkZhiBxF3OZ6SQvj+OKY85mCqGNgSRs4LZlDJ6ICqmz6UdxtINdhcXYwNIbZoapQVBAmZlD2hUQ=="], + + "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.66.0", "", { "os": "linux", "cpu": "none" }, "sha512-TvTI/7Cy0WvRA1SXgwzu6bwXBnMpmeT/ln5q7WvSpqmXy1VbmEnY8HVIDQNBiaHJvoWqRr0M4FNo7qiqtyMaFw=="], + + "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.66.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-UZEDkSoDRZ50NyLj70nO6mpIK3dvs2cPTTvQb1bA/PBDmr9fvn5KiESuGfh6srd7Zi6Lt9Sv2sVrFr1QoHLvPQ=="], + + "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.66.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-VRbxTvagLh3HRcysx1CNq+HHcvJbSebNI6fCbk7jwmmWHkXjrSIV3igXBpRHUTFdg0pagWGu50xoSZXnrZHjVQ=="], + + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.66.0", "", { "os": "linux", "cpu": "none" }, "sha512-uWdJpvYqh0LE/i+YBL3sMX0a2kUkICENjmrPmyBmMOFc3jMrs6MSQH/pMD+VIpGEoUcr3XkHGLLfymzIqPSRRg=="], + + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.66.0", "", { "os": "linux", "cpu": "none" }, "sha512-3FUd88pxgWAjK60OgCrika1AcNG+u8zaCdWjg4TlcZTDkt5TGyci8ZU64l3OJ9ax0MEjw3P80B/3PoSQDCLwJQ=="], + + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.66.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-qT2rMmgyej62g5AdwktK+Bt2lBu497pzWZe12TTQ5JmZjOYPnEwcPEAOSLTBxBV+6gIES75rXm219v/QkT397A=="], + + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.66.0", "", { "os": "linux", "cpu": "x64" }, "sha512-E46rnZgp7J84Qwe8RMlF+rgimnDo/9fuiGbUArGB0ZkMWf97O7yeSCfKls5x/YJOF0RcuSe9RctuKe1hlxICiA=="], + + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.66.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Uz1HiZe+qBzqgdPsON+z0wRx3WdATuyzwvGT6cr2VZVrqqko0ZJVfkrQJtwDMuDcAfXYdo7XucaxJ7lTLjEcgg=="], + + "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.66.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-Ph7TX3Ex5qdfcb7Tc6eEPugVkRfJ501eTovO4T5029YObfpZ7dzn3RiwpFvGp50nk2QUhvBMZ0PFGlEj6pOYTg=="], + + "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.66.0", "", { "os": "none", "cpu": "arm64" }, "sha512-nZYPEya7ZkeNxUEiF7qmNZbyLTyRN3MK5cO22KqsaoneUzXJuzBIQRw+7BEQy9LGj2O5vrCE9V3EpK06FYo1tQ=="], + + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.66.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-u7aTfS3R6C4hRsqXSzaO6qLZYLVuMkHMvcWlux4IM8IJif1VCl2cgPBSo5gSNoFoStQypQP+qwq8W1IyFBf1QQ=="], + + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.66.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-e+i9ueHrH1Bafb0cf0woAIVJbYcoC8vRaD+vz+Xi8w6jz9cYJSV3vyKO6ELGSZ6g4W4MJOm2WPLN4/nQf77h7w=="], + + "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.66.0", "", { "os": "win32", "cpu": "x64" }, "sha512-KfTCbrtr2zXTqH2E1F+uYlFTrYibxHKqPAHobpd8Kfg49cEHmuHebOidCTDRgqG1suaPFX7oejFQeGE71zWKfA=="], + + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.66.0", "", { "os": "win32", "cpu": "x64" }, "sha512-xA+neBh1bqkqaS3b48T2UHZnDsTIpb9B0h+TdBzynjF/ymCpYndhfY10RqW0qSKB1HqqQA83mINVhAdwA+mETg=="], + + "@storebound/desktop": ["@storebound/desktop@workspace:apps/desktop"], + + "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="], + + "@tanstack/react-virtual": ["@tanstack/react-virtual@3.14.23", "", { "dependencies": { "@tanstack/virtual-core": "3.19.8" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Oyy58qQwdaQieA+A4WUDtnh9D1rv5FZvGdw8og9Xeyh88V6HH94vMSyV5i9ATIbYNe9t5Ix0WXRo9NOTpHDkYw=="], + + "@tanstack/virtual-core": ["@tanstack/virtual-core@3.19.8", "", {}, "sha512-Oz/SYBo/aVPyQkwtOw7Q23myITUgFIof2glQqydYJAPL6mH2SkJDkvDKZTklB+7gv5jGLZQhyTcd7SO1A1EODQ=="], + + "@tauri-apps/api": ["@tauri-apps/api@2.12.4", "", {}, "sha512-pVmfis+4zT8H0Qhp3xPZx9Ju7kpzvA6rr/PSJPyuwfvucTQ8sVt61NYU9KMkK703UFlYadFmjKA4HhybOtN0gg=="], + + "@tauri-apps/cli": ["@tauri-apps/cli@2.12.4", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.12.4", "@tauri-apps/cli-darwin-x64": "2.12.4", "@tauri-apps/cli-linux-arm-gnueabihf": "2.12.4", "@tauri-apps/cli-linux-arm64-gnu": "2.12.4", "@tauri-apps/cli-linux-arm64-musl": "2.12.4", "@tauri-apps/cli-linux-riscv64-gnu": "2.12.4", "@tauri-apps/cli-linux-x64-gnu": "2.12.4", "@tauri-apps/cli-linux-x64-musl": "2.12.4", "@tauri-apps/cli-win32-arm64-msvc": "2.12.4", "@tauri-apps/cli-win32-ia32-msvc": "2.12.4", "@tauri-apps/cli-win32-x64-msvc": "2.12.4" }, "bin": { "tauri": "tauri.js" } }, "sha512-JI9bHfudSRJikGOrjbXEm6RjzzvmKuLc+JixB1NE8hNzQkNlCCIC3pTES3uypkR9lxHrsbxzcnSwhI2IxBQphw=="], + + "@tauri-apps/cli-darwin-arm64": ["@tauri-apps/cli-darwin-arm64@2.12.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-OxqKSckIkoJ6vX2AjifIJpTasFC0Hbdoo7gEiCmAjauABO3U8m2MRsLWe+QTiBwDx1mIrvgA+rvI7tvDnbnHVg=="], + + "@tauri-apps/cli-darwin-x64": ["@tauri-apps/cli-darwin-x64@2.12.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-fz76/77wMMJOaaUN6n3CybRG0P/MTEjjqYk81mGPyhi9m6Ue5T+LWBnJP/AkPooNatBPI2vtulGqomyMJ44lCQ=="], + + "@tauri-apps/cli-linux-arm-gnueabihf": ["@tauri-apps/cli-linux-arm-gnueabihf@2.12.4", "", { "os": "linux", "cpu": "arm" }, "sha512-K0w8Bof6Lt8QKLAYhRy0yy36ZH5iA/35VuSOvnxyjvCUZ+A3JKsUTlALviH/sVgAlisaPzzmeJSH8XOn4Q2HBA=="], + + "@tauri-apps/cli-linux-arm64-gnu": ["@tauri-apps/cli-linux-arm64-gnu@2.12.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-j5rOnjmRUwWrm1oosf0zBYl4D+fqydgUROFCk0hvKZxvbTT8SOERes0QB7rBV/XWNy+kM6pCKzb3oSm2sRglzg=="], + + "@tauri-apps/cli-linux-arm64-musl": ["@tauri-apps/cli-linux-arm64-musl@2.12.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-aOue3Fy6Jb7+oWcfAVUsVHfeTybSCt2CZoU06aO4jv4d2Ks/KnaTPwMAK3CLEduGOvBLY1lbBBrIyomqLLH5Sg=="], + + "@tauri-apps/cli-linux-riscv64-gnu": ["@tauri-apps/cli-linux-riscv64-gnu@2.12.4", "", { "os": "linux", "cpu": "none" }, "sha512-Fx6GShY/RvST+t6LMlTHAwd66+1tEaAAGrnU7cysVfaiRP1BKng5Vl6rVmO6rSLOA1Sp1dRzNYM4f0OWQGb7qA=="], + + "@tauri-apps/cli-linux-x64-gnu": ["@tauri-apps/cli-linux-x64-gnu@2.12.4", "", { "os": "linux", "cpu": "x64" }, "sha512-tNzZSa79Z1nRpHxEpQ38lsAFpKlFlYvoXzjTV+lRRn/zSf3wrdUC3wnLcq2XEadchPu4ttK0zivhYzr+XGD19Q=="], + + "@tauri-apps/cli-linux-x64-musl": ["@tauri-apps/cli-linux-x64-musl@2.12.4", "", { "os": "linux", "cpu": "x64" }, "sha512-jmZ1pr0xEqUhuEusWtt9Yt+GF6lCnGHUmIL+KIknpbjK/XQ2qkhDBhaxK/JMHM2A8dAacVXCxXJk2EXpwhQUfA=="], + + "@tauri-apps/cli-win32-arm64-msvc": ["@tauri-apps/cli-win32-arm64-msvc@2.12.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-fGo8pgEHZxdSYgZ/J98m1usJ7NHKmKbq7k6uT0x1rpOq6Bg2YVzzpaAblWk710f5LHYBJIL5QIFS5IrD+4gmTg=="], + + "@tauri-apps/cli-win32-ia32-msvc": ["@tauri-apps/cli-win32-ia32-msvc@2.12.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-ezl8sQIcjYsye3TUnTH5VcWmWzccZASlQm7hlZt0dYyj1XD0qpVW47u2xYVrIKui0F8uQv/7QGZixdWiClBsbg=="], + + "@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.12.4", "", { "os": "win32", "cpu": "x64" }, "sha512-DJhDeCqjLDNMWYFy7ZS8cfeAHX2RK0RbQMLiA3bMVVkXRDJ4NBYiHriGqsUhsr9iG41aTb+dJGkFPmPw1gWwVw=="], + + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], + + "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], + + "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], + + "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], + + "@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.3.0" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + + "@types/d3": ["@types/d3@7.4.3", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="], + + "@types/d3-array": ["@types/d3-array@3.0.3", "", {}, "sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ=="], + + "@types/d3-axis": ["@types/d3-axis@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw=="], + + "@types/d3-brush": ["@types/d3-brush@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A=="], + + "@types/d3-chord": ["@types/d3-chord@3.0.6", "", {}, "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg=="], + + "@types/d3-color": ["@types/d3-color@3.1.0", "", {}, "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA=="], + + "@types/d3-contour": ["@types/d3-contour@3.0.6", "", { "dependencies": { "@types/d3-array": "*", "@types/geojson": "*" } }, "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg=="], + + "@types/d3-delaunay": ["@types/d3-delaunay@6.0.1", "", {}, "sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ=="], + + "@types/d3-dispatch": ["@types/d3-dispatch@3.0.7", "", {}, "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA=="], + + "@types/d3-drag": ["@types/d3-drag@3.0.7", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ=="], + + "@types/d3-dsv": ["@types/d3-dsv@3.0.7", "", {}, "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g=="], + + "@types/d3-ease": ["@types/d3-ease@3.0.2", "", {}, "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="], + + "@types/d3-fetch": ["@types/d3-fetch@3.0.7", "", { "dependencies": { "@types/d3-dsv": "*" } }, "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA=="], + + "@types/d3-force": ["@types/d3-force@3.0.10", "", {}, "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw=="], + + "@types/d3-format": ["@types/d3-format@3.0.1", "", {}, "sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg=="], + + "@types/d3-geo": ["@types/d3-geo@3.1.0", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ=="], + + "@types/d3-hierarchy": ["@types/d3-hierarchy@3.1.7", "", {}, "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="], + + "@types/d3-interpolate": ["@types/d3-interpolate@3.0.1", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw=="], + + "@types/d3-path": ["@types/d3-path@3.1.1", "", {}, "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg=="], + + "@types/d3-polygon": ["@types/d3-polygon@3.0.2", "", {}, "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA=="], + + "@types/d3-quadtree": ["@types/d3-quadtree@3.0.6", "", {}, "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="], + + "@types/d3-random": ["@types/d3-random@3.0.4", "", {}, "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA=="], + + "@types/d3-scale": ["@types/d3-scale@4.0.2", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA=="], + + "@types/d3-scale-chromatic": ["@types/d3-scale-chromatic@3.1.0", "", {}, "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ=="], + + "@types/d3-selection": ["@types/d3-selection@3.0.12", "", {}, "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw=="], + + "@types/d3-shape": ["@types/d3-shape@3.1.7", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg=="], + + "@types/d3-time": ["@types/d3-time@3.0.0", "", {}, "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg=="], + + "@types/d3-time-format": ["@types/d3-time-format@2.1.0", "", {}, "sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA=="], + + "@types/d3-timer": ["@types/d3-timer@3.0.2", "", {}, "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="], + + "@types/d3-transition": ["@types/d3-transition@3.0.9", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="], + + "@types/d3-zoom": ["@types/d3-zoom@3.0.9", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA=="], + + "@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="], + + "@types/geojson": ["@types/geojson@7946.0.16", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="], + + "@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], + + "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], + + "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], + + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + + "@upsetjs/venn.js": ["@upsetjs/venn.js@2.0.0", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="], + + "@visx/axis": ["@visx/axis@4.0.0", "", { "dependencies": { "@visx/group": "4.0.0", "@visx/point": "4.0.0", "@visx/scale": "4.0.0", "@visx/shape": "4.0.0", "@visx/text": "4.0.0", "classnames": "^2.3.1" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-cSPNO9Aic2UX49AmIeJJ9TQrrAkvUHpHOGqimUAXhbg07VI3HoHDKcXZdrjvQz+g0LhubrUkjj8Gwju2WZ3dtg=="], + + "@visx/bounds": ["@visx/bounds@4.0.0", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-3wAfN5fg2bxg/5f3MlKWzGDTKU2hdKkxq8bVWXpPZQV0UiVc0myuU1qa34c7tN3hg5SDe6MJi/bae2eTQDgEiQ=="], + + "@visx/curve": ["@visx/curve@4.0.0", "", { "dependencies": { "@visx/vendor": "4.0.0" } }, "sha512-bXrOSd2BzVCxR7kBE7gPTSU4plxzYN75w7erdHYabwn3vzP+xFk1o0gg3NOHEPJzt5tXqf0Ecm5YqHACOnipTA=="], + + "@visx/event": ["@visx/event@4.0.0", "", { "dependencies": { "@visx/point": "4.0.0" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-sOcVVzOUxOefF8mQenRFtutoEO7P9icpTcSJM36Sv13sepQbPBuYLknX7RV+EzqyNLOze5cO5GmLIUNH82FOoA=="], + + "@visx/gradient": ["@visx/gradient@4.0.0", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-AycKA/9Hhx9BXOdWACqYKGU+Dkq/gWzgaDAK/MkVDjXME+3Sl8oE6mn/ZO54gi6wg9qNHhWLnp8XKPJSp4/pzA=="], + + "@visx/group": ["@visx/group@4.0.0", "", { "dependencies": { "classnames": "^2.3.1" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-HGAq8BCqn5x0t94CJOLJeKtWss9LFpF3HY69HbuO1PlR+B9c4aVT9xbjfudmU8wGQZLT6JNt+PJvxbO2aJ+1aA=="], + + "@visx/point": ["@visx/point@4.0.0", "", {}, "sha512-hwJ9UlIjg3iV4iiJ3RN5SNTXama+zGaNe57sXSrSvPiqhkDXypsYBdDSlAnHmKbMzHP0zFmgB1UJciB/QUyigw=="], + + "@visx/responsive": ["@visx/responsive@4.0.0", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-MGPK8AeiBIhzz34o9TNJIyUDQIdWEj5mt+U/Je4qVRRXpXSMhor1IE7v71czAS5b90OrFxC9L3w27AV+szG25w=="], + + "@visx/scale": ["@visx/scale@4.0.0", "", { "dependencies": { "@visx/vendor": "4.0.0" } }, "sha512-Q3VaSLKlsrxxSl9CwS2D3Mvz4/4kIp/6NMKRY8Im0Au1hrQh2egU806p0+JwN0ccuGGDe03jyAxX4BSRAH8Plg=="], + + "@visx/shape": ["@visx/shape@4.0.0", "", { "dependencies": { "@visx/curve": "4.0.0", "@visx/group": "4.0.0", "@visx/scale": "4.0.0", "@visx/vendor": "4.0.0", "classnames": "^2.3.1" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-X0FP3OFjQhc5/6Vj2aY7cK2JwKYI0H0hQM7cdNRWy/ZMMlrh5KpEdqx0HVo0KoTeTlkUvO+kydMLnAuuCRFIFw=="], + + "@visx/text": ["@visx/text@4.0.0", "", { "dependencies": { "classnames": "^2.3.1", "reduce-css-calc": "^1.3.0" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-39f2goSaKy5Mqn89lRDGSJ1IMr49wplkbIFHsFI8cPnAPbguiJxYZ+ulizd7Vcsq2z/hytuGv3Lmk165zUiUYQ=="], + + "@visx/tooltip": ["@visx/tooltip@4.0.0", "", { "dependencies": { "@visx/bounds": "4.0.0", "classnames": "^2.3.1", "react-use-measure": "^2.0.4" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-+6J2h5qPvniT0pQtxQrLYGErPRVHr3pRfcMkNqTxD/HgofDGsL6vEBkjMR535MF1hkWYQ9XzOiWP6ERN4TF+mg=="], + + "@visx/vendor": ["@visx/vendor@4.0.0", "", { "dependencies": { "@types/d3-array": "3.0.3", "@types/d3-color": "3.1.0", "@types/d3-delaunay": "6.0.1", "@types/d3-format": "3.0.1", "@types/d3-geo": "3.1.0", "@types/d3-interpolate": "3.0.1", "@types/d3-path": "3.1.1", "@types/d3-scale": "4.0.2", "@types/d3-shape": "3.1.7", "@types/d3-time": "3.0.0", "@types/d3-time-format": "2.1.0", "d3-array": "3.2.1", "d3-color": "3.1.0", "d3-delaunay": "6.0.2", "d3-format": "3.1.0", "d3-geo": "3.1.0", "d3-interpolate": "3.0.1", "d3-path": "3.1.0", "d3-scale": "4.0.2", "d3-shape": "3.2.0", "d3-time": "3.1.0", "d3-time-format": "4.1.0", "internmap": "2.0.3" } }, "sha512-LoBNzWjTXzBfu095BQxB14IwZQHHOLs8ZMzM6t2FL4ZGORaACgLcmXRRLhFo0VmRR8L7iNTM4HHc1j6yFvzsAA=="], + + "@vitejs/plugin-react": ["@vitejs/plugin-react@4.7.0", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="], + + "@zenuml/core": ["@zenuml/core@3.50.1", "", { "dependencies": { "@floating-ui/react": "^0.27.16", "@headlessui/react": "^2.2.9", "@headlessui/tailwindcss": "^0.2.2", "antlr4": "~4.11.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "color-string": "^2.1.4", "dompurify": "^3.3.1", "highlight.js": "^11.10.0", "html-to-image": "^1.11.13", "jotai": "^2.16.1", "marked": "^4.3.0", "react": "^19.2.3", "react-dom": "^19.2.3", "tailwind-merge": "^3.4.0" }, "optionalDependencies": { "@napi-rs/canvas": "^0.1.97" }, "peerDependencies": { "playwright-core": "1.57.0" }, "optionalPeers": ["playwright-core"], "bin": { "zenuml": "dist/cli/zenuml.mjs" } }, "sha512-Q18BXvIfhRuGw0JfO4e+pltG04Phhv2E7n35EWTNSZKKH/HEkyE4Sh7KERb9dqaOfjOdRdKvLG0YekjK3fcDXw=="], + + "ansi-regex": ["ansi-regex@6.4.0", "", {}, "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw=="], + + "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "antlr4": ["antlr4@4.11.0", "", {}, "sha512-GUGlpE2JUjAN+G8G5vY+nOoeyNhHsXoIJwP1XF1oRw89vifA1K46T6SEkwLwr7drihN7I/lf0DIjKc4OZvBX8w=="], + + "aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="], + + "balanced-match": ["balanced-match@0.4.2", "", {}, "sha512-STw03mQKnGUYtoNjmowo4F2cRmIIxYEGiMsjjwla/u5P1lxadj/05WkNaFjNiKTgJkj8KiXbgAiRTmcQRwQNtg=="], + + "baseline-browser-mapping": ["baseline-browser-mapping@2.11.34", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-Aqr8mA1kIvyJ3UY5YAY7ib8LSo1DmDMbMnVqGPtsKW1LxaFQFwn9Eb3yvq2fUKJsRvaXjnAV7R5osqETapzNiA=="], + + "browserslist": ["browserslist@4.29.5", "", { "dependencies": { "baseline-browser-mapping": "^2.11.33", "caniuse-lite": "^1.0.30001819", "electron-to-chromium": "^1.5.464", "node-releases": "^2.0.60", "update-browserslist-db": "^1.3.4" }, "bin": { "browserslist": "cli.js" } }, "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ=="], + + "bun-types": ["bun-types@1.3.0", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-u8X0thhx+yJ0KmkxuEo9HAtdfgCBaM/aI9K90VQcQioAmkVp3SG3FkwWGibUFz3WdXAdcsqOcbU40lK7tbHdkQ=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001820", "", {}, "sha512-gfWD6MxqVCqAOwmODfZf7DchWvlrA+SRdNX7ceLfg3xRqe5ssjjpF7EgslC/0tiLiNTajdaNN/q8c/5u/7Gz8w=="], + + "chalk": ["chalk@6.0.1", "", {}, "sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA=="], + + "chevrotain": ["chevrotain@13.2.0", "", { "dependencies": { "@chevrotain/cst-dts-gen": "13.2.0", "@chevrotain/gast": "13.2.0", "@chevrotain/regexp-to-ast": "13.2.0", "@chevrotain/types": "13.2.0", "@chevrotain/utils": "13.2.0" } }, "sha512-GTouk5YzgBxlTPCaDn5q0q2EJKkrYmnPF+HmF8v0Qo4r3iyPG7HJivkN1wthCXZcm3sIcZFpGTRovLPNdJNRCA=="], + + "chromium-bidi": ["chromium-bidi@157.0.8090-0", "", { "dependencies": { "mitt": "^3.0.1", "zod": "^4.6.5" }, "peerDependencies": { "devtools-protocol": "*" } }, "sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag=="], + + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], + + "classnames": ["classnames@2.5.1", "", {}, "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="], + + "cliui": ["cliui@9.0.1", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="], + + "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + + "color-name": ["color-name@2.1.1", "", {}, "sha512-p2FdgwVx1a9yWBHP2wI0VgShkDpgN4kZISkxdNipGBJWpa5G6b04OINlVWCyJj0JmfvcPrgqt95E9k8yvaOJFg=="], + + "color-string": ["color-string@2.1.4", "", { "dependencies": { "color-name": "^2.0.0" } }, "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg=="], + + "commander": ["commander@15.0.0", "", {}, "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "cose-base": ["cose-base@1.0.3", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "cytoscape": ["cytoscape@3.34.4", "", {}, "sha512-msY99tMY8iWTg+sIPGfSqDcPNOt4xcj+v/K/7qUFaCUxxlqnMkUYLBjRUzn9W5CU/R2hrmtJa5+UtovrEM2ctg=="], + + "cytoscape-cose-bilkent": ["cytoscape-cose-bilkent@4.1.0", "", { "dependencies": { "cose-base": "^1.0.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ=="], + + "cytoscape-fcose": ["cytoscape-fcose@2.2.0", "", { "dependencies": { "cose-base": "^2.2.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ=="], + + "d3": ["d3@7.9.0", "", { "dependencies": { "d3-array": "3", "d3-axis": "3", "d3-brush": "3", "d3-chord": "3", "d3-color": "3", "d3-contour": "4", "d3-delaunay": "6", "d3-dispatch": "3", "d3-drag": "3", "d3-dsv": "3", "d3-ease": "3", "d3-fetch": "3", "d3-force": "3", "d3-format": "3", "d3-geo": "3", "d3-hierarchy": "3", "d3-interpolate": "3", "d3-path": "3", "d3-polygon": "3", "d3-quadtree": "3", "d3-random": "3", "d3-scale": "4", "d3-scale-chromatic": "3", "d3-selection": "3", "d3-shape": "3", "d3-time": "3", "d3-time-format": "4", "d3-timer": "3", "d3-transition": "3", "d3-zoom": "3" } }, "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA=="], + + "d3-array": ["d3-array@3.2.1", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-gUY/qeHq/yNqqoCKNq4vtpFLdoCdvyNpWoC/KNjhGbhDuQpAM9sIQQKkXSNpXa9h5KySs/gzm7R88WkUutgwWQ=="], + + "d3-axis": ["d3-axis@3.0.0", "", {}, "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw=="], + + "d3-brush": ["d3-brush@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "3", "d3-transition": "3" } }, "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ=="], + + "d3-chord": ["d3-chord@3.0.1", "", { "dependencies": { "d3-path": "1 - 3" } }, "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g=="], + + "d3-color": ["d3-color@3.1.0", "", {}, "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="], + + "d3-contour": ["d3-contour@4.0.2", "", { "dependencies": { "d3-array": "^3.2.0" } }, "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA=="], + + "d3-delaunay": ["d3-delaunay@6.0.2", "", { "dependencies": { "delaunator": "5" } }, "sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ=="], + + "d3-dispatch": ["d3-dispatch@3.0.1", "", {}, "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg=="], + + "d3-drag": ["d3-drag@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg=="], + + "d3-dsv": ["d3-dsv@3.0.1", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2json": "bin/dsv2json.js", "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q=="], + + "d3-ease": ["d3-ease@3.0.1", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="], + + "d3-fetch": ["d3-fetch@3.0.1", "", { "dependencies": { "d3-dsv": "1 - 3" } }, "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw=="], + + "d3-force": ["d3-force@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", "d3-timer": "1 - 3" } }, "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg=="], + + "d3-format": ["d3-format@3.1.0", "", {}, "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA=="], + + "d3-geo": ["d3-geo@3.1.0", "", { "dependencies": { "d3-array": "2.5.0 - 3" } }, "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA=="], + + "d3-hierarchy": ["d3-hierarchy@3.1.2", "", {}, "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA=="], + + "d3-interpolate": ["d3-interpolate@3.0.1", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="], + + "d3-path": ["d3-path@3.1.0", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="], + + "d3-polygon": ["d3-polygon@3.0.1", "", {}, "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg=="], + + "d3-quadtree": ["d3-quadtree@3.0.1", "", {}, "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw=="], + + "d3-random": ["d3-random@3.0.1", "", {}, "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ=="], + + "d3-sankey": ["d3-sankey@0.12.3", "", { "dependencies": { "d3-array": "1 - 2", "d3-shape": "^1.2.0" } }, "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ=="], + + "d3-scale": ["d3-scale@4.0.2", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ=="], + + "d3-scale-chromatic": ["d3-scale-chromatic@3.1.0", "", { "dependencies": { "d3-color": "1 - 3", "d3-interpolate": "1 - 3" } }, "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ=="], + + "d3-selection": ["d3-selection@3.0.0", "", {}, "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ=="], + + "d3-shape": ["d3-shape@3.2.0", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="], + + "d3-time": ["d3-time@3.1.0", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q=="], + + "d3-time-format": ["d3-time-format@4.1.0", "", { "dependencies": { "d3-time": "1 - 3" } }, "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg=="], + + "d3-timer": ["d3-timer@3.0.1", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="], + + "d3-transition": ["d3-transition@3.0.1", "", { "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w=="], + + "d3-zoom": ["d3-zoom@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" } }, "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw=="], + + "dagre-d3-es": ["dagre-d3-es@7.0.14", "", { "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg=="], + + "dayjs": ["dayjs@1.11.23", "", {}, "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ=="], + + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" }, "peerDependencies": { "supports-color": "*" }, "optionalPeers": ["supports-color"] }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + + "delaunator": ["delaunator@5.1.0", "", { "dependencies": { "robust-predicates": "^3.0.2" } }, "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ=="], + + "devtools-protocol": ["devtools-protocol@0.0.1704951", "", {}, "sha512-GQhQOs9u/Mvm1zMtJIH872JS4AskuZdUSsPNPk4ChahtWAUqgz6atEtIsMt+nO7MqF1Ic4HxII/k8Cu36JivNg=="], + + "dompurify": ["dompurify@3.4.17", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.467", "", {}, "sha512-Nw9X371rtZmYcBSnEijnCDONILjs93biCZO34juC7MBOmK8E+GFnyD4T/WvyrlJkppul7oxg6TwvtKst9SODTw=="], + + "elkjs": ["elkjs@0.9.3", "", {}, "sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ=="], + + "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + + "es-toolkit": ["es-toolkit@1.53.0", "", {}, "sha512-3+AYXp9fmJ/UhHBMYj2/U+RaUouMD90SzoItyDOB2Za7W6dB7fQApFGnZPl2MF6K8/Tv1koh1JyirSx/kju6Pw=="], + + "esbuild": ["esbuild@0.25.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.12", "@esbuild/android-arm": "0.25.12", "@esbuild/android-arm64": "0.25.12", "@esbuild/android-x64": "0.25.12", "@esbuild/darwin-arm64": "0.25.12", "@esbuild/darwin-x64": "0.25.12", "@esbuild/freebsd-arm64": "0.25.12", "@esbuild/freebsd-x64": "0.25.12", "@esbuild/linux-arm": "0.25.12", "@esbuild/linux-arm64": "0.25.12", "@esbuild/linux-ia32": "0.25.12", "@esbuild/linux-loong64": "0.25.12", "@esbuild/linux-mips64el": "0.25.12", "@esbuild/linux-ppc64": "0.25.12", "@esbuild/linux-riscv64": "0.25.12", "@esbuild/linux-s390x": "0.25.12", "@esbuild/linux-x64": "0.25.12", "@esbuild/netbsd-arm64": "0.25.12", "@esbuild/netbsd-x64": "0.25.12", "@esbuild/openbsd-arm64": "0.25.12", "@esbuild/openbsd-x64": "0.25.12", "@esbuild/openharmony-arm64": "0.25.12", "@esbuild/sunos-x64": "0.25.12", "@esbuild/win32-arm64": "0.25.12", "@esbuild/win32-ia32": "0.25.12", "@esbuild/win32-x64": "0.25.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-east-asian-width": ["get-east-asian-width@1.7.0", "", {}, "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q=="], + + "hachure-fill": ["hachure-fill@0.5.2", "", {}, "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg=="], + + "highlight.js": ["highlight.js@11.12.0", "", {}, "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg=="], + + "html-to-image": ["html-to-image@1.11.13", "", {}, "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg=="], + + "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + + "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], + + "internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="], + + "jotai": ["jotai@2.20.3", "", { "peerDependencies": { "@babel/core": ">=7.0.0", "@babel/template": ">=7.0.0", "@types/react": ">=17.0.0", "react": ">=17.0.0" }, "optionalPeers": ["@babel/core", "@babel/template", "@types/react", "react"] }, "sha512-N8L9FUbeGDP+0qNJw1FebOxt+5hk+jTOwUA2LlRE4C081jUcY6F1T/FSETp4DT2/INMtiSRZyNm2D+yZdzrSgA=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + + "katex": ["katex@0.16.47", "", { "dependencies": { "commander": "^8.3.0" }, "bin": { "katex": "cli.js" } }, "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg=="], + + "khroma": ["khroma@2.1.0", "", {}, "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="], + + "layout-base": ["layout-base@1.0.2", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="], + + "lilconfig": ["lilconfig@3.1.4", "", {}, "sha512-zJZyBmQhArDRefuWTypZxwDpFDIYmrj8ypSBvwGD5P13Y95s6DjzKgu4DVdGbeQa5PDEsAOCAPNk4X+QOR006w=="], + + "lodash-es": ["lodash-es@4.18.1", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="], + + "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "marked": ["marked@16.4.2", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA=="], + + "math-expression-evaluator": ["math-expression-evaluator@1.4.0", "", {}, "sha512-4vRUvPyxdO8cWULGTh9dZWL2tZK6LDBvj+OGHBER7poH9Qdt7kXEoj20wiz4lQUbUXQZFjPbe5mVDo9nutizCw=="], + + "mermaid": ["mermaid@12.2.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^2.0.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "chevrotain": "~13.2.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.4.12", "elkjs": "^0.9.3", "es-toolkit": "^1.45.1", "katex": "^0.18.0", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "sha512-w7nr/SFrLO7BaVTs3dQTvYSV6nYSBj0Yy9DjBhsIJtAcHqRzXSq4Pg32ujHZ/AdWsAMNEvvhbm5dt9E2tOiHzw=="], + + "mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="], + + "modern-tar": ["modern-tar@0.8.6", "", {}, "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], + + "node-releases": ["node-releases@2.0.60", "", {}, "sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ=="], + + "p-limit": ["p-limit@7.3.3", "", { "dependencies": { "yocto-queue": "^1.2.1" } }, "sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ=="], + + "package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], + + "path-data-parser": ["path-data-parser@0.1.0", "", {}, "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], + + "playwright": ["playwright@1.55.0", "", { "dependencies": { "playwright-core": "1.55.0" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-sdCWStblvV1YU909Xqx0DhOjPZE4/5lJsIS84IfN9dAZfcl/CIZ5O8l3o0j7hPMjDvqoTF8ZUcc+i/GL5erstA=="], + + "playwright-core": ["playwright-core@1.55.0", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-GvZs4vU3U5ro2nZpeiwyb0zuFaqb9sUiAJuyrWpcGouD8y9/HLgGbNRjIph7zU9D3hnPaisMl9zG9CgFi/biIg=="], + + "points-on-curve": ["points-on-curve@0.2.0", "", {}, "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A=="], + + "points-on-path": ["points-on-path@0.2.1", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="], + + "postcss": ["postcss@8.5.32", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g=="], + + "puppeteer": ["puppeteer@25.16.0", "", { "dependencies": { "@puppeteer/browsers": "3.2.6", "chromium-bidi": "157.0.8090-0", "devtools-protocol": "0.0.1704951", "lilconfig": "^3.1.3", "puppeteer-core": "25.16.0", "typed-query-selector": "^2.12.3" }, "bin": { "puppeteer": "lib/puppeteer/node/cli.js" } }, "sha512-LOr3reYnxAYYfQkpopz1fQnL0LdvqhpR5U2Fu+QnwzTX2gpVTHsn91UETo5NNC1md2/oC54Zu1ChBXgZDNSP1A=="], + + "puppeteer-core": ["puppeteer-core@25.16.0", "", { "dependencies": { "@puppeteer/browsers": "3.2.6", "chromium-bidi": "157.0.8090-0", "devtools-protocol": "0.0.1704951", "typed-query-selector": "^2.12.3", "webdriver-bidi-protocol": "1.0.1", "ws": "^8.22.0" } }, "sha512-VA5Pf54N8shfopNkZZXCdiiwfnnY8ZJYAMqFQRhlH5mGUhfwf53Ar770GPtdpTDLUqvQeYpIBtC9/G2Jij2IJw=="], + + "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="], + + "react-aria": ["react-aria@3.53.1", "", { "dependencies": { "@internationalized/date": "^3.12.4", "@internationalized/number": "^3.6.9", "@internationalized/string": "^3.2.10", "@react-types/shared": "^3.37.0", "@swc/helpers": "^0.5.0", "aria-hidden": "^1.2.3", "clsx": "^2.0.0", "react-stately": "3.51.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-dikisyOjJd3D2fFrIDWmVWzqiLz5B86GzZv1zxs7xI4dVc0JIz/1Wa52I20gYvVL2WXeFXlygYsle/QcOMhtcg=="], + + "react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="], + + "react-refresh": ["react-refresh@0.17.0", "", {}, "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ=="], + + "react-stately": ["react-stately@3.51.0", "", { "dependencies": { "@internationalized/date": "^3.12.4", "@internationalized/number": "^3.6.9", "@internationalized/string": "^3.2.10", "@react-types/shared": "^3.37.0", "@swc/helpers": "^0.5.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-YJcmkAXu2XOQP97hO/qz/cC3qv9kni3oVhwBlxWr358BHePJUpY15XwL3YSRMKxYt4EkslPqAz11JRirMfANGw=="], + + "react-use-measure": ["react-use-measure@2.1.7", "", { "peerDependencies": { "react": ">=16.13", "react-dom": ">=16.13" }, "optionalPeers": ["react-dom"] }, "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg=="], + + "reduce-css-calc": ["reduce-css-calc@1.3.0", "", { "dependencies": { "balanced-match": "^0.4.2", "math-expression-evaluator": "^1.2.14", "reduce-function-call": "^1.0.1" } }, "sha512-0dVfwYVOlf/LBA2ec4OwQ6p3X9mYxn/wOl2xTcLwjnPYrkgEfPx3VI4eGCH3rQLlPISG5v9I9bkZosKsNRTRKA=="], + + "reduce-function-call": ["reduce-function-call@1.0.3", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Hl/tuV2VDgWgCSEeWMLwxLZqX7OK59eU1guxXsRKTAyeYimivsKdtcV4fu3r710tpG5GmDKDhQ0HSZLExnNmyQ=="], + + "robust-predicates": ["robust-predicates@3.0.3", "", {}, "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="], + + "rollup": ["rollup@4.66.0", "", { "dependencies": { "@types/estree": "1.0.9" }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", "@rollup/rollup-android-arm-eabi": "4.66.0", "@rollup/rollup-android-arm64": "4.66.0", "@rollup/rollup-darwin-arm64": "4.66.0", "@rollup/rollup-darwin-x64": "4.66.0", "@rollup/rollup-freebsd-arm64": "4.66.0", "@rollup/rollup-freebsd-x64": "4.66.0", "@rollup/rollup-linux-arm-gnueabihf": "4.66.0", "@rollup/rollup-linux-arm-musleabihf": "4.66.0", "@rollup/rollup-linux-arm64-gnu": "4.66.0", "@rollup/rollup-linux-arm64-musl": "4.66.0", "@rollup/rollup-linux-loong64-gnu": "4.66.0", "@rollup/rollup-linux-loong64-musl": "4.66.0", "@rollup/rollup-linux-ppc64-gnu": "4.66.0", "@rollup/rollup-linux-ppc64-musl": "4.66.0", "@rollup/rollup-linux-riscv64-gnu": "4.66.0", "@rollup/rollup-linux-riscv64-musl": "4.66.0", "@rollup/rollup-linux-s390x-gnu": "4.66.0", "@rollup/rollup-linux-x64-gnu": "4.66.0", "@rollup/rollup-linux-x64-musl": "4.66.0", "@rollup/rollup-openbsd-x64": "4.66.0", "@rollup/rollup-openharmony-arm64": "4.66.0", "@rollup/rollup-win32-arm64-msvc": "4.66.0", "@rollup/rollup-win32-ia32-msvc": "4.66.0", "@rollup/rollup-win32-x64-gnu": "4.66.0", "@rollup/rollup-win32-x64-msvc": "4.66.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-Onq6/qO4ARhxIs+jYiHE0pYehadLyMECAiGEqQ+0/aWND3+2PmifJIIqBLYtuBODqHTlOUEQFtIVPyCy0Lck7A=="], + + "roughjs": ["roughjs@4.6.6", "", { "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", "points-on-curve": "^0.2.0", "points-on-path": "^0.2.1" } }, "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ=="], + + "rw": ["rw@1.3.3", "", {}, "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="], + + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], + + "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "simple-icons": ["simple-icons@16.34.0", "", {}, "sha512-UTxKn0PVspk84B2hHF3Dqiqht1yDjJmDc/t4cO7PyCQxCMk6OjEu95pnpGjhLaGeQ4qBrGASbefTIe/+czrX7g=="], + + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], + + "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + + "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "stylis": ["stylis@4.4.0", "", {}, "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA=="], + + "tabbable": ["tabbable@6.5.1", "", {}, "sha512-dMCuwDUY6Noz3zVKLefBC4wq+aJV20yc7vWmM7uTNGwtQSFF5kX7OUIUsxuVajz/bdt5Xqdah3/0NLjth+cM5A=="], + + "tailwind-merge": ["tailwind-merge@3.7.0", "", {}, "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA=="], + + "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], + + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], + + "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], + + "ts-dedent": ["ts-dedent@2.3.0", "", {}, "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "typed-query-selector": ["typed-query-selector@2.12.3", "", {}, "sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], + + "update-browserslist-db": ["update-browserslist-db@1.3.4", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A=="], + + "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], + + "uuid": ["uuid@14.0.3", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw=="], + + "vite": ["vite@6.4.5", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4enwjFfi4IwtEh0w+jPzpLVOFQiPHmmzPxcHXQOyEur47o6u0jE573DmGpjA+7irXoMLYRZD5ZaFUEneS3abPg=="], + + "webdriver-bidi-protocol": ["webdriver-bidi-protocol@1.0.1", "", {}, "sha512-WXWs/aXF2a6Al1Z2/V/7Gp2oPZOAAmHjJOTmv4KCXRJ122IMj3tSSMc6a4q3K4QOmhQbse/Ahr+oTVJOU2dUiw=="], + + "wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], + + "ws": ["ws@8.22.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yargs": ["yargs@18.2.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w=="], + + "yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], + + "yocto-queue": ["yocto-queue@1.2.2", "", {}, "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ=="], + + "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], + + "@headlessui/react/@floating-ui/react": ["@floating-ui/react@0.26.28", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.2", "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw=="], + + "@types/d3/@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="], + + "@types/d3/@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], + + "@types/d3/@types/d3-delaunay": ["@types/d3-delaunay@6.0.4", "", {}, "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw=="], + + "@types/d3/@types/d3-format": ["@types/d3-format@3.0.4", "", {}, "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="], + + "@types/d3/@types/d3-geo": ["@types/d3-geo@3.1.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w=="], + + "@types/d3/@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="], + + "@types/d3/@types/d3-scale": ["@types/d3-scale@4.0.9", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="], + + "@types/d3/@types/d3-shape": ["@types/d3-shape@3.2.0", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw=="], + + "@types/d3/@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="], + + "@types/d3/@types/d3-time-format": ["@types/d3-time-format@4.0.3", "", {}, "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg=="], + + "@types/d3-contour/@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="], + + "@types/d3-interpolate/@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], + + "@types/d3-scale/@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="], + + "@types/d3-zoom/@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="], + + "@zenuml/core/marked": ["marked@4.3.0", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A=="], + + "cliui/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "cytoscape-fcose/cose-base": ["cose-base@2.2.0", "", { "dependencies": { "layout-base": "^2.0.0" } }, "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g=="], + + "d3/d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], + + "d3/d3-delaunay": ["d3-delaunay@6.0.4", "", { "dependencies": { "delaunator": "5" } }, "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A=="], + + "d3/d3-format": ["d3-format@3.1.2", "", {}, "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="], + + "d3/d3-geo": ["d3-geo@3.1.1", "", { "dependencies": { "d3-array": "2.5.0 - 3" } }, "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q=="], + + "d3-contour/d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], + + "d3-dsv/commander": ["commander@7.2.0", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="], + + "d3-geo/d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], + + "d3-sankey/d3-array": ["d3-array@2.12.1", "", { "dependencies": { "internmap": "^1.0.0" } }, "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ=="], + + "d3-sankey/d3-shape": ["d3-shape@1.3.7", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="], + + "d3-scale/d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], + + "d3-scale/d3-format": ["d3-format@3.1.2", "", {}, "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="], + + "d3-time/d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], + + "katex/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], + + "mermaid/katex": ["katex@0.18.11", "", { "dependencies": { "commander": "^15.0.0" }, "bin": { "katex": "cli.js" } }, "sha512-yvyz/2VMKqoho/35Hat5w37wIEdWJ5ElVMidTAlWrxr5uW4aBGsEpveTmKh18/zw08v/7lGswCPon4OhqmqrTA=="], + + "reduce-function-call/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "rollup/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "vite/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "@types/d3-zoom/@types/d3-interpolate/@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], + + "cytoscape-fcose/cose-base/layout-base": ["layout-base@2.0.1", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="], + + "d3-sankey/d3-array/internmap": ["internmap@1.0.1", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="], + + "d3-sankey/d3-shape/d3-path": ["d3-path@1.0.9", "", {}, "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="], + } +} diff --git a/cli/apple/resubmit.ts b/cli/apple/resubmit.ts index 66d1944..6bd2406 100644 --- a/cli/apple/resubmit.ts +++ b/cli/apple/resubmit.ts @@ -20,7 +20,7 @@ // `storebound apple submit --build ` (cli/apple/submit.ts) runs the same steps for a first submission: the version // is --version, else the one an open submission holds, else the editable one (Prepare for Submission or rejected). // Under `serve` (the desktop's owner action) the plan table is printed next to the --json result. -import { sellsOn } from '../lib/config'; +import { macosSubmitSkips, sellsOn } from '../lib/config'; import { changeText, RELEASE_TYPE_EDITABLE, releaseTypeChanges, wantedRelease } from '../lib/release-type'; import type { Ctx } from '../lib/ctx'; import { need } from '../lib/ctx'; @@ -86,6 +86,10 @@ export async function submitVersion(ctx: Ctx, mode: 'submit' | 'resubmit'): Prom && ((mode === 'submit' ? SUBMITTABLE_APP : REJECTED_APP).has(stateOf(x)) || back.has(platformOf(x))); platform = pickPlatform(every, fits, undefined, mode === 'submit' ? `a version to submit${want ? ` (${want})` : ''}` : `a rejected version${want ? ` (${want})` : ''}`); } + // the Mac app of a two-platform record may sell nothing and have no Game Center (apple.macos): its submission then + // carries the version and build only + const macSkips = macosSubmitSkips(config, platform); + if (macSkips.iaps && ids.length) { log(TAG, `${ids.length} in-app purchase(s) left out: ${macSkips.iaps}`); ids.length = 0; } const versions = await c.all(versionsPath(appId, platform)); const open = await openSubmissions(c, appId, undefined, platform); const held = new Set(open.filter(s => s.state === 'UNRESOLVED_ISSUES').flatMap(s => s.items.filter(i => i.kind === 'appStoreVersion').map(i => i.versionId))); @@ -125,7 +129,8 @@ export async function submitVersion(ctx: Ctx, mode: 'submit' | 'resubmit'): Prom // Game Center: a build with the entitlement needs the app's Game Center detail and the version's switch, else the // submission answers 409 STATE_ERROR.BUILD_INDICATES_GAME_CENTER_ENABLED (seen live); the same upsert as apple game-center const gcUse = gameCenterInUse(config, root); - const gc = gcUse.inUse ? await readGcSwitch(c, appId, v) : null; + if (gcUse.inUse && macSkips.gameCenter) log(TAG, `Game Center switch left alone: ${macSkips.gameCenter}`); + const gc = gcUse.inUse && !macSkips.gameCenter ? await readGcSwitch(c, appId, v) : null; const gcPlan = gc ? gcSwitchPlan(gc) : []; if (a.has('json')) { printJson({ dryRun: dry, releaseKind: kind.kind, releaseType: relChanges.length ? { changes: relChanges } : null, gameCenter: gcPlan, version: { id: v.id, versionString, platform, state: stateOf(v) }, build, submission: state.choice ?? null, resolve: marks, rows, skipped: plan.skipped, blockers }); diff --git a/cli/lib/config.ts b/cli/lib/config.ts index cd3acd1..0afa907 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -1161,6 +1161,14 @@ export const appleName = (c: Pick): string => c.app export const platformsOf = (c: Pick): Platform[] => c.app.platforms ?? [...(c.apple ? ['ios' as const] : []), ...(c.play ? ['android' as const] : [])]; +/** What a macOS submission leaves out per apple.macos (noIap: the in-app purchases; no gameCenter: the version's Game + * Center switch), with why; nulls for every other platform. Pure. */ +export function macosSubmitSkips(c: Pick, platform: string): { iaps: string | null; gameCenter: string | null } { + if (platform !== 'MAC_OS') return { iaps: null, gameCenter: null }; + return { iaps: c.apple?.macos?.noIap ? 'apple.macos.noIap (the Mac app sells nothing)' : null, + gameCenter: c.apple?.macos?.gameCenter ? null : 'the Mac app has no Game Center (apple.macos.gameCenter is not true)' }; +} + /** Is a catalog item (product / subscription) sold on this store? Pure. */ export const sellsOn = (c: Pick, item: { platforms?: Platform[] }, store: 'apple' | 'play'): boolean => { const p: Platform = store === 'apple' ? 'ios' : 'android'; diff --git a/skills/store-pitfalls/SKILL.md b/skills/store-pitfalls/SKILL.md index 578902c..ec81a14 100644 --- a/skills/store-pitfalls/SKILL.md +++ b/skills/store-pitfalls/SKILL.md @@ -1585,3 +1585,12 @@ that fails without the fix (see CONTRIBUTING.md). 409 itself is treated the same way. `apple testflight distribute --submit-review` prints the line for testers not invited yet. - **Never:** retry the invitation in a loop, or report the added tester as a failure. - **Guard:** `installableBuild` / `noInstallableBuildHint` in `cli/lib/testflight.ts`, `tests/apple-release-gaps.test.ts`. + +## 128. macOS submission of a two-platform app planned the iOS in-app purchases and Game Center + +- **Symptom:** `apple resubmit --platform macos` (and `apple submit`) planned every consumable of the config and a + `gameCenterAppVersions` write for a Mac app that sells nothing and has no Game Center. +- **Do:** set `apple.macos.noIap: true` and leave `apple.macos.gameCenter` unset; a macOS submission then carries the + version and build only, and the dry run names what it left out and why. +- **Never:** attach iOS-only products to the Mac submission or switch Game Center on for a Mac app without it. +- **Guard:** `macosSubmitSkips` in `cli/lib/config.ts`, `tests/resubmit.test.ts`. diff --git a/tests/resubmit.test.ts b/tests/resubmit.test.ts index 54fe538..fa068e6 100644 --- a/tests/resubmit.test.ts +++ b/tests/resubmit.test.ts @@ -215,6 +215,26 @@ describe('apple submit --build (a first submission, the desktop owner action expect(shown(a)).toEqual([]); }); + test('macOS with apple.macos.noIap and no Mac Game Center: version and build only, the skips named', async () => { + fresh(); + s.asc.put({ type: 'appStoreVersions', id: 'ver-m', attributes: { versionString: '2.0.0', appVersionState: 'PREPARE_FOR_SUBMISSION', platform: 'MAC_OS' }, rels: { app: APP } }); + s.asc.put({ type: 'builds', id: 'b-13', attributes: { version: '13', processingState: 'VALID', usesNonExemptEncryption: false }, rels: { app: APP } }); + const p = project({ ...ONE, apple: { ...ONE.apple!, macos: { noIap: true } } }); + const a = s.calls.length; + const r = await capture(() => appleSubmit(p.ctx(['--build', '13', '--platform', 'macos']))); + expect(r.out).toContain('1 in-app purchase(s) left out: apple.macos.noIap'); + expect(r.out).not.toContain('com.example.notes.gems'); + expect(r.out).toMatch(/app version 2\.0\.0/); + expect(shown(a)).toEqual([]); + expect(s.calls.slice(a).some(c => /gameCenter/.test(c.path))).toBe(false); + }); + test('macosSubmitSkips: only MAC_OS, gameCenter true keeps the switch', async () => { + const { macosSubmitSkips } = await import('../cli/lib/config'); + expect(macosSubmitSkips({ apple: { ...ONE.apple!, macos: { noIap: true } } }, 'IOS')).toEqual({ iaps: null, gameCenter: null }); + expect(macosSubmitSkips({ apple: { ...ONE.apple!, macos: { gameCenter: true } } }, 'MAC_OS')).toEqual({ iaps: null, gameCenter: null }); + expect(macosSubmitSkips({ apple: ONE.apple! }, 'MAC_OS').gameCenter).toContain('no Game Center'); + }); + test('--yes: build attached, one draft with the version and the IAP, submitted; a re-run sends nothing', async () => { fresh(); const p = project(ONE); From 83d351cf42b16b3e752d9325cd485b000ff92532 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 02:01:11 +0700 Subject: [PATCH 45/73] storebound 0.8.68: version in package.json and every copy, CHANGELOG 0.8.68 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index d7c9e2f..3462bd3 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.67", + "version": "0.8.68", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index f107b02..fe9a02b 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.67", + "version": "0.8.68", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index c36badf..2af4967 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.67", + "version": "0.8.68", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 978d68e..4f32a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.68 · 2026-11-07 + - Desktop app: `storebound` works in a terminal with only the app installed. On every start the app puts a launcher for its own CLI on the PATH (Windows: `%LOCALAPPDATA%\storebound\bin`, added to the user PATH once; macOS / Linux: `~/.local/bin`, added to `~/.zprofile` / `~/.profile` when missing). An npm / bun install stays first, a file that is not the app's launcher is never overwritten, AppImage runs skip it, `STOREBOUND_NO_CLI_SHIM=1` turns it off. - `apple resubmit` / `apple submit --platform macos`: `apple.macos.noIap` leaves every in-app purchase out of the macOS submission and, without `apple.macos.gameCenter: true`, the Game Center switch is not touched (no `gameCenterAppVersions` call); the dry run names what it left out and why (pitfalls #128). diff --git a/apps/desktop/package.json b/apps/desktop/package.json index cd3f783..5fd0f5f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.67", + "version": "0.8.68", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index b59f665..c93e9ad 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.67" +version = "0.8.68" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index a0d6f88..994394c 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.67" +version = "0.8.68" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 4f84fdb..dcb7aad 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.67", + "version": "0.8.68", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 92aa54d..0f25eb6 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.67", + "version": "0.8.68", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index f5d0387..70d4818 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.67", + "version": "0.8.68", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 9c001d1ca9df1e0590c7a446429d6f5f027514e1 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 02:18:24 +0700 Subject: [PATCH 46/73] play: old testing builds below production listed with their replace command (status, validate); 'Not live yet' instead of 'In review'; commit redone without changesNotSentForReview on the auto-send 400; pitfalls #129 --- CHANGELOG.md | 2 ++ apps/desktop/src/i18n/en.ts | 3 +- apps/desktop/src/i18n/tr.ts | 3 +- apps/desktop/src/ui/kit.tsx | 2 +- cli/lib/portfolio.ts | 6 +++- cli/lib/validate-rules.ts | 2 ++ cli/play/client.ts | 14 ++++++--- cli/play/old-builds.ts | 42 +++++++++++++++++++++++++ cli/play/review-pending.ts | 8 +++++ cli/play/status.ts | 4 ++- skills/store-pitfalls/SKILL.md | 16 ++++++++++ tests/play-old-builds.test.ts | 31 ++++++++++++++++++ tests/play-public-version-match.test.ts | 12 +++---- 13 files changed, 130 insertions(+), 15 deletions(-) create mode 100644 cli/play/old-builds.ts create mode 100644 tests/play-old-builds.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f32a40..92bb873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- Play: `play status` and `validate` list every build still active on a testing track below the production build, with the `play release --version-code -- completed` that replaces it (an old build with a policy issue, e.g. READ_MEDIA_IMAGES, blocks Send changes for review for the whole app). A completed production release the store page does not show yet reads "Not live yet: in review or blocked before review" instead of "In review" (CLI and desktop). A commit with `--not-sent-for-review` that Play answers with 400 "Changes are sent for review automatically" is redone without the parameter (pitfalls #129). + ## 0.8.68 · 2026-11-07 - Desktop app: `storebound` works in a terminal with only the app installed. On every start the app puts a launcher for its own CLI on the PATH (Windows: `%LOCALAPPDATA%\storebound\bin`, added to the user PATH once; macOS / Linux: `~/.local/bin`, added to `~/.zprofile` / `~/.profile` when missing). An npm / bun install stays first, a file that is not the app's launcher is never overwritten, AppImage runs skip it, `STOREBOUND_NO_CLI_SHIM=1` turns it off. diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts index b34f6bb..181d7c2 100644 --- a/apps/desktop/src/i18n/en.ts +++ b/apps/desktop/src/i18n/en.ts @@ -153,7 +153,8 @@ export const en = { 'phase.releasedUnknown': "Couldn't check the store page", 'phase.pageUnknown': "Couldn't check the store page", 'phase.pageStale': "couldn't check the store page, as of {when}", - 'phase.reviewLive': 'In review (live: {version})', + 'phase.reviewLive': 'Not live yet (live: {version}): in review or blocked before review', + 'phase.playPending': 'Not live yet: in review or blocked before review', 'roll.publishReady': 'If the release is approved, publish it in Publishing overview ("Publish N changes"). The agent prepares it with `{cmd}`; the final press is for the owner.', 'roll.publishOpen': 'Open Publishing overview', 'phase.reviewManaged': 'In review / ready to publish (managed publishing)', diff --git a/apps/desktop/src/i18n/tr.ts b/apps/desktop/src/i18n/tr.ts index 03dc74d..417f0dd 100644 --- a/apps/desktop/src/i18n/tr.ts +++ b/apps/desktop/src/i18n/tr.ts @@ -155,7 +155,8 @@ export const tr: Record = { 'phase.releasedUnknown': 'Mağaza sayfası kontrol edilemedi', 'phase.pageUnknown': 'Mağaza sayfası kontrol edilemedi', 'phase.pageStale': 'mağaza sayfası kontrol edilemedi, {when} itibarıyla', - 'phase.reviewLive': 'İncelemede (yayında: {version})', + 'phase.reviewLive': 'Henüz yayında değil (yayında: {version}): incelemede ya da incelemeden önce takıldı', + 'phase.playPending': 'Henüz yayında değil: incelemede ya da incelemeden önce takıldı', 'roll.publishReady': 'Sürüm onaylandıysa Yayınlama özetinde yayınlayın ("Publish N changes"). Ajan `{cmd}` ile hazırlar; son basış sahibine aittir.', 'roll.publishOpen': 'Yayınlama özetini aç', 'phase.reviewManaged': 'İncelemede / yayına hazır (yönetilen yayınlama)', diff --git a/apps/desktop/src/ui/kit.tsx b/apps/desktop/src/ui/kit.tsx index d118760..6e58bff 100644 --- a/apps/desktop/src/ui/kit.tsx +++ b/apps/desktop/src/ui/kit.tsx @@ -25,7 +25,7 @@ export function phaseLabel(r: StoreRelease | null | undefined): { text: string; const stale = r.pageStaleAt ? ` · ${t('phase.pageStale', { when: ago(r.pageStaleAt) })}` : ''; if (r.store === 'android' && r.phase === 'released') return { text: t('phase.pageUnknown') + stale, tone: 'neutral' }; if (r.store === 'android' && (r.phase === 'review' || r.phase === 'sent')) - return { text: (r.managed ? t('phase.reviewManaged') : r.liveVersion ? t('phase.reviewLive', { version: r.liveVersion }) : t('phase.review')) + stale, tone: 'warn' }; + return { text: (r.managed ? t('phase.reviewManaged') : r.liveVersion ? t('phase.reviewLive', { version: r.liveVersion }) : t('phase.playPending')) + stale, tone: 'warn' }; if (r.store === 'android' && r.phase === 'live' && stale) return { text: t('phase.live') + stale, tone: 'ok' }; if (r.phase === 'testing' && r.track) return { text: `${t('phase.testing')} · ${r.track}`, tone: 'info' }; return { text: t(`phase.${r.phase}`), tone: PHASE_TONE[r.phase] }; diff --git a/cli/lib/portfolio.ts b/cli/lib/portfolio.ts index ae906e6..8448f5f 100644 --- a/cli/lib/portfolio.ts +++ b/cli/lib/portfolio.ts @@ -161,11 +161,15 @@ export function playReleases(data: unknown): StoreRelease[] { return out; } +/** A completed Play production release the store page does not show yet. The API has no review state: it may be in + * review, or blocked before review (an old build on another track with a policy issue, pitfall 129). Never "In review". */ +export const PLAY_NOT_LIVE = 'Not live yet: in review or blocked before review (the API cannot tell; see Publishing overview)'; + /** Plain words for a Play release's phase, decided from the store page (CLI text; the desktop has the same words in * i18n, apps/desktop/src/ui/kit.tsx phaseLabel). */ export function playReleaseLabel(r: StoreRelease): string { const base = ((): string => { - if (r.phase === 'review' || r.phase === 'sent') return r.managed ? 'In review / ready to publish (managed publishing)' : r.liveVersion ? `In review (live: ${r.liveVersion})` : 'In review'; + if (r.phase === 'review' || r.phase === 'sent') return r.managed ? 'In review / ready to publish (managed publishing)' : r.liveVersion ? `${PLAY_NOT_LIVE} (live: ${r.liveVersion})` : PLAY_NOT_LIVE; if (r.phase === 'released') return "Couldn't check the store page"; if (r.phase === 'live') return 'Live'; if (r.phase === 'rollout') return `Rolling out ${Math.round((r.fraction ?? 0) * 1000) / 10}%`; diff --git a/cli/lib/validate-rules.ts b/cli/lib/validate-rules.ts index ad3593b..f7854e5 100644 --- a/cli/lib/validate-rules.ts +++ b/cli/lib/validate-rules.ts @@ -1,6 +1,7 @@ // Store readiness rules for `storebound validate`. Pure: the command collects a snapshot from both APIs (read-only), // these functions turn it into an ordered list of findings. Order = the order you would fix things in. +import { oldTrackBuilds } from '../play/old-builds'; import { consoleLink, consoleUrl } from './console-links'; import { describePending, type Pending, repairable } from '../apple/screenshot-health'; import { type FixAction, fixAppleListing, fixPlayListing, fixReviewDetails } from './fix-actions'; @@ -409,6 +410,7 @@ export function playRules(s: PlaySnapshot): Finding[] { if (r.status === 'halted') add('warn', 'tracks', `${t.track}: release ${r.versionCodes.join(',')} is halted`, 'storebound play rollout --resume (owner)'); if (r.status === 'inProgress') add('ok', 'tracks', `${t.track}: rollout ${Math.round((r.userFraction ?? 0) * 100)}% of ${r.versionCodes.join(',')}`); } + for (const o of oldTrackBuilds(s.tracks)) add('warn', 'old-builds', `${o.track}: old build ${o.versionCodes.join(',')} (${o.status}) is still active below production ${o.productionCode}; Play reviews it with every submission and a policy issue in it (e.g. READ_MEDIA_IMAGES / READ_MEDIA_VIDEO) blocks Send changes for review (pitfall 129)`, `storebound play release --version-code ${o.productionCode} ${['internal','alpha','beta'].includes(o.track) ? '--' + o.track : '--track ' + o.track} completed`); if (anyRelease && !f.some(x => x.code === 'tracks')) add('ok', 'tracks', s.tracks.filter(t => t.releases.length).map(t => `${t.track}: ${t.releases.map(r => r.status).join('/')}`).join(', ')); const prods = new Map(s.products.map(p => [p.productId, p] as const)); diff --git a/cli/play/client.ts b/cli/play/client.ts index 81239dd..290b2ea 100644 --- a/cli/play/client.ts +++ b/cli/play/client.ts @@ -7,7 +7,7 @@ import { noteGoogle } from '../lib/quota'; import { AmbiguousWriteError, isAmbiguous, retrySafe } from '../lib/upsert'; import * as rt from '../lib/rt'; import { withMachineLock } from '../lib/lock'; -import { clearPending, isReviewRefused, notSentMessage, publishingUrl, recordPending, withNotSent } from './review-pending'; +import { clearPending, isAutoSendOnly, isReviewRefused, notSentMessage, publishingUrl, recordPending, withNotSent } from './review-pending'; /** A read's edit is gone: replaced by a newer edit of the app, committed elsewhere or expired. */ export const EDIT_GONE = /Edit has been deleted|editAlreadyCommitted|already been committed|edit.*(expired|not found)|outside of this Edit/i; @@ -118,9 +118,15 @@ export async function playClient(root: string, packageName: string) { } }; try { await commit(); } catch (err) { - if (notSent || !isReviewRefused(err)) throw err; - refused(); - await commit(); + if (notSent && isAutoSendOnly(err)) { + notSent = false; + log('play', 'Play answered "Changes are sent for review automatically" (managed publishing is off): committing again without changesNotSentForReview; Play sends the changes for review itself'); + await commit(); + } else { + if (notSent || !isReviewRefused(err)) throw err; + refused(); + await commit(); + } } openEdit = null; log('play', `edit ${id} committed${notSent ? ' with changesNotSentForReview=true' : ''}`); diff --git a/cli/play/old-builds.ts b/cli/play/old-builds.ts new file mode 100644 index 0000000..5b039ec --- /dev/null +++ b/cli/play/old-builds.ts @@ -0,0 +1,42 @@ +// Builds still active on a testing track below the production build (pitfall 129). Play reviews every active build +// with each submission: a policy issue in an old one (a media permission it asked for, "Use alternative system +// pickers") blocks "Send changes for review" for the whole app, while the API still reads production as completed. +// The Developer API cannot read a bundle's permissions, so each old build is named with the command that replaces it. +// Pure. + +export interface TrackLike { track: string; releases?: { name?: string; versionCodes?: string[]; status: string }[] } +export interface OldBuild { track: string; versionCodes: number[]; name: string | null; status: string; productionCode: number } + +/** Permissions Play reviews as policy-sensitive (Photo and video permissions, All files access). */ +export const SENSITIVE_PERMISSIONS = ['READ_MEDIA_IMAGES', 'READ_MEDIA_VIDEO', 'READ_EXTERNAL_STORAGE', 'MANAGE_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE']; + +const ACTIVE = new Set(['completed', 'inProgress', 'halted']); +const codes = (r: { versionCodes?: string[] }): number[] => (r.versionCodes ?? []).map(Number).filter(Number.isFinite); + +export function oldTrackBuilds(tracks: TrackLike[]): OldBuild[] { + const prod = tracks.find(t => t.track === 'production'); + const prodCodes = (prod?.releases ?? []).filter(r => ACTIVE.has(r.status)).flatMap(codes); + if (!prodCodes.length) return []; + const productionCode = Math.max(...prodCodes); + const out: OldBuild[] = []; + for (const t of tracks) { + if (t.track === 'production') continue; + for (const r of t.releases ?? []) { + const cs = codes(r); + if (!ACTIVE.has(r.status) || !cs.length || Math.max(...cs) >= productionCode) continue; + out.push({ track: t.track, versionCodes: cs, name: r.name ?? null, status: r.status, productionCode }); + } + } + return out; +} + +/** The track flag of `play release` for a track name (custom closed tracks go by --track). */ +const trackFlag = (track: string): string => (['internal', 'alpha', 'beta'].includes(track) ? `--${track}` : `--track ${track}`); + +export function oldBuildLines(old: OldBuild[]): string[] { + if (!old.length) return []; + return [ + ` old builds still active (${old.length}): Play reviews them with every submission; a policy issue in one (e.g. ${SENSITIVE_PERMISSIONS.slice(0, 2).join(' / ')}) blocks Send changes for review. The API cannot read their permissions:`, + ...old.map(o => ` ${o.track} [${o.versionCodes.join(',')}] ${o.name ?? ''} ${o.status} -> replace: storebound play release --version-code ${o.productionCode} ${trackFlag(o.track)} completed`), + ]; +} diff --git a/cli/play/review-pending.ts b/cli/play/review-pending.ts index 2bb927d..a7fc809 100644 --- a/cli/play/review-pending.ts +++ b/cli/play/review-pending.ts @@ -25,6 +25,14 @@ export function isReviewRefused(err: unknown): boolean { return reasons.every(r => /badRequest|invalid|failedPrecondition|precondition/i.test(r)); } +/** The opposite 400: with managed publishing off Play refuses changesNotSentForReview=true (live: "Changes are sent for + * review automatically"); the commit is redone without it. "cannot be sent ... automatically" is the other refusal. */ +export function isAutoSendOnly(err: unknown): boolean { + const s = String(err instanceof Error ? err.message : err); + const m = /-> 400 (.*)$/s.exec(s); + return !!m && /are sent for review automatically/i.test(m[1]!); +} + /** The query string with changesNotSentForReview=true added to `base` ("?a=1" or ''). */ export function withNotSent(base: string | undefined, on: boolean): string { const parts = [(base ?? '').replace(/^\?/, ''), on ? 'changesNotSentForReview=true' : ''].filter(Boolean); diff --git a/cli/play/status.ts b/cli/play/status.ts index 74214cc..86b292a 100644 --- a/cli/play/status.ts +++ b/cli/play/status.ts @@ -11,6 +11,7 @@ import { playReleases, playReleaseLabel } from '../lib/portfolio'; import { playClient } from './client'; import { listOneTimeProducts } from './products'; import { readyLines, readyToPublish } from '../lib/play-publish'; +import { oldBuildLines, oldTrackBuilds } from './old-builds'; import { clearPending, pendingLine, publishingUrl, readPending } from './review-pending'; interface Track { track: string; releases?: { name?: string; versionCodes?: string[]; status: string; userFraction?: number }[] } @@ -33,7 +34,7 @@ export async function run(ctx: Ctx): Promise { // the App category is not in the API (edits.details has no category field): a console step const cat = playCategoryOf(config); const category = { config: cat?.category ?? null, source: cat?.source ?? null, api: false, plan: 'storebound console plan play-store-settings' }; - if (ctx.args.has('json')) { printJson({ details, category, tracks, listings, products, publicPage, managedPublishing: config.play?.managedPublishing ?? null, reviewPending, readyToPublish: readyToPublish({ tracks, publicPage, managedPublishing: config.play?.managedPublishing ?? null }) }); return; } + if (ctx.args.has('json')) { printJson({ details, category, tracks, listings, products, publicPage, managedPublishing: config.play?.managedPublishing ?? null, reviewPending, oldBuilds: oldTrackBuilds(tracks), readyToPublish: readyToPublish({ tracks, publicPage, managedPublishing: config.play?.managedPublishing ?? null }) }); return; } console.log(`${play.packageName}\n details: ${details.defaultLanguage} · ${details.contactEmail ?? '-'} · ${details.contactWebsite ?? '-'}`); console.log(` category: ${cat ? `${cat.category} (${cat.source})` : 'not in the config (play.category)'} · not readable by the API: Store settings is a console step (${category.plan})`); console.log(` listings (${listings.length}): ${listings.map(l => l.language).join(', ') || '-'}`); @@ -44,6 +45,7 @@ export async function run(ctx: Ctx): Promise { console.log(` public store page: ${publicPage.state === 'public' ? `published (200), live version ${publicPage.versionName ?? (publicPage.varies ? 'varies with device' : 'not shown')}` : publicPage.state === 'notPublic' ? 'not public yet (404)' : `couldn't check it (${publicPage.error ?? 'not read'})`}${publicPage.stale ? ` (last known, ${publicPage.checkedAt.slice(0, 16).replace('T', ' ')} UTC)` : ''}`); for (const r of playReleases({ tracks, publicPage, managedPublishing: config.play?.managedPublishing ?? null }).filter(x => x.track === 'production')) console.log(` production ${r.version ?? '?'} (${r.build ?? '?'}): ${playReleaseLabel(r)}`); for (const l of readyLines(readyToPublish({ tracks, publicPage, managedPublishing: config.play?.managedPublishing ?? null }))) console.log(l); + for (const l of oldBuildLines(oldTrackBuilds(tracks))) console.log(l); if (pending) console.log(` review: ${pendingLine(pending)}`); console.log(` products (${products.length}):`); for (const p of products) console.log(` ${p.productId.padEnd(40)} ${(p.purchaseOptions ?? []).map(o => `${o.purchaseOptionId}:${o.state ?? '?'}`).join(' ')}`); diff --git a/skills/store-pitfalls/SKILL.md b/skills/store-pitfalls/SKILL.md index ec81a14..5110489 100644 --- a/skills/store-pitfalls/SKILL.md +++ b/skills/store-pitfalls/SKILL.md @@ -1594,3 +1594,19 @@ that fails without the fix (see CONTRIBUTING.md). version and build only, and the dry run names what it left out and why. - **Never:** attach iOS-only products to the Mac submission or switch Game Center on for a Mac app without it. - **Guard:** `macosSubmitSkips` in `cli/lib/config.ts`, `tests/resubmit.test.ts`. + +## 129. Play said "In review" while an old testing build blocked Send changes for review + +- **Symptom:** `play status` showed production as "In review" for days; Publishing overview had "Send changes for + review" greyed out. An old build still active on a testing track (alpha) asked for READ_MEDIA_IMAGES / + READ_MEDIA_VIDEO ("Use alternative system pickers"); the current production build did not. Play reviews every active + build, so the policy issue of the old one held the whole app back. A later commit with `--not-sent-for-review` + answered 400 "Changes are sent for review automatically" (managed publishing off). +- **Do:** replace each old build: `storebound play release --version-code --alpha completed` (or + `--beta`, `--internal`, `--track `); the changes then go into review by themselves. `play status` and + `validate` list every active build below production with that command. +- **Never:** read a completed production release that the store page does not show as "In review": the API has no + review state, so storebound says "Not live yet: in review or blocked before review". +- **Guard:** `cli/play/old-builds.ts` (play status, validate `old-builds`), `PLAY_NOT_LIVE` in `cli/lib/portfolio.ts`, + `isAutoSendOnly` in `cli/play/review-pending.ts` (the commit is redone without changesNotSentForReview), + `tests/play-old-builds.test.ts`. diff --git a/tests/play-old-builds.test.ts b/tests/play-old-builds.test.ts new file mode 100644 index 0000000..e654d97 --- /dev/null +++ b/tests/play-old-builds.test.ts @@ -0,0 +1,31 @@ +import { describe, expect, test } from 'bun:test'; +import { oldBuildLines, oldTrackBuilds } from '../cli/play/old-builds'; +import { isAutoSendOnly, isReviewRefused } from '../cli/play/review-pending'; + +const tracks = [ + { track: 'production', releases: [{ name: '2.0.0 (10)', versionCodes: ['10'], status: 'completed' }] }, + { track: 'alpha', releases: [{ name: '1.0 (2)', versionCodes: ['2'], status: 'completed' }] }, + { track: 'beta', releases: [{ versionCodes: ['10'], status: 'completed' }] }, + { track: 'internal', releases: [{ versionCodes: ['3'], status: 'draft' }] }, + { track: 'qa-closed', releases: [{ versionCodes: ['4'], status: 'completed' }] }, +]; + +describe('old builds on testing tracks (pitfall 129)', () => { + test('active builds below production are listed with the command that replaces them; drafts and current ones are not', () => { + const old = oldTrackBuilds(tracks); + expect(old.map(o => `${o.track}:${o.versionCodes.join(',')}`)).toEqual(['alpha:2', 'qa-closed:4']); + const text = oldBuildLines(old).join('\n'); + expect(text).toContain('storebound play release --version-code 10 --alpha completed'); + expect(text).toContain('--track qa-closed completed'); + }); + test('no production release: nothing to compare', () => { + expect(oldTrackBuilds(tracks.filter(t => t.track !== 'production'))).toEqual([]); + }); + test('the "are sent for review automatically" 400 is told apart from the "cannot be sent" one', () => { + const auto = new Error('POST commit -> 400 {"error":{"message":"Changes are sent for review automatically.","errors":[{"reason":"badRequest"}]}}'); + const refused = new Error('POST commit -> 400 {"error":{"message":"Changes cannot be sent for review automatically.","errors":[{"reason":"badRequest"}]}}'); + expect(isAutoSendOnly(auto)).toBe(true); + expect(isAutoSendOnly(refused)).toBe(false); + expect(isReviewRefused(refused)).toBe(true); + }); +}); diff --git a/tests/play-public-version-match.test.ts b/tests/play-public-version-match.test.ts index 647850e..f756b8b 100644 --- a/tests/play-public-version-match.test.ts +++ b/tests/play-public-version-match.test.ts @@ -7,7 +7,7 @@ import { trainsOf } from '../cli/release'; import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import { clearPlayPublicCache, pageVersion, pageVersionInfo, playPublicPage } from '../cli/lib/play-public'; -import { appleReleases, playReleaseLabel, playReleases, releaseTrains, sameVersion, versionKey } from '../cli/lib/portfolio'; +import { appleReleases, PLAY_NOT_LIVE, playReleaseLabel, playReleases, releaseTrains, sameVersion, versionKey } from '../cli/lib/portfolio'; import { laneOf, laneText, releasePlan, storeNow, versionHistory } from '../cli/lib/train'; const realFetch = globalThis.fetch; @@ -45,7 +45,7 @@ describe('version matching across the stores', () => { expect(p.ios?.release?.version).toBe('1.0'); expect(p.android?.release?.version).toBe('1.0.0'); expect(p.done).toBe(false); - expect(p.android!.steps.map(x => x.text).join(' ')).toContain('1.0: In review'); + expect(p.android!.steps.map(x => x.text).join(' ')).toContain('1.0: Not live yet'); }); }); @@ -53,7 +53,7 @@ describe('Google Play "Live" needs the public store page', () => { test('completed production + page 404 = in review, never live', () => { const [prod] = playReleases(PLAY_STATUS_FIRST_404); expect(prod).toMatchObject({ phase: 'review', state: 'completed', publicPage: 'notPublic', fraction: 1 }); - expect(playReleaseLabel(prod!)).toBe('In review'); + expect(playReleaseLabel(prod!)).toBe(PLAY_NOT_LIVE); const lane = laneOf('android', prod!); expect(lane.at).toBe(2); // the review stage, not live / rollout expect(lane.share).toBeNull(); @@ -77,14 +77,14 @@ describe('Google Play "Live" needs the public store page', () => { expect(playReleaseLabel(r)).toBe('Live'); }); test('rule: page 404, managed publishing off: In review; on: In review / ready to publish', () => { - expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }))).toBe('In review'); + expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }))).toBe(PLAY_NOT_LIVE); expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }, '1.1.0', 'completed', { managedPublishing: true }))).toBe('In review / ready to publish (managed publishing)'); }); test('rule: page live with an older version: In review (live: )', () => { const r = prodRel({ state: 'public', versionName: '1.0.0' }); expect(r).toMatchObject({ phase: 'review', liveVersion: '1.0.0' }); - expect(playReleaseLabel(r)).toBe('In review (live: 1.0.0)'); - expect(laneText(laneOf('android', r))).toBe('in review (live: 1.0.0)'); + expect(playReleaseLabel(r)).toBe(`${PLAY_NOT_LIVE} (live: 1.0.0)`); + expect(laneText(laneOf('android', r))).toBe(`not live yet: in review or blocked before review (the API cannot tell; see Publishing overview) (live: 1.0.0)`); expect(storeNow([r], 'android').now).toBeNull(); }); test('rule: rollout, halted, draft', () => { From 9081ac921d26df004d2ec6b0a26ae1124423df46 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 02:24:27 +0700 Subject: [PATCH 47/73] storebound 0.8.69: version in package.json and every copy, CHANGELOG 0.8.69 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3462bd3..481b325 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.68", + "version": "0.8.69", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index fe9a02b..b37ad5c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.68", + "version": "0.8.69", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 2af4967..f1acf41 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.68", + "version": "0.8.69", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 92bb873..4bdd9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.69 · 2026-11-07 + - Play: `play status` and `validate` list every build still active on a testing track below the production build, with the `play release --version-code -- completed` that replaces it (an old build with a policy issue, e.g. READ_MEDIA_IMAGES, blocks Send changes for review for the whole app). A completed production release the store page does not show yet reads "Not live yet: in review or blocked before review" instead of "In review" (CLI and desktop). A commit with `--not-sent-for-review` that Play answers with 400 "Changes are sent for review automatically" is redone without the parameter (pitfalls #129). ## 0.8.68 · 2026-11-07 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 5fd0f5f..59f7f3a 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.68", + "version": "0.8.69", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index c93e9ad..3b659bc 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.68" +version = "0.8.69" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 994394c..be0124e 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.68" +version = "0.8.69" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index dcb7aad..f9c9d83 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.68", + "version": "0.8.69", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 0f25eb6..cc4fa98 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.68", + "version": "0.8.69", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 70d4818..4951ad7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.68", + "version": "0.8.69", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From b82becf7fb3bf61be4c72bdfabe83e7cb67d44be Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 02:26:11 +0700 Subject: [PATCH 48/73] public MCP: the bare host answers MCP (POST /) and names the connect URL (GET /) --- CHANGELOG.md | 2 ++ cli/mcp-http.ts | 8 +++++++- tests/mcp-public.test.ts | 18 ++++++++++++++++++ tools/desktop-boot-check.ts | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bdd9eb..2383639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- Public MCP server: the bare host is the endpoint too. `POST /` answers MCP like `/mcp` (someone who pastes `https://mcp.example.com` into a connector gets connected), `GET /` names the connect URL. A signed-in server keeps `/` closed. + ## 0.8.69 · 2026-11-07 - Play: `play status` and `validate` list every build still active on a testing track below the production build, with the `play release --version-code -- completed` that replaces it (an old build with a policy issue, e.g. READ_MEDIA_IMAGES, blocks Send changes for review for the whole app). A completed production release the store page does not show yet reads "Not live yet: in review or blocked before review" instead of "In review" (CLI and desktop). A commit with `--not-sent-for-review` that Play answers with 400 "Changes are sent for review automatically" is redone without the parameter (pitfalls #129). diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 3c74e13..d20b184 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -202,7 +202,13 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu if (resourceMeta && o.auth.kind === 'introspect' && req.method === 'GET' && path === new URL(resourceMeta).pathname) return send(res, 200, { resource: o.auth.resource, authorization_servers: [o.auth.issuer], bearer_methods_supported: ['header'], scopes_supported: ['mcp'], resource_name: 'storebound' }); if (path === '/health' && req.method === 'GET') return send(res, 200, { ok: true, version: pkg.version }); - if (path !== '/mcp') return send(res, 404, { error: 'not found' }); + // public: the bare host is the MCP endpoint too (people paste "mcp.example.com" into a connector), and a browser + // opening it gets the connect line instead of a 404 + if (pub && path === '/' && req.method === 'GET') { + res.writeHead(200, { ...cors, 'content-type': 'text/plain; charset=utf-8' }); + return res.end(`storebound MCP server ${pkg.version} (read-only, no key)\nAdd it as a remote MCP server / custom connector with this URL. Claude Code: claude mcp add --transport http storebound \n`); + } + if (path !== '/mcp' && !(pub && path === '/')) return send(res, 404, { error: 'not found' }); if (pub) { if (req.method === 'OPTIONS') return send(res, 204); const hit = pub.limiter.hit(clientKey(req.headers['x-forwarded-for'], req.socket.remoteAddress, pub.trustProxy)); diff --git a/tests/mcp-public.test.ts b/tests/mcp-public.test.ts index c0b141e..26473b2 100644 --- a/tests/mcp-public.test.ts +++ b/tests/mcp-public.test.ts @@ -235,6 +235,24 @@ describe('http, public mode', () => { } finally { s.close(); } }); + test('the bare host is the endpoint too: POST / answers MCP, GET / names the connect URL', async () => { + const s = await startHttp({ ...base, public: { rate: 100, trustProxy: false } }); + try { + const r = await fetch(`http://127.0.0.1:${s.port}/`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' }) }); + expect(r.status).toBe(200); + expect(((await r.json()) as { result: { tools: unknown[] } }).result.tools.length).toBe(6); + const g = await fetch(`http://127.0.0.1:${s.port}/`); + expect(g.status).toBe(200); + expect(await g.text()).toContain('claude mcp add --transport http storebound'); + expect((await fetch(`http://127.0.0.1:${s.port}/other`)).status).toBe(404); + } finally { s.close(); } + }); + + test('a signed-in server keeps / closed', async () => { + const s = await startHttp({ ...base, auth: { kind: 'token', token: 't' } as const }); + try { expect((await fetch(`http://127.0.0.1:${s.port}/`)).status).toBe(404); } finally { s.close(); } + }); + test('429 with Retry-After over the limit; X-Forwarded-For counts only with trustProxy', async () => { const s = await startHttp({ ...base, public: { rate: 2, trustProxy: false } }); try { diff --git a/tools/desktop-boot-check.ts b/tools/desktop-boot-check.ts index cc4d1e4..f239fc4 100644 --- a/tools/desktop-boot-check.ts +++ b/tools/desktop-boot-check.ts @@ -614,7 +614,7 @@ async function runReleaseStateCase(browser: Browser, sidecar: Sidecar, page404: let visited = 0; const text = async (sel = '#content') => (await page.locator(sel).first().innerText().catch(() => '')).replace(/\s+/g, ' '); const crashCheck = async (where: string) => { for (const c of (await state(page)).crash) problems.push(`${where}: error panel ${c}`); }; - const SENT = 'In review'; // decided from the store page: 404 = in review (no uncertain wording) + const SENT = 'Not live yet: in review or blocked before review'; // store page 404: the API has no review state (pitfall 129) try { await page.goto(`http://127.0.0.1:${server.port}/`, { waitUntil: 'load' }); await page.waitForFunction(() => document.documentElement.dataset.booted === '1', null, { timeout: WAIT_MS }).catch(() => problems.push('React never drew the window (no data-booted)')); From 07052cffd2b7293e3d8ba7dec43e172a4446bf7f Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 02:27:53 +0700 Subject: [PATCH 49/73] public MCP: a browser on the bare host goes to the landing page --- CHANGELOG.md | 2 +- cli/mcp-http.ts | 2 ++ tests/mcp-public.test.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2383639..057338a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased -- Public MCP server: the bare host is the endpoint too. `POST /` answers MCP like `/mcp` (someone who pastes `https://mcp.example.com` into a connector gets connected), `GET /` names the connect URL. A signed-in server keeps `/` closed. +- Public MCP server: the bare host is the endpoint too. `POST /` answers MCP like `/mcp` (someone who pastes `https://mcp.example.com` into a connector gets connected), `GET /` sends a browser to the landing page and names the connect URL to any other client. A signed-in server keeps `/` closed. ## 0.8.69 · 2026-11-07 diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index d20b184..8b24a3f 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -205,6 +205,8 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu // public: the bare host is the MCP endpoint too (people paste "mcp.example.com" into a connector), and a browser // opening it gets the connect line instead of a 404 if (pub && path === '/' && req.method === 'GET') { + // a person in a browser goes to the landing page; any other client gets the connect line + if (/text\/html/.test(String(req.headers.accept ?? ''))) { res.writeHead(302, { ...cors, location: 'https://storebound.dev/' }); return res.end(); } res.writeHead(200, { ...cors, 'content-type': 'text/plain; charset=utf-8' }); return res.end(`storebound MCP server ${pkg.version} (read-only, no key)\nAdd it as a remote MCP server / custom connector with this URL. Claude Code: claude mcp add --transport http storebound \n`); } diff --git a/tests/mcp-public.test.ts b/tests/mcp-public.test.ts index 26473b2..aab684e 100644 --- a/tests/mcp-public.test.ts +++ b/tests/mcp-public.test.ts @@ -244,6 +244,9 @@ describe('http, public mode', () => { const g = await fetch(`http://127.0.0.1:${s.port}/`); expect(g.status).toBe(200); expect(await g.text()).toContain('claude mcp add --transport http storebound'); + const b = await fetch(`http://127.0.0.1:${s.port}/`, { headers: { accept: 'text/html,application/xhtml+xml' }, redirect: 'manual' }); + expect(b.status).toBe(302); + expect(b.headers.get('location')).toBe('https://storebound.dev/'); expect((await fetch(`http://127.0.0.1:${s.port}/other`)).status).toBe(404); } finally { s.close(); } }); From d71368e886264a37da679a4a58299d207d0d64a8 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 03:17:41 +0700 Subject: [PATCH 50/73] storebound 0.8.70: version in package.json and every copy, CHANGELOG 0.8.70 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 481b325..954d710 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.69", + "version": "0.8.70", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index b37ad5c..5792d93 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.69", + "version": "0.8.70", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index f1acf41..80468ac 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.69", + "version": "0.8.70", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 057338a..13f5c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.70 · 2026-11-07 + - Public MCP server: the bare host is the endpoint too. `POST /` answers MCP like `/mcp` (someone who pastes `https://mcp.example.com` into a connector gets connected), `GET /` sends a browser to the landing page and names the connect URL to any other client. A signed-in server keeps `/` closed. ## 0.8.69 · 2026-11-07 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 59f7f3a..45bcf24 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.69", + "version": "0.8.70", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 3b659bc..25dcdad 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.69" +version = "0.8.70" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index be0124e..2a2b4dd 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.69" +version = "0.8.70" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index f9c9d83..94ddc56 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.69", + "version": "0.8.70", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index cc4fa98..5bafc60 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.69", + "version": "0.8.70", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 4951ad7..e2a3e5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.69", + "version": "0.8.70", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From f34192b5461d71d8db44886fde823b3f8e7ca55a Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 03:24:03 +0700 Subject: [PATCH 51/73] desktop Portfolio: the Play phase uses the same label as Releases (Not live yet ...) --- apps/desktop/src/screens/Portfolio.tsx | 4 ++-- bun.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/screens/Portfolio.tsx b/apps/desktop/src/screens/Portfolio.tsx index 27eb5b0..2a0b7c0 100644 --- a/apps/desktop/src/screens/Portfolio.tsx +++ b/apps/desktop/src/screens/Portfolio.tsx @@ -24,7 +24,7 @@ import { useExports } from '../ui/Exports'; import { Icon, StoreGlyph } from '../ui/icons'; import { nextStep, Pipeline, tintStyle, useShots, useTint } from '../ui/ds'; export { nextStep } from '../ui/ds'; -import { AppIcon, Card, Chip, Empty, Kpi, Notice, PhaseChip, Seg, Skeleton, Sparkline, StudioMark } from '../ui/kit'; +import { AppIcon, Card, Chip, Empty, Kpi, Notice, PhaseChip, phaseLabel, Seg, Skeleton, Sparkline, StudioMark } from '../ui/kit'; /** Tag of one app's offline config check. */ export function checkState(e: Pick | undefined): { text: string; tone: Tone } { @@ -72,7 +72,7 @@ function NextCell({ e }: { e: AppStatus | undefined }) { {n.version}
{n.ios && {t(`phase.${n.ios.phase}`)}} - {n.android && {t(`phase.${n.android.phase}`)}} + {n.android && {phaseLabel(n.android).text}}
); diff --git a/bun.lock b/bun.lock index f43b978..8f47990 100644 --- a/bun.lock +++ b/bun.lock @@ -22,7 +22,7 @@ }, "apps/desktop": { "name": "@storebound/desktop", - "version": "0.8.67", + "version": "0.8.69", "dependencies": { "@phosphor-icons/react": "^2.1.10", "@tauri-apps/api": "^2.12.0", From ec381e86641bc0273cd85cf4c8e1a3c3a398084d Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 03:25:13 +0700 Subject: [PATCH 52/73] boot check: the portfolio with a Play page 404 counts no live version --- tools/desktop-boot-check.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/desktop-boot-check.ts b/tools/desktop-boot-check.ts index f239fc4..4c86acf 100644 --- a/tools/desktop-boot-check.ts +++ b/tools/desktop-boot-check.ts @@ -622,9 +622,10 @@ async function runReleaseStateCase(browser: Browser, sidecar: Sidecar, page404: const wizard = page.locator('.wizard[role="dialog"]'); if (await wizard.count()) { await wizard.press('Escape').catch(() => {}); await gone(page, '.wizard[role="dialog"]'); } // the portfolio: Play's cell names the state, never "Live" while the page is 404 - await shows(page, '#content', page404 ? SENT : '1.0.0'); + // (the overview counts it with the reviews; its own words are on Releases, checked below) + await shows(page, '#content', '1.0.0'); const pf = await text(); - if (page404 && !pf.includes(SENT)) problems.push(`Portfolio: no "${SENT}"`); + if (page404 && !pf.includes('Live versions 0')) problems.push('Portfolio: Play counted as live while its store page is 404'); await crashCheck('Portfolio'); visited++; const item = page.locator('nav.side .nav-app').filter({ hasText: /Prism Puddle|demo-game/ }).first(); From 01ea264a21d7ccf27b3dbbbde9d7bcd28f6c33e8 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 03:30:40 +0700 Subject: [PATCH 53/73] CHANGELOG: 0.8.71 summary (0.8.69 and 0.8.70 were not published) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f5c0a..c13ec4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- 0.8.69 and 0.8.70 were tagged but not published (the desktop release check stopped them); 0.8.71 ships both sections below. Desktop Portfolio: the Play state of an app uses the same words as Releases ("Not live yet: in review or blocked before review"). + ## 0.8.70 · 2026-11-07 - Public MCP server: the bare host is the endpoint too. `POST /` answers MCP like `/mcp` (someone who pastes `https://mcp.example.com` into a connector gets connected), `GET /` sends a browser to the landing page and names the connect URL to any other client. A signed-in server keeps `/` closed. From b1043f5d79f916262c25afad238a1738d29bfc20 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 03:33:21 +0700 Subject: [PATCH 54/73] storebound 0.8.71: version in package.json and every copy, CHANGELOG 0.8.71 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 954d710..d043258 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.70", + "version": "0.8.71", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5792d93..500cd9c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.70", + "version": "0.8.71", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 80468ac..de2766c 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.70", + "version": "0.8.71", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index c13ec4a..2651ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.71 · 2026-11-07 + - 0.8.69 and 0.8.70 were tagged but not published (the desktop release check stopped them); 0.8.71 ships both sections below. Desktop Portfolio: the Play state of an app uses the same words as Releases ("Not live yet: in review or blocked before review"). ## 0.8.70 · 2026-11-07 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 45bcf24..f751247 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.70", + "version": "0.8.71", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 25dcdad..0e0a53d 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.70" +version = "0.8.71" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 2a2b4dd..63d4b68 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.70" +version = "0.8.71" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 94ddc56..71b964e 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.70", + "version": "0.8.71", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 5bafc60..f425eaf 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.70", + "version": "0.8.71", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index e2a3e5b..0593b88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.70", + "version": "0.8.71", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 73a962fbdc2ec576052290d3583f90a2d9ac2975 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 14:19:12 +0700 Subject: [PATCH 55/73] apple screenshots: iPhone Duo through the App Asset Library (IPHONE_DUO placement group, APP_SCREENSHOT), pitfall 130 --- CHANGELOG.md | 3 + cli/apple/duo-library.ts | 113 ++++++++++++++++++++++++++++++ cli/apple/screenshots.ts | 24 ++++--- cli/lib/config.ts | 4 +- cli/shots/spec.ts | 9 ++- docs/HANDOFF.md | 3 +- docs/store-art.md | 3 +- skills/store-pitfalls/SKILL.md | 16 +++++ skills/store-screenshots/SKILL.md | 7 +- tests/ppo.test.ts | 24 +++++-- 10 files changed, 174 insertions(+), 32 deletions(-) create mode 100644 cli/apple/duo-library.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2651ed5..8c13b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Unreleased +- **iPhone Duo screenshots upload.** `apple screenshots` now sends them through the App Asset Library (display class + IPHONE_DUO, placement APP_SCREENSHOT) instead of skipping them as "not in the API" (pitfall 130). + ## 0.8.71 · 2026-11-07 - 0.8.69 and 0.8.70 were tagged but not published (the desktop release check stopped them); 0.8.71 ships both sections below. Desktop Portfolio: the Play state of an app uses the same words as Releases ("Not live yet: in review or blocked before review"). diff --git a/cli/apple/duo-library.ts b/cli/apple/duo-library.ts new file mode 100644 index 0000000..86c620e --- /dev/null +++ b/cli/apple/duo-library.ts @@ -0,0 +1,113 @@ +// iPhone Duo screenshots through the App Asset Library (App Store Connect API 4.5.1, pitfall 130). ScreenshotDisplayType +// has no Duo value and never will: Apple added the display class IPHONE_DUO only to AppAssetLibraryDisplayClass and +// deprecated appScreenshotSets / appScreenshots in the same release. Flow: +// 1. GET /v1/appAssetLibraryRefData?filter[placementTypes]=APP_SCREENSHOT -> the iOS placementProfileGroup whose +// displayClassId is IPHONE_DUO (its id is the placementGroup of every Duo screenshot); +// 2. each file is uploaded once to the app's library (POST appAssetLibraryImages, category +// APP_SCREENSHOTS_AND_PREVIEWS, referenceName "storebound ", the same MD5 reuse as creative assets); +// 3. POST appAssetLibraryPlacements (placementType APP_SCREENSHOT, placementGroup, the version localization). +// Screenshots are reviewed with the version, so a processed asset is placed at once (no approval wait). +// Upsert: a group whose placements already show the local files in order is left alone; otherwise its placements are +// removed and the files placed in order (outer display files first, then inner; at most 10). Read back at the end. +import { readFileSync } from 'node:fs'; +import { basename } from 'node:path'; +import { log, warn } from '../lib/log'; +import { elapsed } from '../lib/progress'; +import { classify, pickAsset, processingTiming, REF, selectable } from './creative-assets'; +import { type Asc, md5, type J } from './asc'; +import { partHeaders } from './screenshot-health'; + +const TAG = 'apple'; +export const DUO_CATEGORY = 'APP_SCREENSHOTS_AND_PREVIEWS'; +export const DUO_MAX = 10; +const sumOf = (a: J | undefined): string | undefined => /^storebound ([0-9a-f]{32})$/.exec(String(a?.attributes?.referenceName ?? ''))?.[1]; + +/** iOS placement profile group ids of the IPHONE_DUO display class in an appAssetLibraryRefData response. Pure. */ +export function duoGroups(refData: J[]): string[] { + const ids = new Set(); + for (const r of refData) for (const g of (r?.attributes?.placementProfileGroups ?? []) as J[]) + if (g?.displayClassId === 'IPHONE_DUO' && (!g.platform || g.platform === 'IOS') && g.placementProfileGroupId) ids.add(String(g.placementProfileGroupId)); + return [...ids]; +} + +/** Whether a group's current placements (asset MD5s in order) already show `want`. Pure. */ +export const duoUpToDate = (shown: (string | undefined)[], want: string[]): boolean => shown.length === want.length && shown.every((s, i) => s === want[i]); + +export interface DuoResult { locale: string; action: 'keep' | 'place' | 'wait' | 'refuse' | 'plan'; files: number } + +/** Resolves the Duo placement group once per run; throws with the guardrail text when the API lists none. */ +export async function duoGroup(c: Asc): Promise { + const ref = await c.all('/v1/appAssetLibraryRefData?filter[placementTypes]=APP_SCREENSHOT'); + const g = duoGroups(ref); + if (!g.length) throw new Error('appAssetLibraryRefData lists no iOS IPHONE_DUO placement group for APP_SCREENSHOT: report it (pitfall 130); the console version page > App Previews and Screenshots > iPhone Duo takes them meanwhile'); + if (g.length > 1) log(TAG, `iPhone Duo: ${g.length} placement groups (${g.join(', ')}), using ${g[0]}`); + return g[0]!; +} + +/** Makes the iPhone Duo screenshots of one version localization show `files` in order. */ +export async function syncDuo(c: Asc, o: { appId: string; group: string; loc: J; files: string[]; dry: boolean }): Promise { + const locale: string = o.loc.attributes.locale; + const tag = `${locale} IPHONE_DUO`; + const files = o.files.slice(0, DUO_MAX); + if (o.files.length > DUO_MAX) warn(TAG, `${tag}: ${o.files.length} files, only the first ${DUO_MAX} are used`); + const lib = (await c.asc('GET', `/v1/apps/${o.appId}/assetLibrary`)).data as J; + const library = () => c.all(`/v1/appAssetLibraries/${lib.id}/images?filter[category]=${DUO_CATEGORY}&limit=200`); + let assets = await library(); + const want = files.map(f => md5(readFileSync(f))); + const placedAll = await c.all(`/v1/appStoreVersionLocalizations/${o.loc.id}/placements?filter[placementType]=APP_SCREENSHOT&include=image`); + const placed = placedAll.filter(p => p.attributes?.placementGroup === o.group); + const shown = placed.map(p => sumOf(assets.find(a => a.id === p.relationships?.image?.data?.id))); + if (duoUpToDate(shown, want)) { log(TAG, `${tag}: ${files.length} up to date`); return { locale, action: 'keep', files: files.length }; } + if (o.dry) { + const up = want.filter(s => !pickAsset(assets, s).asset).length; + log(TAG, `${tag}: would ${placed.length ? `replace ${placed.length} placed` : 'place'} ${files.length} screenshot(s) through the Asset Library (${up} to upload)`); + return { locale, action: 'plan', files: files.length }; + } + const chosen: J[] = []; + for (let i = 0; i < files.length; i++) { + const f = files[i]!, sum = want[i]!; + const pick = pickAsset(assets, sum); + if (pick.refuse) { warn(TAG, `${tag} ${basename(f)}: ${pick.refuse}`); return { locale, action: 'refuse', files: files.length }; } + let a = pick.asset; + if (!a) { log(TAG, `${tag}: uploading ${basename(f)} to the Asset Library`); a = await uploadImage(c, lib.id, f, sum); assets = await library(); a = pickAsset(assets, sum).asset ?? a; } + else if (pick.unarchive) a = (await c.asc('PATCH', `/v1/${a.type}/${a.id}`, { data: { type: a.type, id: a.id, attributes: { archived: false } } })).data as J; + a = await processed(c, a, `${tag} ${basename(f)}`); + const cls = classify(a.attributes?.state); + if (cls === 'processing') return { locale, action: 'wait', files: files.length }; + if (!selectable(cls)) { warn(TAG, `${tag} ${basename(f)}: ${a.attributes?.state}; nothing changed`); return { locale, action: 'refuse', files: files.length }; } + chosen.push(a); + } + // every file is ready before the old placements go, so a failed upload leaves the page as it was + for (const p of placed) await c.asc('DELETE', `/v1/appAssetLibraryPlacements/${p.id}`); + for (const a of chosen) await c.asc('POST', '/v1/appAssetLibraryPlacements', { data: { type: 'appAssetLibraryPlacements', attributes: { placementType: 'APP_SCREENSHOT', placementGroup: o.group }, + relationships: { image: { data: { type: 'appAssetLibraryImages', id: a.id } }, appStoreVersionLocalization: { data: { type: 'appStoreVersionLocalizations', id: o.loc.id } } } } }); + const now = (await c.all(`/v1/appStoreVersionLocalizations/${o.loc.id}/placements?filter[placementType]=APP_SCREENSHOT&include=image`)).filter(p => p.attributes?.placementGroup === o.group); + const ids = now.map(p => p.relationships?.image?.data?.id); + if (ids.length !== chosen.length || chosen.some(a => !ids.includes(a.id))) { warn(TAG, `${tag}: read back ${ids.length} placements, wanted ${chosen.length}`); process.exitCode = 1; } + else log(TAG, `${tag}: placed ${chosen.length} (removed ${placed.length})`); + return { locale, action: 'place', files: chosen.length }; +} + +async function uploadImage(c: Asc, libId: string, file: string, sum: string): Promise { + const buf = readFileSync(file); + const type = 'appAssetLibraryImages'; + const res = (await c.asc('POST', `/v1/${type}`, { data: { type, attributes: { fileName: basename(file), fileSize: buf.length, category: DUO_CATEGORY, referenceName: REF(sum) }, + relationships: { assetLibrary: { data: { type: 'appAssetLibraries', id: libId } } } } })).data as J; + for (const op of (res.attributes.uploadOperations ?? []) as J[]) { + const r = await fetch(op.url, { method: op.method, headers: partHeaders(op), body: buf.subarray(op.offset, op.offset + op.length), signal: AbortSignal.timeout(300_000) }); + if (r.status < 200 || r.status > 299) { await c.asc('DELETE', `/v1/${type}/${res.id}`).catch(() => {}); throw new Error(`upload ${basename(file)} part ${op.offset} -> ${r.status} (reservation deleted, nothing committed)`); } + } + return (await c.asc('PATCH', `/v1/${type}/${res.id}`, { data: { type, id: res.id, attributes: { uploaded: true } } })).data as J; +} + +async function processed(c: Asc, a: J, label: string): Promise { + const t0 = Date.now(); + let beat = t0, cur = a; + while (classify(cur.attributes?.state) === 'processing') { + if (Date.now() - t0 >= processingTiming.timeoutMs) { warn(TAG, `${label}: still ${cur.attributes?.state ?? 'processing'} after ${elapsed(Date.now() - t0)}; re-run later to place it`); return cur; } + await processingTiming.sleep(processingTiming.pollMs); + cur = ((await c.maybe(`/v1/${cur.type}/${cur.id}`))?.data as J) ?? cur; + if (Date.now() - beat >= processingTiming.heartbeatMs) { beat = Date.now(); log(TAG, `${label}: processing (${cur.attributes?.state}, ${elapsed(Date.now() - t0)})`); } + } + return cur; +} diff --git a/cli/apple/screenshots.ts b/cli/apple/screenshots.ts index bc7bfce..fc2adb6 100644 --- a/cli/apple/screenshots.ts +++ b/cli/apple/screenshots.ts @@ -6,7 +6,7 @@ // ios65/NN.png (6.5", 1284 x 2778 -> APP_IPHONE_65) and, only with apple.ipad, ipad13/NN.png (13" iPad, 2064 x 2752 -> // APP_IPAD_PRO_3GEN_129: the API has no "13 inch" value, the 13" display set keeps the 3rd gen 12.9" name). With // --platform macos (or when only the macOS version is editable) and apple.mac: mac/NN.png (2880 x 1800 -> APP_DESKTOP) -// to the macOS version. iPhone Duo sets are skipped with the console deep link (no API display type yet). Up to 10 +// to the macOS version. iPhone Duo (apple.iphoneDuo: iphone-duo-outer/ then iphone-duo-inner/) goes through the App Asset Library. Up to 10 // per set. --variant uploads ///... instead (an A/B variant from shots.variants, e.g. for a // Product Page Optimization treatment you then set up in App Store Connect). Apple processes uploads asynchronously; failed // ones are reported at the end. Long: run in the background with a log file. @@ -20,7 +20,8 @@ import { variantRoot } from '../shots/lib'; import { findOrCreate } from '../lib/upsert'; import { pulledChecksum } from '../lib/art-pull'; import { consoleLink } from '../lib/console-links'; -import { IPHONE_DUO_DISPLAY, IPHONE_DUO_NOT_IN_API } from '../shots/spec'; +import { IPHONE_DUO_DISPLAY } from '../shots/spec'; +import { duoGroup, syncDuo } from './duo-library'; import { type Asc, ascClient, EDITABLE, keptPrefix, md5, setUpToDate, type J } from './asc'; import { pendingScreenshots, repairPlan, repairSet, setRows, updateLedger } from './screenshot-health'; import { allVersions, parsePlatform, pickPlatform, platformLabel, stateOf, versionLabel } from './platform'; @@ -42,12 +43,9 @@ export const displaySets = (apple: { ipad?: boolean; iphoneMedium?: boolean; iph platform === 'MAC_OS' ? (apple?.mac ? MAC_DISPLAY : {}) : ({ ...DISPLAY, ...(apple?.iphoneMedium ? MEDIUM_DISPLAY : {}), ...(apple?.ipad ? IPAD_DISPLAY : {}), ...(apple?.iphoneDuo ? Object.fromEntries(Object.entries(IPHONE_DUO_DISPLAY).filter((e): e is [string, string] => !!e[1])) : {}) }); -/** iPhone Duo size keys `apple screenshots` skips (apple.iphoneDuo on, no API display type yet), with the message. */ -export function skippedDuoSets(apple: { iphoneDuo?: boolean; appId?: string } | undefined): { dirs: string[]; msg: string } | null { - const dirs = apple?.iphoneDuo ? Object.entries(IPHONE_DUO_DISPLAY).filter(([, t]) => !t).map(([k]) => k) : []; - // the console takes them (its own "iPhone Duo" tab): send the owner straight to the version page - return dirs.length ? { dirs, msg: `${dirs.join(', ')}: ${IPHONE_DUO_NOT_IN_API}. Add them in ${consoleLink('asc.version', '> App Previews and Screenshots > iPhone Duo', { appleAppId: apple?.appId })}` } : null; -} +/** iPhone Duo size keys (render folders) `apple screenshots` uploads through the App Asset Library (no + * ScreenshotDisplayType exists for Duo: cli/apple/duo-library.ts, pitfall 130), outer display first. */ +export const duoDirs = (apple: { iphoneDuo?: boolean } | undefined): string[] => (apple?.iphoneDuo ? Object.keys(IPHONE_DUO_DISPLAY) : []); /** Display types `validate` requires on every locale: apple.screenshotTypes, else the classes App Store Connect's * "App Previews and Screenshots" tab lists (October 2026): iPhone with Dynamic Island (medium display), filled by @@ -98,8 +96,9 @@ export async function run(ctx: Ctx): Promise { const version = await c.editableVersion(platform); if (!version) throw new Error(`no editable ${platformLabel(platform)} App Store version (run apple listing --version x.y.z first)`); log('apple', `screenshots for version ${versionLabel(version)}`); - const duoSkip = platform === 'MAC_OS' ? null : skippedDuoSets(config.apple); - if (duoSkip) warn('apple', duoSkip.msg); + const duo = platform === 'MAC_OS' ? [] : duoDirs(config.apple); + const duoGroupId = duo.length ? await duoGroup(c) : ''; + const appId = duo.length ? await c.app() : ''; if (platform === 'MAC_OS' && !config.apple?.mac) throw new Error('macOS version: set apple.mac: true and render the mac size (storebound shots render --size mac) first'); if (platform !== 'MAC_OS' && config.apple?.mac) log('apple', 'Mac screenshots (mac/, APP_DESKTOP) go to the macOS version: run apple screenshots --platform macos'); const langOf = byAppleLocale(config.languages); @@ -127,6 +126,11 @@ export async function run(ctx: Ctx): Promise { if (!existsSync(d) || !files.length) { warn('apple', `${locale}: nothing in ${d}, skipped`); continue; } await syncSet(loc.id, sets, type, files, `${locale} ${type}`); } + if (duo.length) { + const files = duo.flatMap(dir => numberedImages(join(src, lang.id, dir)).filter(f => f.endsWith('.png'))); + if (!files.length) warn('apple', `${locale}: nothing in ${duo.map(d => join(src, lang.id, d)).join(' or ')}, iPhone Duo skipped`); + else await syncDuo(c, { appId, group: duoGroupId, loc, files, dry: ctx.args.has('dry') }); + } }); } log('apple', `${tasks.length} locales, ${jobs} in parallel`); diff --git a/cli/lib/config.ts b/cli/lib/config.ts index 0afa907..74313a6 100644 --- a/cli/lib/config.ts +++ b/cli/lib/config.ts @@ -700,8 +700,8 @@ export interface ShipConfig { */ iphoneMedium?: boolean; /** Also render and check iPhone Duo (foldable) screenshots: outer 1398 x 2034 and inner 2007 x 2853 (landscape too). - * Optional now, reportedly required from April 2027 for iOS 27.1 SDK builds. Not uploaded while the API has no - * display type for them (cli/shots/spec.ts IPHONE_DUO_DISPLAY). */ + * Optional now, reportedly required from April 2027 for iOS 27.1 SDK builds. `apple screenshots` uploads them through + * the App Asset Library (display class IPHONE_DUO; there is no Duo ScreenshotDisplayType). */ iphoneDuo?: boolean; /** Also render, check and upload Mac App Store screenshots (size key `mac`, 2880 x 1800, 16:10; Apple also takes * 2560 x 1600, 1440 x 900, 1280 x 800). Landscape layout from //landscape/ (shots.landscape). Uploaded diff --git a/cli/shots/spec.ts b/cli/shots/spec.ts index 40ae395..bd67387 100644 --- a/cli/shots/spec.ts +++ b/cli/shots/spec.ts @@ -61,11 +61,10 @@ export const IMAGE_SPECS: Record = { feature: { store: 'play', type: 'featureGraphic', label: 'Play feature graphic', sizes: [[1024, 500]], min: 1, max: 1, maxBytes: 15 * MB, alpha: false }, }; -/** ASC screenshotDisplayType per iPhone Duo size key. null = NOT IN THE API YET: ScreenshotDisplayType in App Store - * Connect API 4.5.1 (spec re-checked 2026-10-20: the published zip is still the 2026-10-06 one, same sha256) has no Duo value (only AppAssetLibraryDisplayClass lists IPHONE_DUO). - * When Apple adds it: regenerate (bun tools/gen-api.ts) and put the exact enum names here; uploads then include them. */ +/** iPhone Duo size keys. Values stay null: ScreenshotDisplayType has no Duo value and never will (API 4.5.1 put the + * display class IPHONE_DUO into the App Asset Library only and deprecated screenshot sets); apple screenshots + * uploads Duo through the library (cli/apple/duo-library.ts, pitfall 130). */ export const IPHONE_DUO_DISPLAY: Record = { 'iphone-duo-outer': null, 'iphone-duo-inner': null }; -export const IPHONE_DUO_NOT_IN_API = 'not uploaded: the App Store Connect API has no iPhone Duo display type yet (the console takes them); the renders stay in store/renders'; /** Reportedly required from this date for apps built with the iOS 27.1 SDK or later. */ export const IPHONE_DUO_REQUIRED_FROM = '2027-04-01'; const PLAY_FOLDABLE = 'Google Play has no foldable slot: foldables show the 7" / 10" tablet screenshots (tab7, tab10, play.tablets)'; @@ -75,7 +74,7 @@ const PLAY_FOLDABLE = 'Google Play has no foldable slot: foldables show the 7" / export function iphoneDuoNote(o: { apple: boolean; duo: boolean; play?: boolean; today?: Date }): { level: 'info' | 'warn'; msg: string } | null { if (!o.apple || o.duo) return null; const late = (o.today ?? new Date()).toISOString().slice(0, 10) >= IPHONE_DUO_REQUIRED_FROM; - return { level: late ? 'warn' : 'info', msg: `no iPhone Duo screenshots (outer 1398x2034, inner 2007x2853; apple.iphoneDuo): optional now, required from April 2027 for iOS 27.1 SDK builds; the App Store Connect console takes Duo screenshots and previews, the API does not yet (apple screenshots skips them with the console link)${o.play ? `. ${PLAY_FOLDABLE}` : ''}` }; + return { level: late ? 'warn' : 'info', msg: `no iPhone Duo screenshots (outer 1398x2034, inner 2007x2853; apple.iphoneDuo): optional now, required from April 2027 for iOS 27.1 SDK builds; apple screenshots uploads them through the App Asset Library (display class IPHONE_DUO)${o.play ? `. ${PLAY_FOLDABLE}` : ''}` }; } /** validate / check note for an app with a macOS version but no Mac screenshots (apple.mac off or no mac renders). */ diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index a4a4abd..e3dbda5 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -27,8 +27,7 @@ State of storebound for whoever picks it up next. Public-safe: no project, app o - The Play Games Services console page paths. - The Games Configuration API bodies (no pinned spec). - Placing a Header and Search Results asset on a live App Store version. -- **iPhone Duo:** App Store Connect's API has no Duo screenshot type yet. Uploads skip with a console link; wire it - when the spec gains the type (`IPHONE_DUO_DISPLAY` in `cli/shots/spec.ts`). +- **iPhone Duo:** uploaded through the App Asset Library (`cli/apple/duo-library.ts`); previews still use the deprecated sets. ## Rules that matter here diff --git a/docs/store-art.md b/docs/store-art.md index 3ed9fba..35a7a05 100644 --- a/docs/store-art.md +++ b/docs/store-art.md @@ -82,8 +82,7 @@ languages, every store size, a review gallery and an app preview video. No store Play takes a YouTube URL in `play.video`. 7. **iPhone Duo (foldable).** `apple.iphoneDuo: true` renders and checks the outer (1398 x 2034) and inner (2007 x 2853) sets. Optional now, reportedly required from April 2027 for iOS 27.1 SDK builds (`check` / `validate` - note it). The API has no Duo display type yet, so `apple screenshots` skips them with a link to the console's - iPhone Duo tab. Play has no foldable slot: foldables use the 7" / 10" tablet sets. + note it). `apple screenshots` uploads them through the App Asset Library (display class IPHONE_DUO). Play has no foldable slot: foldables use the 7" / 10" tablet sets. Details: the [store-screenshots](../skills/store-screenshots/SKILL.md) and [app-previews](../skills/app-previews/SKILL.md) skills. diff --git a/skills/store-pitfalls/SKILL.md b/skills/store-pitfalls/SKILL.md index 5110489..956e371 100644 --- a/skills/store-pitfalls/SKILL.md +++ b/skills/store-pitfalls/SKILL.md @@ -1610,3 +1610,19 @@ that fails without the fix (see CONTRIBUTING.md). - **Guard:** `cli/play/old-builds.ts` (play status, validate `old-builds`), `PLAY_NOT_LIVE` in `cli/lib/portfolio.ts`, `isAutoSendOnly` in `cli/play/review-pending.ts` (the commit is redone without changesNotSentForReview), `tests/play-old-builds.test.ts`. + +## 130. iPhone Duo screenshots were skipped as "not in the API" + +- **Symptom:** `apple screenshots` skipped the iPhone Duo sets with "the API has no iPhone Duo display type yet". + Wrong: ScreenshotDisplayType never gets a Duo value. API 4.5.1 put the display class `IPHONE_DUO` into the App Asset + Library (AppAssetLibraryDisplayClass) and deprecated appScreenshotSets / appScreenshots / appPreviewSets / + appPreviews in the same release. +- **Do:** `storebound apple screenshots` uploads Duo (apple.iphoneDuo, renders iphone-duo-outer/ then + iphone-duo-inner/) through the library: `appAssetLibraryRefData` (filter placementTypes APP_SCREENSHOT) gives the + iOS placementProfileGroup of IPHONE_DUO, files go up as appAssetLibraryImages (category + APP_SCREENSHOTS_AND_PREVIEWS), then appAssetLibraryPlacements (APP_SCREENSHOT, that placementGroup, the version + localization). Same MD5 reuse as creative assets; read back. +- **Never:** say an API lacks a store feature after checking one enum: search the whole spec (every schema with the + feature's name) first. +- **Guard:** `cli/apple/duo-library.ts` (duoGroups, syncDuo), `duoDirs` in `cli/apple/screenshots.ts`, + `tests/ppo.test.ts`. Previews and the other display classes still use the deprecated sets until they move too. diff --git a/skills/store-screenshots/SKILL.md b/skills/store-screenshots/SKILL.md index ad3d9f7..f0d9a5d 100644 --- a/skills/store-screenshots/SKILL.md +++ b/skills/store-screenshots/SKILL.md @@ -71,10 +71,9 @@ in a plain Android tablet body instead of the iPad one. outer (1398 x 2034) and an inner (2007 x 2853) set, portrait or landscape, PNG / JPEG without alpha, 1-10 each. It is optional now and reportedly required from April 2027 for builds with the iOS 27.1 SDK or later; `check` / `validate` print an info note until then (a warning after, never a blocker). `apple.iphoneDuo: true` adds both sizes to -`shots render` / `shots check` / the gallery. The API (4.5.1) has no Duo `ScreenshotDisplayType` yet, so -`apple screenshots` skips the Duo folders with a message and the deep link to the version page; add them in the -console's iPhone Duo tab until then (one constant, `IPHONE_DUO_DISPLAY` in `cli/shots/spec.ts`, takes the names once -the enum has them). No Duo app preview sizes are published. Google Play has no foldable slot: foldables show the +`shots render` / `shots check` / the gallery. ScreenshotDisplayType has no Duo value (and won't get one), so +`apple screenshots` uploads the Duo folders through the App Asset Library (display class IPHONE_DUO, placement +APP_SCREENSHOT; pitfall 130). No Duo app preview sizes are published. Google Play has no foldable slot: foldables show the 7" / 10" tablet sets below. **Mac App Store.** Apple's Screenshot specifications (checked 2026-10-20) list four 16:10 Mac sizes: 1280 x 800, diff --git a/tests/ppo.test.ts b/tests/ppo.test.ts index f4c22c2..3770a30 100644 --- a/tests/ppo.test.ts +++ b/tests/ppo.test.ts @@ -1,12 +1,13 @@ import { describe, expect, test } from 'bun:test'; -import { displaySets, skippedDuoSets } from '../cli/apple/screenshots'; +import { displaySets, duoDirs } from '../cli/apple/screenshots'; +import { duoGroups, duoUpToDate } from '../cli/apple/duo-library'; import { appleRules } from '../cli/lib/validate-rules'; import { checkCreate, createExperimentReq, defaultName, experimentFromApi, pickExperiment, planTreatmentLocales, planTreatments, startStopReq } from '../cli/lib/ppo'; import { validateConfig } from '../cli/lib/config'; import { FORBIDDEN_ARGS, TOOLS, toArgv, validateInput } from '../cli/mcp-tools'; import { requiredSets } from '../cli/shots/report'; import { defaultSizes, SIZES } from '../cli/shots/lib'; -import { checkImage, IMAGE_SPECS, imageInfo, IPHONE_DUO_DISPLAY, IPHONE_DUO_NOT_IN_API, iphoneDuoNote } from '../cli/shots/spec'; +import { checkImage, IMAGE_SPECS, imageInfo, IPHONE_DUO_DISPLAY, iphoneDuoNote } from '../cli/shots/spec'; import { png } from './fixtures'; describe('product page optimization', () => { @@ -91,12 +92,21 @@ describe('iPhone Duo (foldable) sizes', () => { expect(checkImage(imageInfo(png(2007, 2853)), 'iphone-duo-outer').map(i => i.code)).toEqual(['size']); expect(checkImage(imageInfo(png(2007, 2853, { colorType: 6 })), 'iphone-duo-inner').map(i => i.code)).toEqual(['alpha']); }); - test('upload: no API display type yet, so the sets are skipped with the message', () => { + test('upload: no ScreenshotDisplayType; Duo goes through the App Asset Library (IPHONE_DUO group)', () => { expect(Object.values(IPHONE_DUO_DISPLAY).every(t => t === null)).toBe(true); expect(Object.keys(displaySets({ iphoneDuo: true }))).not.toContain('iphone-duo-outer'); - expect(skippedDuoSets({})).toBeNull(); - expect(skippedDuoSets({ iphoneDuo: true })).toEqual({ dirs: ['iphone-duo-outer', 'iphone-duo-inner'], msg: expect.stringContaining(`iphone-duo-outer, iphone-duo-inner: ${IPHONE_DUO_NOT_IN_API}. Add them in App Store Connect > the iOS version page > App Previews and Screenshots > iPhone Duo: https://`) }); - expect(skippedDuoSets({ iphoneDuo: true, appId: '1234567890' })!.msg).toContain('/apps/1234567890/distribution/ios/version/inflight'); + expect(duoDirs({})).toEqual([]); + expect(duoDirs({ iphoneDuo: true })).toEqual(['iphone-duo-outer', 'iphone-duo-inner']); + const ref = [{ attributes: { placementProfileGroups: [ + { placementProfileGroupId: 'g-67', platform: 'IOS', displayClassId: 'IPHONE_DYNAMIC_ISLAND_LARGE_DISPLAY' }, + { placementProfileGroupId: 'g-duo', platform: 'IOS', displayClassId: 'IPHONE_DUO' }, + { placementProfileGroupId: 'g-duo', platform: 'IOS', displayClassId: 'IPHONE_DUO' }, + { placementProfileGroupId: 'g-mac', platform: 'MAC_OS', displayClassId: 'IPHONE_DUO' }] } }]; + expect(duoGroups(ref)).toEqual(['g-duo']); + expect(duoGroups([])).toEqual([]); + expect(duoUpToDate(['a', 'b'], ['a', 'b'])).toBe(true); + expect(duoUpToDate(['b', 'a'], ['a', 'b'])).toBe(false); + expect(duoUpToDate(['a', undefined], ['a', 'b'])).toBe(false); }); test('check / validate note: info before April 2027, never a blocker; points Play to the tablet sets', () => { const before = new Date('2026-10-18'), after = new Date('2027-04-02'); @@ -106,7 +116,7 @@ describe('iPhone Duo (foldable) sizes', () => { expect(n.level).toBe('info'); expect(n.msg).toContain('optional now, required from April 2027 for iOS 27.1 SDK builds'); expect(n.msg).toContain('tablet screenshots'); - expect(n.msg).toContain('the App Store Connect console takes Duo screenshots and previews, the API does not yet'); + expect(n.msg).toContain('apple screenshots uploads them through the App Asset Library'); expect(iphoneDuoNote({ apple: true, duo: false, today: after })!.level).toBe('warn'); const base = { version: null, build: null, locales: [], expectedLocales: [], requiredDisplayTypes: [], reviewDetail: null, ageRating: null, priceSchedule: true, availability: true, iaps: [], expectedProducts: [], privacyUrl: { url: 'https://example.com/privacy', status: 200 } }; const f = appleRules({ ...base, today: before } as unknown as Parameters[0]).find(x => x.code === 'screenshots-duo')!; From 1ce4f026e9185610d62db0d6d20b351f10c24867 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 15:15:57 +0700 Subject: [PATCH 56/73] api tables: refData and asset library images now wrapped by apple screenshots --- cli/api/wrapped.gen.ts | 11 ++++++----- docs/api-coverage.md | 14 +++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/cli/api/wrapped.gen.ts b/cli/api/wrapped.gen.ts index 0fced3e..930482c 100644 --- a/cli/api/wrapped.gen.ts +++ b/cli/api/wrapped.gen.ts @@ -7,10 +7,11 @@ export const WRAPPED: { apple: Record; play: Record; play: Record; play: Record Date: Sun, 8 Nov 2026 15:18:12 +0700 Subject: [PATCH 57/73] flags.json: regenerated --- cli/data/flags.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/data/flags.json b/cli/data/flags.json index 9e5aed1..b8058b6 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -106,6 +106,7 @@ "name" ], "apple cpp": [ + "add-for-review", "include-drafts", "jobs", "name", @@ -116,6 +117,7 @@ "repair-stuck", "src", "variant", + "verify", "write" ], "apple creative-assets": [ @@ -204,6 +206,7 @@ "write" ], "apple ppo": [ + "add-for-review", "experiment", "include-drafts", "jobs", @@ -215,6 +218,7 @@ "src", "traffic", "variant", + "verify", "write" ], "apple preorder": [ @@ -270,6 +274,7 @@ "platform" ], "apple screenshots": [ + "add-for-review", "include-drafts", "jobs", "not-sent-for-review", @@ -278,6 +283,7 @@ "repair-stuck", "src", "variant", + "verify", "write" ], "apple signing": [ From f6f9fc3c41f8c2edba1a02319c69b507a963c413 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 15:20:10 +0700 Subject: [PATCH 58/73] storebound 0.8.72: version in package.json and every copy, CHANGELOG 0.8.72 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index d043258..f60726c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.71", + "version": "0.8.72", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 500cd9c..1c86081 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.71", + "version": "0.8.72", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index de2766c..a2817a3 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.71", + "version": "0.8.72", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c13b66..3362120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.72 · 2026-11-08 + - **iPhone Duo screenshots upload.** `apple screenshots` now sends them through the App Asset Library (display class IPHONE_DUO, placement APP_SCREENSHOT) instead of skipping them as "not in the API" (pitfall 130). diff --git a/apps/desktop/package.json b/apps/desktop/package.json index f751247..ff6c949 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.71", + "version": "0.8.72", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 0e0a53d..01c201b 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.71" +version = "0.8.72" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 63d4b68..ea83d16 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.71" +version = "0.8.72" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 71b964e..fcc5157 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.71", + "version": "0.8.72", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index f425eaf..b971bd0 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.71", + "version": "0.8.72", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 0593b88..1da9c55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.71", + "version": "0.8.72", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From b18d480d6552945aa4ee8a512aa77d806b43a497 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 15:48:58 +0700 Subject: [PATCH 59/73] iPhone Duo: accept platform IPHONE_APP_STORE from appAssetLibraryRefData; a Duo failure warns, other sets continue --- CHANGELOG.md | 2 ++ cli/apple/duo-library.ts | 4 ++-- cli/apple/screenshots.ts | 7 ++++--- tests/ppo.test.ts | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3362120..e3ef69b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- **iPhone Duo:** the live API names the platform IPHONE_APP_STORE (not IOS); accepted. A Duo problem now warns and the other screenshot sets still upload. + ## 0.8.72 · 2026-11-08 - **iPhone Duo screenshots upload.** `apple screenshots` now sends them through the App Asset Library (display class diff --git a/cli/apple/duo-library.ts b/cli/apple/duo-library.ts index 86c620e..8e090fc 100644 --- a/cli/apple/duo-library.ts +++ b/cli/apple/duo-library.ts @@ -22,11 +22,11 @@ export const DUO_CATEGORY = 'APP_SCREENSHOTS_AND_PREVIEWS'; export const DUO_MAX = 10; const sumOf = (a: J | undefined): string | undefined => /^storebound ([0-9a-f]{32})$/.exec(String(a?.attributes?.referenceName ?? ''))?.[1]; -/** iOS placement profile group ids of the IPHONE_DUO display class in an appAssetLibraryRefData response. Pure. */ +/** iPhone placement profile group ids (platform IOS or IPHONE_APP_STORE, as the live API answers) of the IPHONE_DUO display class in an appAssetLibraryRefData response. Pure. */ export function duoGroups(refData: J[]): string[] { const ids = new Set(); for (const r of refData) for (const g of (r?.attributes?.placementProfileGroups ?? []) as J[]) - if (g?.displayClassId === 'IPHONE_DUO' && (!g.platform || g.platform === 'IOS') && g.placementProfileGroupId) ids.add(String(g.placementProfileGroupId)); + if (g?.displayClassId === 'IPHONE_DUO' && (!g.platform || /IOS|IPHONE/.test(String(g.platform))) && g.placementProfileGroupId) ids.add(String(g.placementProfileGroupId)); return [...ids]; } diff --git a/cli/apple/screenshots.ts b/cli/apple/screenshots.ts index fc2adb6..de2f3fe 100644 --- a/cli/apple/screenshots.ts +++ b/cli/apple/screenshots.ts @@ -96,8 +96,9 @@ export async function run(ctx: Ctx): Promise { const version = await c.editableVersion(platform); if (!version) throw new Error(`no editable ${platformLabel(platform)} App Store version (run apple listing --version x.y.z first)`); log('apple', `screenshots for version ${versionLabel(version)}`); - const duo = platform === 'MAC_OS' ? [] : duoDirs(config.apple); - const duoGroupId = duo.length ? await duoGroup(c) : ''; + let duo = platform === 'MAC_OS' ? [] : duoDirs(config.apple); + // a Duo problem never stops the other sets + const duoGroupId = duo.length ? await duoGroup(c).catch((e: Error) => { warn('apple', `iPhone Duo skipped: ${e.message}`); duo = []; return ''; }) : ''; const appId = duo.length ? await c.app() : ''; if (platform === 'MAC_OS' && !config.apple?.mac) throw new Error('macOS version: set apple.mac: true and render the mac size (storebound shots render --size mac) first'); if (platform !== 'MAC_OS' && config.apple?.mac) log('apple', 'Mac screenshots (mac/, APP_DESKTOP) go to the macOS version: run apple screenshots --platform macos'); @@ -129,7 +130,7 @@ export async function run(ctx: Ctx): Promise { if (duo.length) { const files = duo.flatMap(dir => numberedImages(join(src, lang.id, dir)).filter(f => f.endsWith('.png'))); if (!files.length) warn('apple', `${locale}: nothing in ${duo.map(d => join(src, lang.id, d)).join(' or ')}, iPhone Duo skipped`); - else await syncDuo(c, { appId, group: duoGroupId, loc, files, dry: ctx.args.has('dry') }); + else await syncDuo(c, { appId, group: duoGroupId, loc, files, dry: ctx.args.has('dry') }).catch((e: Error) => { warn('apple', `${locale} iPhone Duo: ${e.message}`); process.exitCode = 1; }); } }); } diff --git a/tests/ppo.test.ts b/tests/ppo.test.ts index 3770a30..0d147fa 100644 --- a/tests/ppo.test.ts +++ b/tests/ppo.test.ts @@ -104,6 +104,7 @@ describe('iPhone Duo (foldable) sizes', () => { { placementProfileGroupId: 'g-mac', platform: 'MAC_OS', displayClassId: 'IPHONE_DUO' }] } }]; expect(duoGroups(ref)).toEqual(['g-duo']); expect(duoGroups([])).toEqual([]); + expect(duoGroups([{ attributes: { placementProfileGroups: [{ placementProfileGroupId: 'IPHONE_DUO_PROFILE', platform: 'IPHONE_APP_STORE', displayClassId: 'IPHONE_DUO' }] } }])).toEqual(['IPHONE_DUO_PROFILE']); expect(duoUpToDate(['a', 'b'], ['a', 'b'])).toBe(true); expect(duoUpToDate(['b', 'a'], ['a', 'b'])).toBe(false); expect(duoUpToDate(['a', undefined], ['a', 'b'])).toBe(false); From b361e226310774a58b31f7c40f8e599cfc7f07c9 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 15:50:43 +0700 Subject: [PATCH 60/73] ci: re-run (bun download 504) From 96458bba5cb3d37749c615984f1c5d3c79ecb2da Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 16:17:34 +0700 Subject: [PATCH 61/73] ci: re-run (GitHub download outage) From 3a22d7f4550af417a3a743069118cb3d47e72941 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 16:23:15 +0700 Subject: [PATCH 62/73] ci: install bun from the npm registry (GitHub release assets answer 504 now and then), bun.sh with retries as fallback --- .forgejo/actions/linux-setup/action.yml | 2 +- .forgejo/workflows/acceptance.yml | 4 ++-- .forgejo/workflows/ci.yml | 6 +++--- .forgejo/workflows/release.yml | 2 +- tools/ci-install-bun.sh | 14 ++++++++++++++ 5 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 tools/ci-install-bun.sh diff --git a/.forgejo/actions/linux-setup/action.yml b/.forgejo/actions/linux-setup/action.yml index a16be63..ec2f37f 100644 --- a/.forgejo/actions/linux-setup/action.yml +++ b/.forgejo/actions/linux-setup/action.yml @@ -35,7 +35,7 @@ runs: shell: bash run: | P="${FORGEJO_PATH:-$GITHUB_PATH}" - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "$P" command -v rustup || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal echo "$HOME/.cargo/bin" >> "$P" diff --git a/.forgejo/workflows/acceptance.yml b/.forgejo/workflows/acceptance.yml index cc5cbb2..e6a4b22 100644 --- a/.forgejo/workflows/acceptance.yml +++ b/.forgejo/workflows/acceptance.yml @@ -33,7 +33,7 @@ jobs: if: ${{ matrix.platform == 'Linux' }} shell: bash run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}" - name: Acceptance matrix (Linux) if: ${{ matrix.platform == 'Linux' }} @@ -97,7 +97,7 @@ jobs: path: acceptance-runs/Windows-bun - name: Matrix (markdown), red cells fail the job run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh export PATH="$HOME/.bun/bin:$PATH" V=$(bun tools/desktop-version.ts --print) mkdir -p out diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index d0d95da..ff134a6 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: if: ${{ matrix.platform == 'Linux' }} shell: bash run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}" - name: Acceptance matrix (Linux) if: ${{ matrix.platform == 'Linux' }} @@ -371,7 +371,7 @@ jobs: - uses: actions/checkout@v4 - name: Tools run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}" - uses: actions/download-artifact@v3 with: @@ -406,7 +406,7 @@ jobs: # no apt: the installers were scanned with the private terms in their own jobs; this job only records - name: Tools run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}" [ -n "$FORGEJO_TOKEN" ] || { echo "secret RELEASE_TOKEN is missing (repo Settings > Actions > Secrets)" >&2; exit 1; } - uses: actions/download-artifact@v3 diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index ee88ef0..e77a9fd 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -61,7 +61,7 @@ jobs: - name: Tag, package.json version, every version copy and the CHANGELOG agree id: check run: | - curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}" >/dev/null + bash tools/ci-install-bun.sh echo "$HOME/.bun/bin" >> "${FORGEJO_PATH:-$GITHUB_PATH}" export PATH="$HOME/.bun/bin:$PATH" bun tools/desktop-version.ts diff --git a/tools/ci-install-bun.sh b/tools/ci-install-bun.sh new file mode 100644 index 0000000..8071050 --- /dev/null +++ b/tools/ci-install-bun.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# Installs bun $1 (or $BUN_VERSION) into ~/.bun/bin on a Linux CI runner from the npm registry (@oven/bun-linux-), +# because GitHub's oven-sh/bun release assets answer 504 now and then; bun.sh/install with retries is the fallback. +set -u +V="${1:-${BUN_VERSION:?BUN_VERSION}}" +case "$(uname -m)" in aarch64|arm64) A=aarch64 ;; *) A=x64 ;; esac +D="$HOME/.bun/bin"; mkdir -p "$D"; T=$(mktemp -d) +for i in 1 2 3; do + if curl -fsSL --max-time 120 "https://registry.npmjs.org/@oven/bun-linux-$A/-/bun-linux-$A-$V.tgz" | tar -xz -C "$T" \ + && install -m 755 "$T/package/bin/bun" "$D/bun"; then ln -sf bun "$D/bunx"; "$D/bun" --version; exit 0; fi + sleep 10 +done +for i in 1 2 3; do curl -fsSL https://bun.sh/install | bash -s "bun-v$V" >/dev/null && { "$D/bun" --version; exit 0; }; sleep 20; done +echo "bun $V: npm registry and GitHub both failed" >&2; exit 1 From f637c5e4e7f3fdd02e8fd8228b6b8f491a06f3cc Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 16:26:03 +0700 Subject: [PATCH 63/73] storebound 0.8.73: version in package.json and every copy, CHANGELOG 0.8.73 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f60726c..62a1df1 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.72", + "version": "0.8.73", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 1c86081..11502d2 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.72", + "version": "0.8.73", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index a2817a3..ae6a14b 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.72", + "version": "0.8.73", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ef69b..99b9fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.73 · 2026-11-08 + - **iPhone Duo:** the live API names the platform IPHONE_APP_STORE (not IOS); accepted. A Duo problem now warns and the other screenshot sets still upload. ## 0.8.72 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index ff6c949..c410b0b 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.72", + "version": "0.8.73", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 01c201b..dd4cc4a 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.72" +version = "0.8.73" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index ea83d16..349c6f1 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.72" +version = "0.8.73" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index fcc5157..d4e2779 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.72", + "version": "0.8.73", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index b971bd0..40ed0e8 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.72", + "version": "0.8.73", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 1da9c55..c63e1d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.72", + "version": "0.8.73", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From c5173e4caee3d1aa178817b36b9a0e1f01ae079f Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 16:55:29 +0700 Subject: [PATCH 64/73] ci: cache ~/.cache/tauri and retry the Linux bundle (GitHub release 504s); CHANGELOG note for 0.8.73 --- .forgejo/actions/linux-setup/action.yml | 1 + .forgejo/workflows/ci.yml | 5 +++-- CHANGELOG.md | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.forgejo/actions/linux-setup/action.yml b/.forgejo/actions/linux-setup/action.yml index ec2f37f..2f0d06c 100644 --- a/.forgejo/actions/linux-setup/action.yml +++ b/.forgejo/actions/linux-setup/action.yml @@ -26,6 +26,7 @@ runs: with: path: | ~/.bun/install/cache + ~/.cache/tauri ~/.cargo/registry/index ~/.cargo/registry/cache ~/.cargo/git/db diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index ff134a6..b411154 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -173,7 +173,8 @@ jobs: working-directory: apps/desktop run: | rm -rf "$CARGO_TARGET_DIR/release/bundle" - bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci + # the AppImage tools come from GitHub releases, which answer 504 now and then (cached in ~/.cache/tauri) + for i in 1 2 3; do bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci && break; [ $i = 3 ] && exit 1; sleep 30; done - name: Self-test the exact artifacts run: | V=$(bun tools/desktop-version.ts --print) @@ -237,7 +238,7 @@ jobs: bun tools/build-sidecars.ts --target bun-linux-x64 patchelf --set-rpath '$ORIGIN/../lib' apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu B="$CARGO_TARGET_DIR/release/bundle"; rm -rf "$B" - (cd apps/desktop && bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci) + for i in 1 2 3; do (cd apps/desktop && bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci) && break; [ $i = 3 ] && exit 1; sleep 30; done mkdir -p dev && cp "$B/appimage/storebound_${V}_amd64.AppImage" "$B/deb/storebound_${V}_amd64.deb" dev/ chmod +x dev/*.AppImage (cd /tmp && rm -rf squashfs-root && "$GITHUB_WORKSPACE/dev/storebound_${V}_amd64.AppImage" --appimage-extract >/dev/null && squashfs-root/usr/bin/storebound-desktop --self-test) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99b9fd8..efab712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- 0.8.73 was tagged but not published (a GitHub 504 in the Linux AppImage bundling); 0.8.74 ships its section below. CI caches the AppImage tools and retries the Linux bundle. + ## 0.8.73 · 2026-11-08 - **iPhone Duo:** the live API names the platform IPHONE_APP_STORE (not IOS); accepted. A Duo problem now warns and the other screenshot sets still upload. From ab97d6d72f80a151404401c58b43c34dc1094c60 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 16:58:18 +0700 Subject: [PATCH 65/73] storebound 0.8.74: version in package.json and every copy, CHANGELOG 0.8.74 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 62a1df1..826be18 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.73", + "version": "0.8.74", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 11502d2..1437a74 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.73", + "version": "0.8.74", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index ae6a14b..34ffbd3 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.73", + "version": "0.8.74", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index efab712..cdc352a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.74 · 2026-11-08 + - 0.8.73 was tagged but not published (a GitHub 504 in the Linux AppImage bundling); 0.8.74 ships its section below. CI caches the AppImage tools and retries the Linux bundle. ## 0.8.73 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index c410b0b..d06554f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.73", + "version": "0.8.74", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index dd4cc4a..ac3365e 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.73" +version = "0.8.74" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 349c6f1..e88f770 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.73" +version = "0.8.74" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index d4e2779..3f984da 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.73", + "version": "0.8.74", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 40ed0e8..73e5d42 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.73", + "version": "0.8.74", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index c63e1d6..d782149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.73", + "version": "0.8.74", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 793c322f99062e5e296bedba01832404ece84ac8 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 17:37:34 +0700 Subject: [PATCH 66/73] CHANGELOG: 0.8.74 was not published (GitHub 504) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdc352a..4a2b9ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- 0.8.74 was tagged but not published (GitHub release downloads answered 504 during the Linux AppImage bundling); 0.8.75 ships its section. + ## 0.8.74 · 2026-11-08 - 0.8.73 was tagged but not published (a GitHub 504 in the Linux AppImage bundling); 0.8.74 ships its section below. CI caches the AppImage tools and retries the Linux bundle. From c1bed9440e616a3b1bd65e43168cf00363cbc424 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 17:40:26 +0700 Subject: [PATCH 67/73] storebound 0.8.75: version in package.json and every copy, CHANGELOG 0.8.75 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 826be18..e532be7 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.74", + "version": "0.8.75", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 1437a74..3dea39a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.74", + "version": "0.8.75", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 34ffbd3..0c0927e 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.74", + "version": "0.8.75", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2b9ee..37bd801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.75 · 2026-11-08 + - 0.8.74 was tagged but not published (GitHub release downloads answered 504 during the Linux AppImage bundling); 0.8.75 ships its section. ## 0.8.74 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index d06554f..2131b76 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.74", + "version": "0.8.75", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index ac3365e..ce49174 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.74" +version = "0.8.75" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index e88f770..e147fe4 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.74" +version = "0.8.75" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 3f984da..b510d03 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.74", + "version": "0.8.75", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 73e5d42..a269708 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.74", + "version": "0.8.75", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index d782149..586da92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.74", + "version": "0.8.75", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 7e362ef962880afa6ecda72d7ff6624363374f0e Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 18:20:36 +0700 Subject: [PATCH 68/73] ci: AppImage tools from the Forgejo mirror (sha256-checked) into ~/.cache/tauri; GitHub release assets fail too often --- .forgejo/workflows/ci.yml | 2 ++ CHANGELOG.md | 2 ++ tools/ci-tauri-tools.sh | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100755 tools/ci-tauri-tools.sh diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index b411154..656ac95 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -174,6 +174,7 @@ jobs: run: | rm -rf "$CARGO_TARGET_DIR/release/bundle" # the AppImage tools come from GitHub releases, which answer 504 now and then (cached in ~/.cache/tauri) + bash ../../tools/ci-tauri-tools.sh for i in 1 2 3; do bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci && break; [ $i = 3 ] && exit 1; sleep 30; done - name: Self-test the exact artifacts run: | @@ -238,6 +239,7 @@ jobs: bun tools/build-sidecars.ts --target bun-linux-x64 patchelf --set-rpath '$ORIGIN/../lib' apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu B="$CARGO_TARGET_DIR/release/bundle"; rm -rf "$B" + bash tools/ci-tauri-tools.sh for i in 1 2 3; do (cd apps/desktop && bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci) && break; [ $i = 3 ] && exit 1; sleep 30; done mkdir -p dev && cp "$B/appimage/storebound_${V}_amd64.AppImage" "$B/deb/storebound_${V}_amd64.deb" dev/ chmod +x dev/*.AppImage diff --git a/CHANGELOG.md b/CHANGELOG.md index 37bd801..695db9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- 0.8.75 was tagged but not published (GitHub 502/504 in the Linux AppImage bundling). CI now takes the AppImage tools from a checked mirror instead of GitHub. + ## 0.8.75 · 2026-11-08 - 0.8.74 was tagged but not published (GitHub release downloads answered 504 during the Linux AppImage bundling); 0.8.75 ships its section. diff --git a/tools/ci-tauri-tools.sh b/tools/ci-tauri-tools.sh new file mode 100755 index 0000000..63f6841 --- /dev/null +++ b/tools/ci-tauri-tools.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Puts the AppImage tools Tauri's bundler would download from GitHub releases (which answer 502/504 now and then) into +# ~/.cache/tauri from our Forgejo package mirror, checked against its SHA256SUMS. Tauri skips the download when they exist. +set -eu +B="${TAURI_TOOLS_MIRROR:-https://git.crt.fyi/api/packages/CRT/generic/tauri-linux-tools/2026.11.08}" +D="$HOME/.cache/tauri"; mkdir -p "$D"; cd "$D" +curl -fsSL --retry 3 --max-time 60 -o SHA256SUMS "$B/SHA256SUMS" +while read -r sum f; do + f="${f#\*}" + if ! echo "$sum $f" | sha256sum -c --status 2>/dev/null; then curl -fsSL --retry 3 --max-time 300 -o "$f" "$B/$f"; echo "$sum $f" | sha256sum -c --status; fi + chmod +x "$f" +done < SHA256SUMS +rm -f SHA256SUMS; ls "$D" From 5cc3da486da95ff84d6317fe2c1007f63d2080a7 Mon Sep 17 00:00:00 2001 From: CRT Date: Sun, 8 Nov 2026 18:24:15 +0700 Subject: [PATCH 69/73] storebound 0.8.76: version in package.json and every copy, CHANGELOG 0.8.76 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e532be7..05ef60d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.75", + "version": "0.8.76", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 3dea39a..9d027bf 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.75", + "version": "0.8.76", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 0c0927e..654fc45 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.75", + "version": "0.8.76", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 695db9b..d9b4dab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.76 · 2026-11-08 + - 0.8.75 was tagged but not published (GitHub 502/504 in the Linux AppImage bundling). CI now takes the AppImage tools from a checked mirror instead of GitHub. ## 0.8.75 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 2131b76..fe04e9d 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.75", + "version": "0.8.76", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index ce49174..5c1bdec 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.75" +version = "0.8.76" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index e147fe4..4d0f9db 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.75" +version = "0.8.76" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index b510d03..cee5333 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.75", + "version": "0.8.76", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index a269708..451ed18 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.75", + "version": "0.8.76", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index 586da92..b78b422 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.75", + "version": "0.8.76", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From 108b362cd9efa78f18aca46f8e0e3f88210935b4 Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 9 Nov 2026 06:35:00 +0700 Subject: [PATCH 70/73] iPhone Duo: limit from Apple's reference data instead of a cut to 10, --duo-only; shared asset library helpers in their own module --- CHANGELOG.md | 2 ++ cli/apple/asset-library.ts | 57 ++++++++++++++++++++++++++++++++++++ cli/apple/creative-assets.ts | 56 ++--------------------------------- cli/apple/duo-library.ts | 34 ++++++++++++++++----- cli/apple/screenshots.ts | 10 +++---- cli/data/flags.json | 13 ++++---- tests/ppo.test.ts | 5 +++- 7 files changed, 102 insertions(+), 75 deletions(-) create mode 100644 cli/apple/asset-library.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index d9b4dab..5d1e2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- **iPhone Duo:** outer and inner files are no longer cut to the first 10: the limit comes from Apple's reference data, and over it nothing changes and nothing is dropped. `apple screenshots --duo-only` writes only the Duo set. `apple cpp` no longer lists creative-assets flags. + ## 0.8.76 · 2026-11-08 - 0.8.75 was tagged but not published (GitHub 502/504 in the Linux AppImage bundling). CI now takes the AppImage tools from a checked mirror instead of GitHub. diff --git a/cli/apple/asset-library.ts b/cli/apple/asset-library.ts new file mode 100644 index 0000000..a484865 --- /dev/null +++ b/cli/apple/asset-library.ts @@ -0,0 +1,57 @@ +// App Asset Library states and upsert rules shared by creative assets and iPhone Duo screenshots. No command flags here. +import * as rt from '../lib/rt'; +import type { J } from './asc'; + +export const REF = (sum: string): string => `storebound ${sum}`; +export const sumOf = (a: J): string | undefined => /^storebound ([0-9a-f]{32})$/.exec(String(a?.attributes?.referenceName ?? ''))?.[1]; + +/** Asset states (AppAssetLibraryAssetState, API 4.5.1) by what storebound may do with them. */ +export const ASSET_STATES = { + /** still uploading / processing: wait (bounded), then select */ + processing: ['AWAITING_UPLOAD', 'UPLOAD_COMPLETE'], + /** processed and usable in a slot; not reviewed yet: goes into a review submission */ + unreviewed: ['COMPLETE', 'PREPARE_FOR_SUBMISSION'], + /** in a submission or reviewed: usable in a slot, nothing to add */ + reviewing: ['READY_FOR_REVIEW', 'WAITING_FOR_REVIEW', 'IN_REVIEW', 'ACCEPTED', 'APPROVED'], +} as const; +export type AssetClass = 'processing' | 'unreviewed' | 'reviewing' | 'failed' | 'rejected' | 'archived' | 'unknown'; + +/** What a library asset's state means for storebound. Pure. */ +export function classify(state: string | undefined): AssetClass { + const s = String(state ?? ''); + for (const [k, v] of Object.entries(ASSET_STATES)) if ((v as readonly string[]).includes(s)) return k as AssetClass; + if (s === 'FAILED') return 'failed'; + if (s === 'REJECTED') return 'rejected'; + if (s === 'ARCHIVED') return 'archived'; + return s ? 'unknown' : 'processing'; +} + +/** Selectable for a slot: processed and not failed / rejected / archived (Prepare for Submission is enough). */ +export const selectable = (c: AssetClass): boolean => c === 'unreviewed' || c === 'reviewing'; + +/** Stop re-uploading a file whose earlier uploads failed processing this many times. */ +export const MAX_FAILED = 2; + +/** The library asset to use for one MD5: a live one first (newest state wins: reviewing > unreviewed > processing), + * else an archived one (unarchive it), else none; plus why not to upload (a rejected file, repeated failures). Pure. */ +export function pickAsset(assets: J[], sum: string): { asset?: J; unarchive?: boolean; refuse?: string } { + const mine = assets.filter(x => sumOf(x) === sum); + const rank: Record = { reviewing: 0, unreviewed: 1, processing: 2, unknown: 3, archived: 4, rejected: 5, failed: 6 }; + const by = (c: AssetClass) => mine.filter(x => classify(x.attributes?.state) === c); + const live = mine.filter(x => rank[classify(x.attributes?.state)] <= 3).sort((a, b) => rank[classify(a.attributes?.state)] - rank[classify(b.attributes?.state)]); + if (live[0]) return { asset: live[0] }; + if (by('archived')[0]) return { asset: by('archived')[0], unarchive: true }; + const rej = by('rejected')[0]; + if (rej) return { refuse: `rejected by App Review${reason(rej)}: uploading the same file again changes nothing; change the file` }; + if (by('failed').length >= MAX_FAILED) return { refuse: `${by('failed').length} earlier uploads of this file failed processing${reason(by('failed')[0]!)}: check the file (format, size) before trying again` }; + return {}; +} + +export const reason = (a: J): string => { + const d = ((a.attributes?.stateDetails ?? []) as J[]).map(x => x?.code ?? x?.message ?? x?.description).filter(Boolean); + return d.length ? ` (${d.join(', ')})` : ''; +}; + +/** Bounded wait for processing (every wait has a timeout and a heartbeat); tests set waitMs 0 / timeoutMs 0. */ +export const processingTiming = { pollMs: 3000, timeoutMs: 120_000, heartbeatMs: 20_000, sleep: (ms: number): Promise => (ms > 0 ? rt.sleep(ms) : Promise.resolve()) }; + diff --git a/cli/apple/creative-assets.ts b/cli/apple/creative-assets.ts index 7539022..78866a3 100644 --- a/cli/apple/creative-assets.ts +++ b/cli/apple/creative-assets.ts @@ -29,61 +29,17 @@ import { need } from '../lib/ctx'; import { consoleLink } from '../lib/console-links'; import { done, log, warn } from '../lib/log'; import { elapsed } from '../lib/progress'; -import * as rt from '../lib/rt'; import { ffprobe } from '../shots/report'; import { imageInfo } from '../shots/spec'; import { checkCreativeImage, checkCreativeVideo, type CreativeFile, creativeFiles, PLACEMENT_TYPE, type Placement } from '../shots/creative'; import { type Asc, ascClient, md5, type J } from './asc'; +import { type AssetClass, ASSET_STATES, classify, MAX_FAILED, pickAsset, processingTiming, reason, REF, selectable, sumOf } from './asset-library'; +export { type AssetClass, ASSET_STATES, classify, MAX_FAILED, pickAsset, processingTiming, REF, selectable }; import { partHeaders } from './screenshot-health'; import { AmbiguousWriteError } from '../lib/upsert'; import { addItem, ensureDraft, OtherSubmissionError } from './submission'; const TAG = 'apple'; -export const REF = (sum: string): string => `storebound ${sum}`; -const sumOf = (a: J): string | undefined => /^storebound ([0-9a-f]{32})$/.exec(String(a?.attributes?.referenceName ?? ''))?.[1]; - -/** Asset states (AppAssetLibraryAssetState, API 4.5.1) by what storebound may do with them. */ -export const ASSET_STATES = { - /** still uploading / processing: wait (bounded), then select */ - processing: ['AWAITING_UPLOAD', 'UPLOAD_COMPLETE'], - /** processed and usable in a slot; not reviewed yet: goes into a review submission */ - unreviewed: ['COMPLETE', 'PREPARE_FOR_SUBMISSION'], - /** in a submission or reviewed: usable in a slot, nothing to add */ - reviewing: ['READY_FOR_REVIEW', 'WAITING_FOR_REVIEW', 'IN_REVIEW', 'ACCEPTED', 'APPROVED'], -} as const; -export type AssetClass = 'processing' | 'unreviewed' | 'reviewing' | 'failed' | 'rejected' | 'archived' | 'unknown'; - -/** What a library asset's state means for storebound. Pure. */ -export function classify(state: string | undefined): AssetClass { - const s = String(state ?? ''); - for (const [k, v] of Object.entries(ASSET_STATES)) if ((v as readonly string[]).includes(s)) return k as AssetClass; - if (s === 'FAILED') return 'failed'; - if (s === 'REJECTED') return 'rejected'; - if (s === 'ARCHIVED') return 'archived'; - return s ? 'unknown' : 'processing'; -} - -/** Selectable for a slot: processed and not failed / rejected / archived (Prepare for Submission is enough). */ -export const selectable = (c: AssetClass): boolean => c === 'unreviewed' || c === 'reviewing'; - -/** Stop re-uploading a file whose earlier uploads failed processing this many times. */ -export const MAX_FAILED = 2; - -/** The library asset to use for one MD5: a live one first (newest state wins: reviewing > unreviewed > processing), - * else an archived one (unarchive it), else none; plus why not to upload (a rejected file, repeated failures). Pure. */ -export function pickAsset(assets: J[], sum: string): { asset?: J; unarchive?: boolean; refuse?: string } { - const mine = assets.filter(x => sumOf(x) === sum); - const rank: Record = { reviewing: 0, unreviewed: 1, processing: 2, unknown: 3, archived: 4, rejected: 5, failed: 6 }; - const by = (c: AssetClass) => mine.filter(x => classify(x.attributes?.state) === c); - const live = mine.filter(x => rank[classify(x.attributes?.state)] <= 3).sort((a, b) => rank[classify(a.attributes?.state)] - rank[classify(b.attributes?.state)]); - if (live[0]) return { asset: live[0] }; - if (by('archived')[0]) return { asset: by('archived')[0], unarchive: true }; - const rej = by('rejected')[0]; - if (rej) return { refuse: `rejected by App Review${reason(rej)}: uploading the same file again changes nothing; change the file` }; - if (by('failed').length >= MAX_FAILED) return { refuse: `${by('failed').length} earlier uploads of this file failed processing${reason(by('failed')[0]!)}: check the file (format, size) before trying again` }; - return {}; -} - /** "uploaded 2026-10-19, waiting for Apple's approval (IN_REVIEW); run `storebound apple creative-assets` again later". * The version page's header / search slots offer only approved assets ("Browse approved assets"), so an asset that * is not APPROVED waits; a later run places it. Pure. */ @@ -107,14 +63,6 @@ export async function creativeWaiting(c: Asc, appId: string, local: Map { - const d = ((a.attributes?.stateDetails ?? []) as J[]).map(x => x?.code ?? x?.message ?? x?.description).filter(Boolean); - return d.length ? ` (${d.join(', ')})` : ''; -}; - -/** Bounded wait for processing (every wait has a timeout and a heartbeat); tests set waitMs 0 / timeoutMs 0. */ -export const processingTiming = { pollMs: 3000, timeoutMs: 120_000, heartbeatMs: 20_000, sleep: (ms: number): Promise => (ms > 0 ? rt.sleep(ms) : Promise.resolve()) }; - export interface Row { locale: string; placement: Placement; file: string; action: 'keep' | 'upload' | 'reuse' | 'wait' | 'select' | 'replace' | 'approve' | 'refuse'; state?: string; asset?: J } /** Local files per App Store locale, checked; throws on any error before a network call. */ diff --git a/cli/apple/duo-library.ts b/cli/apple/duo-library.ts index 8e090fc..76c2383 100644 --- a/cli/apple/duo-library.ts +++ b/cli/apple/duo-library.ts @@ -8,18 +8,18 @@ // 3. POST appAssetLibraryPlacements (placementType APP_SCREENSHOT, placementGroup, the version localization). // Screenshots are reviewed with the version, so a processed asset is placed at once (no approval wait). // Upsert: a group whose placements already show the local files in order is left alone; otherwise its placements are -// removed and the files placed in order (outer display files first, then inner; at most 10). Read back at the end. +// removed and the files placed in order (outer display files first, then inner). Never truncated: more files than +// the limit Apple publishes for the group (refData groupLimits) changes nothing and says so. Read back at the end. import { readFileSync } from 'node:fs'; import { basename } from 'node:path'; import { log, warn } from '../lib/log'; import { elapsed } from '../lib/progress'; -import { classify, pickAsset, processingTiming, REF, selectable } from './creative-assets'; +import { classify, pickAsset, processingTiming, REF, selectable } from './asset-library'; import { type Asc, md5, type J } from './asc'; import { partHeaders } from './screenshot-health'; const TAG = 'apple'; export const DUO_CATEGORY = 'APP_SCREENSHOTS_AND_PREVIEWS'; -export const DUO_MAX = 10; const sumOf = (a: J | undefined): string | undefined => /^storebound ([0-9a-f]{32})$/.exec(String(a?.attributes?.referenceName ?? ''))?.[1]; /** iPhone placement profile group ids (platform IOS or IPHONE_APP_STORE, as the live API answers) of the IPHONE_DUO display class in an appAssetLibraryRefData response. Pure. */ @@ -30,26 +30,44 @@ export function duoGroups(refData: J[]): string[] { return [...ids]; } +/** Apple's screenshot limit for a placement group on a version page, or null when refData publishes none. Pure. */ +export function duoLimit(refData: J[], group: string): number | null { + for (const r of refData) for (const f of (r?.attributes?.features ?? []) as J[]) { + if (f?.featureId !== 'APP_STORE_VERSIONS') continue; + for (const p of (f.placementPolicies ?? []) as J[]) { + if (p?.placementType !== 'APP_SCREENSHOT') continue; + for (const l of (p.groupLimits ?? []) as J[]) if ((l?.groupIds ?? []).includes(group) && typeof l.maxCount === 'number') return l.maxCount; + } + } + return null; +} + /** Whether a group's current placements (asset MD5s in order) already show `want`. Pure. */ export const duoUpToDate = (shown: (string | undefined)[], want: string[]): boolean => shown.length === want.length && shown.every((s, i) => s === want[i]); export interface DuoResult { locale: string; action: 'keep' | 'place' | 'wait' | 'refuse' | 'plan'; files: number } /** Resolves the Duo placement group once per run; throws with the guardrail text when the API lists none. */ -export async function duoGroup(c: Asc): Promise { +export async function duoGroup(c: Asc): Promise<{ id: string; limit: number | null }> { const ref = await c.all('/v1/appAssetLibraryRefData?filter[placementTypes]=APP_SCREENSHOT'); const g = duoGroups(ref); if (!g.length) throw new Error('appAssetLibraryRefData lists no iOS IPHONE_DUO placement group for APP_SCREENSHOT: report it (pitfall 130); the console version page > App Previews and Screenshots > iPhone Duo takes them meanwhile'); if (g.length > 1) log(TAG, `iPhone Duo: ${g.length} placement groups (${g.join(', ')}), using ${g[0]}`); - return g[0]!; + const limit = duoLimit(ref, g[0]!); + log(TAG, `iPhone Duo: placement group ${g[0]}, limit ${limit ?? 'not published'}`); + return { id: g[0]!, limit }; } /** Makes the iPhone Duo screenshots of one version localization show `files` in order. */ -export async function syncDuo(c: Asc, o: { appId: string; group: string; loc: J; files: string[]; dry: boolean }): Promise { +export async function syncDuo(c: Asc, o: { appId: string; group: string; limit: number | null; loc: J; files: string[]; dry: boolean }): Promise { const locale: string = o.loc.attributes.locale; const tag = `${locale} IPHONE_DUO`; - const files = o.files.slice(0, DUO_MAX); - if (o.files.length > DUO_MAX) warn(TAG, `${tag}: ${o.files.length} files, only the first ${DUO_MAX} are used`); + const files = o.files; + if (o.limit !== null && files.length > o.limit) { + warn(TAG, `${tag}: ${files.length} files (outer + inner) but Apple allows ${o.limit} in this group: nothing changed, none dropped. Keep at most ${o.limit} across iphone-duo-outer/ and iphone-duo-inner/`); + process.exitCode = 1; + return { locale, action: 'refuse', files: files.length }; + } const lib = (await c.asc('GET', `/v1/apps/${o.appId}/assetLibrary`)).data as J; const library = () => c.all(`/v1/appAssetLibraries/${lib.id}/images?filter[category]=${DUO_CATEGORY}&limit=200`); let assets = await library(); diff --git a/cli/apple/screenshots.ts b/cli/apple/screenshots.ts index de2f3fe..f2439fd 100644 --- a/cli/apple/screenshots.ts +++ b/cli/apple/screenshots.ts @@ -1,6 +1,6 @@ // Store screenshots of every locale on the editable App Store version (idempotent: a set whose files already match // by MD5 and order is left alone, otherwise it is emptied and re-uploaded). -// storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4] [--variant b] [--dry] +// storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4] [--variant b] [--duo-only] [--dry] // storebound apple screenshots --repair-stuck [--dry] (only the screenshots stuck outside COMPLETE, in place) // Source per language: //ios69/NN.png (6.9", 1320 x 2868 -> APP_IPHONE_67), // ios65/NN.png (6.5", 1284 x 2778 -> APP_IPHONE_65) and, only with apple.ipad, ipad13/NN.png (13" iPad, 2064 x 2752 -> @@ -98,7 +98,7 @@ export async function run(ctx: Ctx): Promise { log('apple', `screenshots for version ${versionLabel(version)}`); let duo = platform === 'MAC_OS' ? [] : duoDirs(config.apple); // a Duo problem never stops the other sets - const duoGroupId = duo.length ? await duoGroup(c).catch((e: Error) => { warn('apple', `iPhone Duo skipped: ${e.message}`); duo = []; return ''; }) : ''; + const duoGroupId = duo.length ? await duoGroup(c).catch((e: Error) => { warn('apple', `iPhone Duo skipped: ${e.message}`); duo = []; return null; }) : null; const appId = duo.length ? await c.app() : ''; if (platform === 'MAC_OS' && !config.apple?.mac) throw new Error('macOS version: set apple.mac: true and render the mac size (storebound shots render --size mac) first'); if (platform !== 'MAC_OS' && config.apple?.mac) log('apple', 'Mac screenshots (mac/, APP_DESKTOP) go to the macOS version: run apple screenshots --platform macos'); @@ -121,16 +121,16 @@ export async function run(ctx: Ctx): Promise { if (!lang) { warn('apple', `${locale}: no language with apple: "${locale}", skipped`); continue; } tasks.push(async () => { const sets = await c.all(`/v1/appStoreVersionLocalizations/${loc.id}/appScreenshotSets`); - for (const [dir, type] of Object.entries(displaySets(config.apple, platform))) { + for (const [dir, type] of Object.entries(ctx.args.has('duo-only') ? {} : displaySets(config.apple, platform))) { const d = join(src, lang.id, dir); const files = numberedImages(d).filter(f => f.endsWith('.png')).slice(0, 10); if (!existsSync(d) || !files.length) { warn('apple', `${locale}: nothing in ${d}, skipped`); continue; } await syncSet(loc.id, sets, type, files, `${locale} ${type}`); } - if (duo.length) { + if (duo.length && duoGroupId) { const files = duo.flatMap(dir => numberedImages(join(src, lang.id, dir)).filter(f => f.endsWith('.png'))); if (!files.length) warn('apple', `${locale}: nothing in ${duo.map(d => join(src, lang.id, d)).join(' or ')}, iPhone Duo skipped`); - else await syncDuo(c, { appId, group: duoGroupId, loc, files, dry: ctx.args.has('dry') }).catch((e: Error) => { warn('apple', `${locale} iPhone Duo: ${e.message}`); process.exitCode = 1; }); + else await syncDuo(c, { appId, group: duoGroupId.id, limit: duoGroupId.limit, loc, files, dry: ctx.args.has('dry') }).catch((e: Error) => { warn('apple', `${locale} iPhone Duo: ${e.message}`); process.exitCode = 1; }); } }); } diff --git a/cli/data/flags.json b/cli/data/flags.json index b8058b6..fcb31d3 100644 --- a/cli/data/flags.json +++ b/cli/data/flags.json @@ -106,7 +106,7 @@ "name" ], "apple cpp": [ - "add-for-review", + "duo-only", "include-drafts", "jobs", "name", @@ -117,7 +117,6 @@ "repair-stuck", "src", "variant", - "verify", "write" ], "apple creative-assets": [ @@ -206,7 +205,7 @@ "write" ], "apple ppo": [ - "add-for-review", + "duo-only", "experiment", "include-drafts", "jobs", @@ -218,7 +217,6 @@ "src", "traffic", "variant", - "verify", "write" ], "apple preorder": [ @@ -274,7 +272,7 @@ "platform" ], "apple screenshots": [ - "add-for-review", + "duo-only", "include-drafts", "jobs", "not-sent-for-review", @@ -283,7 +281,6 @@ "repair-stuck", "src", "variant", - "verify", "write" ], "apple signing": [ @@ -1119,6 +1116,7 @@ "cordova-android", "cordova-ios", "days", + "duo-only", "expo", "flutter", "godot", @@ -1250,6 +1248,7 @@ "device", "dir", "download", + "duo-only", "enable", "end", "entitlements", @@ -1594,7 +1593,7 @@ "storebound apple review-details [--platform ios|macos|tvos|visionos] [--contact-from ] [--dry]" ], "apple screenshots": [ - "storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4] [--variant b] [--dry]", + "storebound apple screenshots [--src store/renders] [--only en-US,tr] [--jobs 4] [--variant b] [--duo-only] [--dry]", "storebound apple screenshots --repair-stuck [--dry] (only the screenshots stuck outside COMPLETE, in place)" ], "apple signing": [ diff --git a/tests/ppo.test.ts b/tests/ppo.test.ts index 0d147fa..b63e096 100644 --- a/tests/ppo.test.ts +++ b/tests/ppo.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test'; import { displaySets, duoDirs } from '../cli/apple/screenshots'; -import { duoGroups, duoUpToDate } from '../cli/apple/duo-library'; +import { duoGroups, duoLimit, duoUpToDate } from '../cli/apple/duo-library'; import { appleRules } from '../cli/lib/validate-rules'; import { checkCreate, createExperimentReq, defaultName, experimentFromApi, pickExperiment, planTreatmentLocales, planTreatments, startStopReq } from '../cli/lib/ppo'; import { validateConfig } from '../cli/lib/config'; @@ -105,6 +105,9 @@ describe('iPhone Duo (foldable) sizes', () => { expect(duoGroups(ref)).toEqual(['g-duo']); expect(duoGroups([])).toEqual([]); expect(duoGroups([{ attributes: { placementProfileGroups: [{ placementProfileGroupId: 'IPHONE_DUO_PROFILE', platform: 'IPHONE_APP_STORE', displayClassId: 'IPHONE_DUO' }] } }])).toEqual(['IPHONE_DUO_PROFILE']); + const lim = [{ attributes: { features: [{ featureId: 'IN_APP_EVENTS', placementPolicies: [{ placementType: 'APP_SCREENSHOT', groupLimits: [{ groupIds: ['g'], maxCount: 1 }] }] }, { featureId: 'APP_STORE_VERSIONS', placementPolicies: [{ placementType: 'APP_SCREENSHOT', groupLimits: [{ groupIds: ['g'], maxCount: 20 }] }] }] } }]; + expect(duoLimit(lim, 'g')).toBe(20); + expect(duoLimit(lim, 'other')).toBeNull(); expect(duoUpToDate(['a', 'b'], ['a', 'b'])).toBe(true); expect(duoUpToDate(['b', 'a'], ['a', 'b'])).toBe(false); expect(duoUpToDate(['a', undefined], ['a', 'b'])).toBe(false); From 73e4614b34b7349f58f1fdd77cafa232a00da599 Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 9 Nov 2026 06:37:51 +0700 Subject: [PATCH 71/73] storebound 0.8.77: version in package.json and every copy, CHANGELOG 0.8.77 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 05ef60d..fcc4c0d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.76", + "version": "0.8.77", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 9d027bf..4b980c5 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.76", + "version": "0.8.77", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 654fc45..397705c 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.76", + "version": "0.8.77", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d1e2ed..a0bcd5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.77 · 2026-11-08 + - **iPhone Duo:** outer and inner files are no longer cut to the first 10: the limit comes from Apple's reference data, and over it nothing changes and nothing is dropped. `apple screenshots --duo-only` writes only the Duo set. `apple cpp` no longer lists creative-assets flags. ## 0.8.76 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index fe04e9d..395fdfd 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.76", + "version": "0.8.77", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index 5c1bdec..be06ab9 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.76" +version = "0.8.77" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 4d0f9db..95dca43 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.76" +version = "0.8.77" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index cee5333..ab2239f 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.76", + "version": "0.8.77", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 451ed18..112ed09 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.76", + "version": "0.8.77", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index b78b422..a62d97e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.76", + "version": "0.8.77", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa", From af61adb9d1ac25da191219882a3b7d80ed837343 Mon Sep 17 00:00:00 2001 From: CRT Date: Mon, 16 Nov 2026 22:11:56 +0700 Subject: [PATCH 72/73] apple build: short fix lines first in the device-family stop; test: a stopped build exits non-zero --- CHANGELOG.md | 2 ++ cli/apple/build.ts | 12 +++++++++++- tests/apple-release-gaps.test.ts | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0bcd5e..a82a57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +- **apple build:** the device-family stop prints short `fix:` lines first (e.g. `fix: apple.ipad: true in storebound.config.ts`); a test proves a stopped build exits non-zero through the ship-step path. + ## 0.8.77 · 2026-11-08 - **iPhone Duo:** outer and inner files are no longer cut to the first 10: the limit comes from Apple's reference data, and over it nothing changes and nothing is dropped. `apple screenshots --duo-only` writes only the Duo set. `apple cpp` no longer lists creative-assets flags. diff --git a/cli/apple/build.ts b/cli/apple/build.ts index 1655081..c70fdc2 100644 --- a/cli/apple/build.ts +++ b/cli/apple/build.ts @@ -201,7 +201,7 @@ export async function run(ctx: Ctx): Promise { const familyBlockers = deviceFamilies.filter(d => d.level === 'blocker'); for (const d of deviceFamilies) if (d.level === 'warn' || (d.level === 'blocker' && (dry || a.has('allow-device-gap')))) warn(TAG, `${d.msg}${d.fix ? ` -> ${d.fix}` : ''}`); if (familyBlockers.length && !dry && !a.has('allow-device-gap')) - throw new Error(`stopped before the archive: ${familyBlockers.map(d => `${d.msg}. Fix: ${d.fix}`).join('\n')}\n(--allow-device-gap builds anyway)`); + throw new Error(`${familyFixLines(familyBlockers, config.apple?.ipad).join('\n')}\nstopped before the archive: ${familyBlockers.map(d => `${d.msg}. Fix: ${d.fix}`).join('\n')}\n(--allow-device-gap builds anyway)`); const scan = discoverTargets(root, config); const ids = [bundleId, ...scan.extensions.map(t => t.bundleId)]; @@ -313,3 +313,13 @@ export async function run(ctx: Ctx): Promise { if (json) printJson(result); done(TAG, `${relative(root, result.ipa)}: ${info.bundleId} ${info.version} (${info.build}). Next: storebound apple upload ${relative(root, result.ipa)} --dry`); } + +/** Short "fix:" lines put first in the device-family stop, so a truncated or piped log still shows the fix. Pure. */ +export function familyFixLines(blockers: { msg: string }[], ipad: boolean | undefined): string[] { + const out = new Set(); + for (const b of blockers) { + if (/TARGETED_DEVICE_FAMILY = 1\b|no iPad\)/.test(b.msg)) out.add('fix: TARGETED_DEVICE_FAMILY "1,2" in the Xcode project (Supported Destinations: add iPad)'); + if (ipad !== true && /iPad/.test(b.msg)) out.add('fix: apple.ipad: true in storebound.config.ts'); + } + return [...out]; +} diff --git a/tests/apple-release-gaps.test.ts b/tests/apple-release-gaps.test.ts index 14fd382..1c4b2e7 100644 --- a/tests/apple-release-gaps.test.ts +++ b/tests/apple-release-gaps.test.ts @@ -302,6 +302,10 @@ describe('device families (fake App Store Connect + project)', () => { // the escape hatch passes the check (the run then stops later: no Xcode on this machine) const gap = await capture(() => appleBuild(p.ctx([...argv, '--allow-device-gap']))).catch(e => ({ out: '', err: String((e as Error).message ?? e), exit: 1 })); expect(gap.err).not.toContain('stopped before the archive'); + // the ship-step path (apple build --yes): a stopped build never exits 0, and the fix is its own short line + const sr = await ship('apple build', [...argv, '--yes'], a => appleBuild({ ...p.ctx(argv), args: a })); + expect(sr.code).not.toBe(0); + expect(sr.err).toMatch(/^fix: apple\.ipad: true in storebound\.config\.ts$/m); }); test('apple build passes the check with iPad in the project and apple.ipad true; an iPhone-only live version never blocks', async () => { From 6d14eda8cc4889615c0c36ed75ce511076922f09 Mon Sep 17 00:00:00 2001 From: CRT Date: Tue, 17 Nov 2026 00:59:46 +0700 Subject: [PATCH 73/73] storebound 0.8.78: version in package.json and every copy, CHANGELOG 0.8.78 section --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- CHANGELOG.md | 2 ++ apps/desktop/package.json | 2 +- apps/desktop/src-tauri/Cargo.lock | 2 +- apps/desktop/src-tauri/Cargo.toml | 2 +- apps/desktop/src-tauri/tauri.conf.json | 2 +- gemini-extension.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index fcc4c0d..fe6fe00 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "storebound", "source": ".", "description": "Take a mobile app or game from nothing to Submit for review on both stores: skills for every store step and questionnaire plus the storebound CLI and MCP server.", - "version": "0.8.77", + "version": "0.8.78", "category": "development", "tags": [ "mobile", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 4b980c5..f4d251d 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.77", + "version": "0.8.78", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 397705c..9f3a260 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.77", + "version": "0.8.78", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "author": { "name": "CRTkafa" diff --git a/CHANGELOG.md b/CHANGELOG.md index a82a57b..ce3f9f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased +## 0.8.78 · 2026-11-16 + - **apple build:** the device-family stop prints short `fix:` lines first (e.g. `fix: apple.ipad: true in storebound.config.ts`); a test proves a stopped build exits non-zero through the ship-step path. ## 0.8.77 · 2026-11-08 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 395fdfd..61cee9f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@storebound/desktop", - "version": "0.8.77", + "version": "0.8.78", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index be06ab9..94cd929 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storebound-desktop" -version = "0.8.77" +version = "0.8.78" dependencies = [ "base64 0.22.1", "getrandom 0.3.4", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 95dca43..0bf68a9 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storebound-desktop" -version = "0.8.77" +version = "0.8.78" description = "storebound desktop: every game's releases on both stores in one window" license = "MIT" edition = "2021" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index ab2239f..8815a41 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "storebound", "mainBinaryName": "storebound-desktop", - "version": "0.8.77", + "version": "0.8.78", "identifier": "dev.storebound.desktop", "build": { "frontendDist": "../dist", diff --git a/gemini-extension.json b/gemini-extension.json index 112ed09..63f42ab 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.77", + "version": "0.8.78", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every questionnaire (Data safety, App access and demo accounts, account deletion, IARC, target audience, ads, App Privacy, age rating, export compliance), privacy, icons, screenshots and previews, validate, TestFlight, release management, and after launch: crash vitals, review replies, price sheets, store analytics, Product Page Optimization. Agent Skills plus a Bun CLI and MCP server (storebound); you press Submit. CRTkafa's own toolchain, open-sourced.", "contextFileName": "GEMINI.md", "mcpServers": { diff --git a/package.json b/package.json index a62d97e..f9504d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "storebound", - "version": "0.8.77", + "version": "0.8.78", "description": "Take a mobile app or game from nothing to Submit for review on Google Play and the App Store: app records, listings in every language, in-app products and subscriptions with regional prices, every store questionnaire (incl. account deletion and App Review demo accounts), privacy, icons, screenshots and previews, TestFlight. After launch: crash vitals, review replies, price sheets, analytics and Product Page Optimization. One config, a CLI (Node 20+ or Bun), an MCP server and Agent Skills for your AI coding agent.", "license": "MIT", "author": "CRTkafa",