@capgo/cli 8.32.7 → 8.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +16 -7
  2. package/dist/index.js +699 -707
  3. package/dist/package.json +6 -3
  4. package/dist/src/analytics/cli-headers.d.ts +9 -0
  5. package/dist/src/analytics/org-resolver.d.ts +3 -1
  6. package/dist/src/api/app.d.ts +16 -4
  7. package/dist/src/api/channels.d.ts +31 -46
  8. package/dist/src/api/versions.d.ts +13 -4
  9. package/dist/src/app/list.d.ts +1 -1
  10. package/dist/src/build/onboarding/android/ui/app.d.ts +2 -0
  11. package/dist/src/build/onboarding/command.d.ts +2 -0
  12. package/dist/src/build/onboarding/ui/app.d.ts +2 -0
  13. package/dist/src/build/onboarding/ui/shell.d.ts +2 -0
  14. package/dist/src/build/prescan/command.d.ts +4 -0
  15. package/dist/src/build/prescan/engine.d.ts +4 -1
  16. package/dist/src/build/prescan/overrides.d.ts +21 -0
  17. package/dist/src/build/prescan/registry.d.ts +2 -0
  18. package/dist/src/bundle/auto-bump-ai.d.ts +50 -0
  19. package/dist/src/bundle/upload.d.ts +14 -0
  20. package/dist/src/capacitor-cli.d.ts +1 -0
  21. package/dist/src/channel/add.d.ts +0 -36
  22. package/dist/src/init/command-execution.d.ts +37 -0
  23. package/dist/src/init/command.d.ts +1 -0
  24. package/dist/src/mcp/tool-schemas.d.ts +7 -0
  25. package/dist/src/posthog.d.ts +8 -0
  26. package/dist/src/preview/qr.d.ts +13 -9
  27. package/dist/src/schemas/auth.d.ts +2 -2
  28. package/dist/src/schemas/build.d.ts +2 -0
  29. package/dist/src/schemas/bundle.d.ts +8 -0
  30. package/dist/src/schemas/sdk.d.ts +10 -0
  31. package/dist/src/sdk.js +384 -395
  32. package/dist/src/shared/cli-user-error.d.ts +20 -0
  33. package/dist/src/types/supabase.types.d.ts +3 -0
  34. package/dist/src/utils.d.ts +73 -6
  35. package/dist/src/versionHelpers.d.ts +33 -0
  36. package/package.json +6 -3
  37. package/skills/native-builds/SKILL.md +20 -4
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Marker for *expected* CLI failures that represent a legitimate user-facing
3
+ * state — missing input, a channel with no bundle linked, insufficient
4
+ * permissions — rather than a crash. The CLI still prints a clear message and
5
+ * exits non-zero, but `shouldCapturePosthogException` skips these so they never
6
+ * open an error tracking `$exception` issue. They are still counted via
7
+ * `trackCommandFailed` / `categorizeCliError`, so failure analytics stay intact.
8
+ *
9
+ * Keep any dynamic identifier (e.g. a channel name) OUT of the message and pass
10
+ * it via `context` instead: interpolating it into the message makes error
11
+ * tracking fingerprint a separate issue per value, which is exactly the noise
12
+ * this class exists to avoid.
13
+ *
14
+ * Precedent for domain-specific error markers already exists in the CLI with
15
+ * `MacOSSigningError` and `BuildRecordReadError`.
16
+ */
17
+ export declare class CliUserError extends Error {
18
+ readonly context?: Record<string, unknown>;
19
+ constructor(message: string, context?: Record<string, unknown>);
20
+ }
@@ -1514,6 +1514,7 @@ export type Database = {
1514
1514
  versions_created: number;
1515
1515
  apps_with_cli_onboarding_builds_24h: number;
1516
1516
  apps_with_manual_builds_24h: number;
1517
+ apps_with_preview: number;
1517
1518
  apps_active: number | null;
1518
1519
  average_ltv: number;
1519
1520
  build_avg_seconds_day_android: number;
@@ -1607,6 +1608,7 @@ export type Database = {
1607
1608
  versions_created?: number;
1608
1609
  apps_with_cli_onboarding_builds_24h?: number;
1609
1610
  apps_with_manual_builds_24h?: number;
1611
+ apps_with_preview?: number;
1610
1612
  apps_active?: number | null;
1611
1613
  average_ltv?: number;
1612
1614
  build_avg_seconds_day_android?: number;
@@ -1700,6 +1702,7 @@ export type Database = {
1700
1702
  versions_created?: number;
1701
1703
  apps_with_cli_onboarding_builds_24h?: number;
1702
1704
  apps_with_manual_builds_24h?: number;
1705
+ apps_with_preview?: number;
1703
1706
  apps_active?: number | null;
1704
1707
  average_ltv?: number;
1705
1708
  build_avg_seconds_day_android?: number;
@@ -24,6 +24,14 @@ export declare const TUS_UPLOAD_RETRY_DELAYS: number[];
24
24
  export declare const MAX_MANIFEST_ENTRIES = 10000;
25
25
  /** User-facing error when a delta/manifest upload exceeds MAX_MANIFEST_ENTRIES. */
26
26
  export declare function deltaManifestTooLargeMessage(fileCount: number): string;
27
+ /**
28
+ * Stable `name` for the error thrown when the standard (non-TUS) upload hits its
29
+ * wall-clock timeout. Kept typed and constant so error tracking groups every
30
+ * occurrence into a single issue instead of one duplicate per CLI version.
31
+ */
32
+ export declare const UPLOAD_TIMEOUT_ERROR_NAME = "BundleUploadTimeoutError";
33
+ /** User-facing error when the standard HTTP PUT upload exceeds its wall-clock timeout. */
34
+ export declare function uploadTimeoutMessage(timeoutMs: number): string;
27
35
  export declare const PACKNAME = "package.json";
28
36
  export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
29
37
  export type Organization = ArrayElement<Database['public']['Functions']['get_orgs_v7']['Returns']>;
@@ -135,7 +143,14 @@ interface CapgoConfig {
135
143
  hostFilesApi: string;
136
144
  hostApi: string;
137
145
  }
138
- export declare function getRemoteConfig(silent?: boolean, signal?: AbortSignal): Promise<CapgoConfig>;
146
+ export declare function getRemoteConfig(silent?: boolean, signal?: AbortSignal): Promise<{
147
+ supaHost?: string;
148
+ supaKey?: string;
149
+ host: string;
150
+ hostWeb: string;
151
+ hostFilesApi: string;
152
+ hostApi: string;
153
+ }>;
139
154
  interface CapgoFilesConfig {
140
155
  partialUpload: boolean;
141
156
  partialUploadForced: boolean;
@@ -148,12 +163,42 @@ interface CapgoFilesConfig {
148
163
  export declare function getRemoteFileConfig(): Promise<CapgoFilesConfig>;
149
164
  export declare function normalizeSupabaseHost(host: string): string;
150
165
  export declare function formatCapgoApiErrorBody(body: unknown): string;
151
- /** Resolve Capgo public API base URL for CLI mutations (app create/update, etc.). */
166
+ /** Capgo-managed Supabase hosts (cloud). Match hostname exactly. */
167
+ export declare function isCapgoManagedSupabaseHost(supaHost?: string): boolean;
168
+ /**
169
+ * Resolve Capgo public API base URL for CLI mutations (app create/update, etc.).
170
+ * Capgo cloud uses api.capgo.app. Self-host with only localSupa (default localApi)
171
+ * keeps /functions/v1 on that Supabase host.
172
+ */
152
173
  export declare function resolveConfiguredCapgoPublicApiHost(config: {
153
174
  hostApi: string;
175
+ hostFilesApi?: string;
154
176
  supaHost?: string;
155
177
  supaKey?: string;
156
178
  }): string;
179
+ export interface CapgoCliInvokeOptions {
180
+ apikey: string;
181
+ method?: string;
182
+ body?: unknown;
183
+ /** Capgo cloud files worker; ignored when resolving to self-host /functions/v1 */
184
+ useFilesHost?: boolean;
185
+ supaHost?: string;
186
+ supaAnon?: string;
187
+ signal?: AbortSignal;
188
+ }
189
+ export declare function getCapgoCliHttpStatus(error: unknown): number | undefined;
190
+ export declare function readCapgoCliApiErrorPayload(error: unknown): Promise<{
191
+ error?: string;
192
+ message?: string;
193
+ } | null>;
194
+ /**
195
+ * Invoke Capgo HTTP APIs formerly reached via supabase.functions.invoke.
196
+ * Capgo cloud -> hostApi / hostFilesApi. Self-host -> /functions/v1.
197
+ */
198
+ export declare function invokeCapgoCliApi<T = any>(path: string, options: CapgoCliInvokeOptions): Promise<{
199
+ data: T | null;
200
+ error: Error | null;
201
+ }>;
157
202
  export declare function resolveCapgoPublicApiHost(options?: {
158
203
  supaHost?: string;
159
204
  supaAnon?: string;
@@ -1589,6 +1634,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1589
1634
  versions_created: number;
1590
1635
  apps_with_cli_onboarding_builds_24h: number;
1591
1636
  apps_with_manual_builds_24h: number;
1637
+ apps_with_preview: number;
1592
1638
  apps_active: number | null;
1593
1639
  average_ltv: number;
1594
1640
  build_avg_seconds_day_android: number;
@@ -1682,6 +1728,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1682
1728
  versions_created?: number;
1683
1729
  apps_with_cli_onboarding_builds_24h?: number;
1684
1730
  apps_with_manual_builds_24h?: number;
1731
+ apps_with_preview?: number;
1685
1732
  apps_active?: number | null;
1686
1733
  average_ltv?: number;
1687
1734
  build_avg_seconds_day_android?: number;
@@ -1775,6 +1822,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1775
1822
  versions_created?: number;
1776
1823
  apps_with_cli_onboarding_builds_24h?: number;
1777
1824
  apps_with_manual_builds_24h?: number;
1825
+ apps_with_preview?: number;
1778
1826
  apps_active?: number | null;
1779
1827
  average_ltv?: number;
1780
1828
  build_avg_seconds_day_android?: number;
@@ -5664,7 +5712,10 @@ export declare function findMainFileForProjectType(projectType: string, isTypeSc
5664
5712
  export declare function findBuildCommandForProjectType(projectType: string): Promise<"build" | "generate">;
5665
5713
  export declare function findMainFile(silent?: boolean, rootDir?: string): Promise<string>;
5666
5714
  export declare function updateOrCreateVersion(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['app_versions']['Insert']): Promise<import("@supabase/supabase-js").PostgrestSingleResponse<null>>;
5667
- export declare function uploadUrl(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<string>;
5715
+ export declare function uploadUrl(apikey: string, appId: string, name: string, options?: {
5716
+ supaHost?: string;
5717
+ supaAnon?: string;
5718
+ }): Promise<string>;
5668
5719
  export declare const BROTLI_MIN_UPDATER_VERSION_V5 = "5.10.0";
5669
5720
  export declare const BROTLI_MIN_UPDATER_VERSION_V6 = "6.25.0";
5670
5721
  export declare const BROTLI_MIN_UPDATER_VERSION_V7 = "7.0.30";
@@ -5677,8 +5728,13 @@ export type manifestType = Awaited<ReturnType<typeof generateManifest>>;
5677
5728
  export declare function zipFile(filePath: string): Promise<Buffer>;
5678
5729
  export declare function zipFileUnix(filePath: string): Buffer<ArrayBufferLike>;
5679
5730
  export declare function zipFileWindows(filePath: string): Promise<Buffer>;
5731
+ export declare function appAddHintMessage(appId: string): string;
5732
+ export declare function isAppNotFoundError(error: unknown): boolean;
5680
5733
  export declare function uploadTUS(apikey: string, data: Buffer, orgId: string, appId: string, name: string, spinner: UploadSpinner, localConfig: CapgoConfig, chunkSize: number): Promise<boolean>;
5681
- export declare function deletedFailedVersion(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<void>;
5734
+ export declare function deletedFailedVersion(apikey: string, appId: string, name: string, options?: {
5735
+ supaHost?: string;
5736
+ supaAnon?: string;
5737
+ }): Promise<void>;
5682
5738
  export interface VersionManifestEntry {
5683
5739
  file_name: string;
5684
5740
  s3_path: string;
@@ -5688,7 +5744,10 @@ export interface VersionManifestEntry {
5688
5744
  * Writes delta manifest rows through the backend (file_size stays 0 until R2 size lookup).
5689
5745
  * Prefer this over writing app_versions.manifest jsonb — old CLIs still use that legacy path.
5690
5746
  */
5691
- export declare function setVersionManifest(supabase: SupabaseClient<Database>, appId: string, name: string, manifest: VersionManifestEntry[]): Promise<void>;
5747
+ export declare function setVersionManifest(apikey: string, appId: string, name: string, manifest: VersionManifestEntry[], options?: {
5748
+ supaHost?: string;
5749
+ supaAnon?: string;
5750
+ }): Promise<void>;
5692
5751
  export declare function updateOrCreateChannel(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['channels']['Insert']): Promise<import("@supabase/supabase-js").PostgrestSingleResponse<{
5693
5752
  allow_dev: boolean;
5694
5753
  allow_device: boolean;
@@ -5751,7 +5810,10 @@ export declare function assertCliPermission(supabase: SupabaseClient<Database>,
5751
5810
  silent?: boolean;
5752
5811
  }): Promise<void>;
5753
5812
  export declare function assertOrgPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, orgId: string, message: string, silent: boolean): Promise<void>;
5754
- export declare function getOrganizationId(supabase: SupabaseClient<Database>, appId: string): Promise<string>;
5813
+ export declare function getOrganizationId(apikey: string, appId: string, options?: {
5814
+ supaHost?: string;
5815
+ supaAnon?: string;
5816
+ }): Promise<string>;
5755
5817
  export declare function getHumanDate(createdA: string | null): string;
5756
5818
  export declare function getPMAndCommand(): {
5757
5819
  pm: PackageManagerType;
@@ -5759,6 +5821,11 @@ export declare function getPMAndCommand(): {
5759
5821
  installCommand: string;
5760
5822
  runner: PackageManagerRunner;
5761
5823
  };
5824
+ export declare function setPMAndCommand(next: {
5825
+ pm: PackageManagerType;
5826
+ command: InstallCommand;
5827
+ runner: PackageManagerRunner;
5828
+ }): void;
5762
5829
  export declare function getNativeProjectResetAdvice(platformRunner: string, nativePlatform: 'ios' | 'android'): {
5763
5830
  summary: string;
5764
5831
  command: string;
@@ -1,9 +1,42 @@
1
+ /** CLI / API auto-bump levels (fix is normalized to patch at parse time) */
2
+ export type AutoBumpLevel = 'major' | 'minor' | 'patch' | 'metadata';
3
+ /** Resolver input including AI-backed classification */
4
+ export type AutoBumpInput = AutoBumpLevel | 'ai';
5
+ /** @std/semver increment release types used by auto-bump */
6
+ export type AutoBumpRelease = 'major' | 'minor' | 'patch' | 'prerelease';
7
+ /**
8
+ * Normalize CLI/SDK auto-bump values including `ai`.
9
+ * - bare flag / true → minor
10
+ * - fix → patch
11
+ * - ai → ai (resolved later via Workers AI)
12
+ * - metadata stays metadata (mapped to prerelease increment later)
13
+ */
14
+ export declare function normalizeAutoBumpInput(level: string | boolean | undefined | null): AutoBumpInput | undefined;
15
+ /**
16
+ * Normalize CLI/SDK auto-bump values to concrete bump levels (excludes `ai`).
17
+ * Prefer `normalizeAutoBumpInput` when `ai` is allowed.
18
+ */
19
+ export declare function normalizeAutoBumpLevel(level: string | boolean | undefined | null): AutoBumpLevel | undefined;
20
+ export declare function autoBumpLevelToRelease(level: AutoBumpLevel | AutoBumpRelease): AutoBumpRelease;
21
+ /**
22
+ * Auto-bump a semver version by the given level
23
+ * @param currentVersion - The current version string (e.g., "1.0.0")
24
+ * @param level - major | minor | patch | metadata | prerelease
25
+ * @returns The bumped version or a fallback version if parsing fails
26
+ */
27
+ export declare function autoBumpVersionBy(currentVersion: string, level?: AutoBumpLevel | AutoBumpRelease): string;
1
28
  /**
2
29
  * Auto-bump a semver version by incrementing the patch number
3
30
  * @param currentVersion - The current version string (e.g., "1.0.0")
4
31
  * @returns The bumped version or a fallback version if parsing fails
5
32
  */
6
33
  export declare function autoBumpVersion(currentVersion: string): string;
34
+ /**
35
+ * Auto-bump a semver version by incrementing the minor number
36
+ * @param currentVersion - The current version string (e.g., "1.0.0")
37
+ * @returns The bumped version or a fallback version if parsing fails
38
+ */
39
+ export declare function autoBumpMinorVersion(currentVersion: string): string;
7
40
  /**
8
41
  * Interactively ask the user how to handle version bumping
9
42
  * @param currentVersion - The current version
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.32.7",
4
+ "version": "8.33.1",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -73,6 +73,7 @@
73
73
  "test:upload": "bun test/test-upload-validation.mjs",
74
74
  "test:fail-on-incompatible": "bun test/test-fail-on-incompatible.mjs",
75
75
  "test:native-dependencies": "bun test/test-native-dependencies.mjs",
76
+ "test:package-json-guard": "bun test/test-package-json-guard.mjs",
76
77
  "test:credentials": "bun test/test-credentials.mjs",
77
78
  "test:asc-key-protocol": "bun test/test-asc-key-protocol.mjs",
78
79
  "test:credentials-validation": "bun test/test-credentials-validation.mjs",
@@ -160,7 +161,7 @@
160
161
  "test:ios-marketing-version": "bun test/test-ios-marketing-version.mjs",
161
162
  "test:platform-flow-contract": "bun test/test-platform-flow-contract.mjs",
162
163
  "test:tail-engine-shared": "bun test/test-tail-engine-shared.mjs",
163
- "test": "bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation",
164
+ "test": "bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation",
164
165
  "test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
165
166
  "test:ai-log-capture": "bun test/test-ai-log-capture.mjs",
166
167
  "test:ai-analyze-flow": "bun test/test-ai-analyze-flow.mjs",
@@ -204,7 +205,9 @@
204
205
  "test:app-permission-helper": "bun test/test-app-permission-helper.mjs",
205
206
  "test:organization-set-api-host": "bun test/test-organization-set-api-host.mjs",
206
207
  "test:trial-warning": "bun test/test-trial-warning.mjs",
207
- "test:plan-validation": "bun test/test-plan-validation.mjs"
208
+ "test:plan-validation": "bun test/test-plan-validation.mjs",
209
+ "test:auto-bump-version": "bun test/test-auto-bump-version.mjs",
210
+ "test:auto-bump-ai-diff": "bun test/test-auto-bump-ai-diff.mjs"
208
211
  },
209
212
  "dependencies": {
210
213
  "@inkjs/ui": "^2.0.0",
@@ -7,6 +7,22 @@ description: Use when working with Capgo Cloud native iOS and Android build requ
7
7
 
8
8
  Use this skill for Capgo Cloud native iOS and Android build workflows.
9
9
 
10
+ ## Build prescan overrides
11
+
12
+ Before `build request` uploads, Capgo runs a local/remote **prescan**. Prefer per-check overrides over disabling the whole scan:
13
+
14
+ - `--prescan-skip <checkId>` — do not run that check (repeatable / comma-separated)
15
+ - `--prescan-warn <checkId>` — still run it, but downgrade findings to warning
16
+ - `--no-prescan` / `--prescan-ignore-fatal` — global escapes; use only when necessary
17
+
18
+ Example (intentional Capacitor `server.url` / Next.js shell):
19
+
20
+ ```bash
21
+ npx @capgo/cli@latest build request <appId> --platform ios --prescan-skip ios/capacitor-server-url-shipped
22
+ ```
23
+
24
+ Standalone: `build prescan` accepts `--skip` / `--warn`. Full catalog: `webdocs/prescan-checks.mdx`.
25
+
10
26
  ## Onboarding (automated iOS setup)
11
27
 
12
28
  ### `build init` (alias: `build onboarding`)
@@ -116,7 +132,7 @@ interface BuildLogger {
116
132
  - `--app-store-connect-team-id <id>`
117
133
  - `--ios-scheme <scheme>`
118
134
  - `--ios-target <target>`
119
- - `--ios-distribution <mode>`: `app_store` or `ad_hoc`
135
+ - `--ios-distribution <mode>`: `app_store` (default, uploads to TestFlight) or `ad_hoc` (skips store upload; use with `--output-upload` for IPA-only when the App Store app does not exist yet)
120
136
  - `--ios-provisioning-profile <mapping>`: repeatable path or `bundleId=path`
121
137
 
122
138
  #### Android request options
@@ -131,13 +147,13 @@ interface BuildLogger {
131
147
 
132
148
  #### Output behavior options
133
149
 
134
- - `--no-playstore-upload`: skip Play Store upload for the build, requires `--output-upload`
150
+ - `--output-upload`: upload the finished IPA/APK/AAB to Capgo storage and print a time-limited download link (and QR). Pair with `--no-playstore-upload` (Android) or `--ios-distribution ad_hoc` (iOS) for artifact-only builds
151
+ - `--no-output-upload`: skip Capgo storage upload (no download link); store upload can still happen when store credentials are set
152
+ - `--no-playstore-upload`: Android — skip Google Play upload for this build (ignores saved Play credentials). Requires `--output-upload`. Use when the Play app does not exist yet or you only need the AAB download
135
153
  - `--submit-to-store-review`: submit after upload instead of leaving a draft/inactive store release. Android completes the Google Play release; iOS submits to TestFlight external review.
136
154
  - `--store-release-name <name>`: Android Google Play version_name/release label.
137
155
  - `--store-release-notes <notes>`: Google Play changelog and iOS TestFlight What to Test text.
138
156
  - `--ios-testflight-groups <groups>`: comma-separated external TestFlight group names or IDs required with `--submit-to-store-review` on iOS.
139
- - `--output-upload`
140
- - `--no-output-upload`
141
157
  - `--output-retention <duration>`: `1h` to `7d`
142
158
  - `--skip-build-number-bump`
143
159
  - `--no-skip-build-number-bump`