@capgo/cli 8.90.0 → 8.90.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 (74) hide show
  1. package/README.md +92 -92
  2. package/dist/index.js +926 -936
  3. package/dist/notify-app-ready-worker.js +197 -203
  4. package/dist/onboarding-worker.js +464 -465
  5. package/dist/package.json +8 -8
  6. package/dist/src/analytics/api-perf.d.ts +39 -0
  7. package/dist/src/analytics/error-category.d.ts +1 -1
  8. package/dist/src/analytics/org-resolver.d.ts +2 -6
  9. package/dist/src/analytics/track.d.ts +1 -3
  10. package/dist/src/api/app.d.ts +31 -19
  11. package/dist/src/api/channels.d.ts +25 -52
  12. package/dist/src/api/cli-data.d.ts +27 -0
  13. package/dist/src/api/http-error.d.ts +9 -0
  14. package/dist/src/api/preflight.d.ts +53 -0
  15. package/dist/src/api/versions.d.ts +15 -59
  16. package/dist/src/app/add.d.ts +5 -9
  17. package/dist/src/app/debug.d.ts +1 -2
  18. package/dist/src/app/default-channels.d.ts +7 -9
  19. package/dist/src/app/list.d.ts +3 -70
  20. package/dist/src/auth/session.d.ts +1 -2
  21. package/dist/src/build/onboarding/android/ui/app.d.ts +2 -3
  22. package/dist/src/build/onboarding/app-selection.d.ts +2 -4
  23. package/dist/src/build/onboarding/appflow/tail.d.ts +1 -1
  24. package/dist/src/build/onboarding/command.d.ts +2 -3
  25. package/dist/src/build/onboarding/login.d.ts +1 -2
  26. package/dist/src/build/onboarding/ui/app.d.ts +2 -3
  27. package/dist/src/build/onboarding/ui/appflow-app.d.ts +1 -1
  28. package/dist/src/build/onboarding/ui/shell.d.ts +2 -3
  29. package/dist/src/build/prescan/command.d.ts +1 -2
  30. package/dist/src/build/prescan/context.d.ts +2 -3
  31. package/dist/src/build/prescan/types.d.ts +3 -4
  32. package/dist/src/bundle/auto-bump-ai.d.ts +6 -9
  33. package/dist/src/bundle/finalize-upload.d.ts +2 -4
  34. package/dist/src/bundle/list.d.ts +1 -25
  35. package/dist/src/bundle/manifest-upload.d.ts +1 -1
  36. package/dist/src/bundle/unlink.d.ts +1 -2
  37. package/dist/src/bundle/upload.d.ts +3 -3
  38. package/dist/src/channel/add.d.ts +3 -4
  39. package/dist/src/init/builder-setup.d.ts +1 -1
  40. package/dist/src/init/channel-selection.d.ts +2 -3
  41. package/dist/src/init/onboarding-report.d.ts +2 -4
  42. package/dist/src/init/replay.d.ts +2 -3
  43. package/dist/src/login.d.ts +1 -2
  44. package/dist/src/mcp/tool-schemas.d.ts +5 -5
  45. package/dist/src/observe/command.d.ts +1 -2
  46. package/dist/src/onboarding/background-api.d.ts +1 -1
  47. package/dist/src/onboarding/background-check.d.ts +0 -1
  48. package/dist/src/onboarding/background.d.ts +1 -2
  49. package/dist/src/organization/add.d.ts +2 -24
  50. package/dist/src/organization/list.d.ts +4 -34
  51. package/dist/src/organization/set.d.ts +4 -6
  52. package/dist/src/preview/qr.d.ts +1 -2
  53. package/dist/src/recovery/app-id.d.ts +1 -2
  54. package/dist/src/schemas/account.d.ts +2 -2
  55. package/dist/src/schemas/app.d.ts +6 -6
  56. package/dist/src/schemas/base.d.ts +2 -2
  57. package/dist/src/schemas/build.d.ts +4 -4
  58. package/dist/src/schemas/bundle.d.ts +13 -13
  59. package/dist/src/schemas/channel.d.ts +10 -10
  60. package/dist/src/schemas/onboarding.d.ts +1 -1
  61. package/dist/src/schemas/organization.d.ts +8 -8
  62. package/dist/src/schemas/sdk.d.ts +52 -52
  63. package/dist/src/sdk.d.ts +19 -8
  64. package/dist/src/sdk.js +449 -484
  65. package/dist/src/shared/network-error.d.ts +2 -2
  66. package/dist/src/shared/two-factor-compliance.d.ts +1 -1
  67. package/dist/src/types/api.d.ts +214 -0
  68. package/dist/src/user/whoami.d.ts +3 -4
  69. package/dist/src/utils.d.ts +135 -10894
  70. package/dist/updater-installed-worker.js +184 -190
  71. package/package.json +8 -8
  72. package/skills/usage/SKILL.md +2 -2
  73. package/dist/src/analytics/supabase-perf.d.ts +0 -48
  74. package/dist/src/types/supabase.types.d.ts +0 -5588
@@ -1,5 +1,5 @@
1
1
  import type { OptionsBase } from '../schemas/base';
2
- import type { Database } from '../types/supabase.types';
2
+ import type { AppRow } from '../types/api';
3
3
  interface AppListOptions extends OptionsBase {
4
4
  filterByOrgId?: string;
5
5
  showOrg?: boolean;
@@ -8,77 +8,10 @@ interface AppListOptions extends OptionsBase {
8
8
  }
9
9
  export declare const APP_LIST_ORG_FILTER_WARNING = "You have passed \"--filter-by-org-id\". You might have access to more apps. Remove the filter to see all apps";
10
10
  export declare function getAppListPath(page: number, orgId?: string): string;
11
- type AppRow = Database['public']['Tables']['apps']['Row'];
12
11
  export declare function formatAppsCsv(data: AppRow[]): string;
13
12
  export declare function formatAppListText(data: AppRow[]): string;
14
13
  export declare function getAppListHeaders(options: AppListOptions): string[];
15
14
  export declare function getAppListRow(row: AppRow, options: AppListOptions, orgNames: Map<string, string>): string[];
16
- export declare function listAppInternal(options: AppListOptions, silent?: boolean): Promise<{
17
- allow_device_custom_id: boolean;
18
- allow_preview: boolean;
19
- android_store_url: string | null;
20
- app_id: string;
21
- build_timeout_seconds: number;
22
- build_timeout_updated_at: string;
23
- block_provider_infra_requests: boolean;
24
- channel_device_count: number;
25
- created_at: string | null;
26
- created_from_onboarding: boolean;
27
- default_upload_channel: string;
28
- device_data_collection: import("../types/supabase.types").Json;
29
- existing_app: boolean;
30
- expose_metadata: boolean;
31
- icon_url: string;
32
- id: string | null;
33
- ios_store_url: string | null;
34
- last_version: string | null;
35
- manifest_bundle_count: number;
36
- rollout_channel_count: number;
37
- rollout_paused_version_names: string[];
38
- name: string | null;
39
- need_onboarding: boolean;
40
- onboarding: import("../types/supabase.types").Json;
41
- onboarding_completed_at: string | null;
42
- owner_org: string;
43
- retention: number;
44
- stats_refresh_requested_at: string | null;
45
- stats_updated_at: string | null;
46
- transfer_history: import("../types/supabase.types").Json[] | null;
47
- updated_at: string | null;
48
- user_id: string | null;
49
- }[]>;
50
- export declare function listApp(options: AppListOptions, silent?: boolean): Promise<{
51
- allow_device_custom_id: boolean;
52
- allow_preview: boolean;
53
- android_store_url: string | null;
54
- app_id: string;
55
- build_timeout_seconds: number;
56
- build_timeout_updated_at: string;
57
- block_provider_infra_requests: boolean;
58
- channel_device_count: number;
59
- created_at: string | null;
60
- created_from_onboarding: boolean;
61
- default_upload_channel: string;
62
- device_data_collection: import("../types/supabase.types").Json;
63
- existing_app: boolean;
64
- expose_metadata: boolean;
65
- icon_url: string;
66
- id: string | null;
67
- ios_store_url: string | null;
68
- last_version: string | null;
69
- manifest_bundle_count: number;
70
- rollout_channel_count: number;
71
- rollout_paused_version_names: string[];
72
- name: string | null;
73
- need_onboarding: boolean;
74
- onboarding: import("../types/supabase.types").Json;
75
- onboarding_completed_at: string | null;
76
- owner_org: string;
77
- retention: number;
78
- stats_refresh_requested_at: string | null;
79
- stats_updated_at: string | null;
80
- transfer_history: import("../types/supabase.types").Json[] | null;
81
- updated_at: string | null;
82
- user_id: string | null;
83
- }[]>;
15
+ export declare function listAppInternal(options: AppListOptions, silent?: boolean): Promise<AppRow[]>;
16
+ export declare function listApp(options: AppListOptions, silent?: boolean): Promise<AppRow[]>;
84
17
  export {};
@@ -26,8 +26,7 @@ export interface LoginState {
26
26
  export interface SaveKeyOptions {
27
27
  /** Persist to `./.capgo` (project-local) instead of `~/.capgo` (global). */
28
28
  local?: boolean;
29
- supaHost?: string;
30
- supaAnon?: string;
29
+ apiHost?: string;
31
30
  }
32
31
  /**
33
32
  * Validate an API key against Capgo and, if valid, persist it (0o600).
@@ -8,9 +8,8 @@ interface AppProps {
8
8
  androidDir: string;
9
9
  /** Optional Capgo API key passed via -a/--apikey flag; takes precedence over saved key. */
10
10
  apikey?: string;
11
- supaHost?: string;
12
- /** Custom Supabase anon key for self-hosting (--supa-anon). */
13
- supaAnon?: string;
11
+ /** Capgo API override (--api-host); Capgo cloud when omitted. */
12
+ apiHost?: string;
14
13
  /** Correlation id for this onboarding run; emitted as `journey_id` on every analytics event. */
15
14
  journeyId: string;
16
15
  /** Reports the current step to the shell on every transition, so the caller can
@@ -1,13 +1,12 @@
1
1
  import type { CapacitorConfig } from '../../config';
2
- import { createSupabaseClient, invokeCapgoCliApi } from '../../utils.js';
2
+ import { invokeCapgoCliApi } from '../../utils.js';
3
3
  export interface BuilderVisibleApp {
4
4
  app_id: string;
5
5
  name: string | null;
6
6
  need_onboarding?: boolean | null;
7
7
  }
8
8
  export interface BuilderAppApiOptions {
9
- supaHost?: string;
10
- supaAnon?: string;
9
+ apiHost?: string;
11
10
  }
12
11
  export type AppSelectionErrorCode = 'list' | 'read' | 'missing' | 'build' | 'permission' | 'config' | 'api';
13
12
  export declare class AppSelectionError extends Error {
@@ -22,7 +21,6 @@ export declare function rankVisibleApps<T extends BuilderVisibleApp>(apps: T[],
22
21
  export declare function listVisibleBuilderApps(apikey: string, options?: BuilderAppApiOptions, request?: typeof invokeCapgoCliApi): Promise<BuilderVisibleApp[]>;
23
22
  export declare function verifyBuilderApp(apikey: string, appId: string, options?: BuilderAppApiOptions, dependencies?: {
24
23
  request?: typeof invokeCapgoCliApi;
25
- createClient?: typeof createSupabaseClient;
26
24
  }): Promise<void>;
27
25
  export declare function persistBuilderAppSelection(appId: string): Promise<boolean>;
28
26
  export declare const builderAppCreationUrl: string;
@@ -22,7 +22,7 @@ export interface AppflowTailDepsOptions {
22
22
  /** Capgo API key flag (overrides the saved key, like the native drivers). */
23
23
  apikey?: string;
24
24
  /** Gateway override threaded into the build request options. */
25
- supaHost?: string;
25
+ apiHost?: string;
26
26
  /** Builder journey id threaded into the build request options. */
27
27
  journeyId?: string;
28
28
  /** Build VIEWER sink — every requesting-build line streams here (fullscreen pane). */
@@ -5,9 +5,8 @@ export interface OnboardingBuilderOptions {
5
5
  appId?: string;
6
6
  apikey?: string;
7
7
  platform?: string;
8
- supaHost?: string;
9
- /** Custom Supabase anon key for self-hosting (--supa-anon). */
10
- supaAnon?: string;
8
+ /** Capgo API override (--api-host); Capgo cloud when omitted. */
9
+ apiHost?: string;
11
10
  /**
12
11
  * Offer the self-update prompt as the first wizard screen. ONLY the genuine
13
12
  * `build init` / `onboarding` entrypoint sets this. Other callers that reach
@@ -1,7 +1,6 @@
1
1
  import type { BrowserLoginSession } from '../../init/browser-login.js';
2
2
  export interface BuilderLoginOptions {
3
- supaHost?: string;
4
- supaAnon?: string;
3
+ apiHost?: string;
5
4
  }
6
5
  export interface BuilderLoginServices {
7
6
  browserAvailable: boolean;
@@ -35,9 +35,8 @@ interface AppProps {
35
35
  guidedHelperUsable: boolean;
36
36
  /** Optional Capgo API key passed via -a/--apikey flag; takes precedence over saved key */
37
37
  apikey?: string;
38
- supaHost?: string;
39
- /** Custom Supabase anon key for self-hosting (--supa-anon). */
40
- supaAnon?: string;
38
+ /** Capgo API override (--api-host); Capgo cloud when omitted. */
39
+ apiHost?: string;
41
40
  /** Correlation id for this onboarding run; emitted as `journey_id` on every analytics event. */
42
41
  journeyId: string;
43
42
  /** Reports the current step to the shell on every transition, so the caller can
@@ -8,7 +8,7 @@ export interface AppflowAppProps {
8
8
  /** Migration scope ('ios' | 'android') from the single-platform "migrating from Appflow?" gate. */
9
9
  scope: MigrationScope;
10
10
  apikey?: string;
11
- supaHost?: string;
11
+ apiHost?: string;
12
12
  journeyId: string;
13
13
  onStep?: (step: string) => void;
14
14
  onResult?: (result: OnboardingResult) => void;
@@ -32,9 +32,8 @@ export interface OnboardingShellProps {
32
32
  guidedHelperUsable: boolean;
33
33
  apikey?: string;
34
34
  loginServices: BuilderLoginServices;
35
- supaHost?: string;
36
- /** Custom Supabase anon key for self-hosting (--supa-anon). */
37
- supaAnon?: string;
35
+ /** Capgo API override (--api-host); Capgo cloud when omitted. */
36
+ apiHost?: string;
38
37
  /** Correlation id for this onboarding run; threaded into every analytics event the apps emit. */
39
38
  journeyId: string;
40
39
  /** Pre-resolved platform (--platform flag or the single existing native dir); skips the picker. */
@@ -9,8 +9,7 @@ export interface PrescanCommandOptions {
9
9
  failOnWarnings?: boolean;
10
10
  ignoreFatal?: boolean;
11
11
  verbose?: boolean;
12
- supaHost?: string;
13
- supaAnon?: string;
12
+ apiHost?: string;
14
13
  /** Test seam for hard-coded rollout deadlines; defaults to the current time. */
15
14
  now?: Date;
16
15
  /**
@@ -1,5 +1,4 @@
1
- import type { SupabaseClient } from '@supabase/supabase-js';
2
- import type { Database } from '../../types/supabase.types';
1
+ import type { CapgoClient } from '../../utils';
3
2
  import type { Platform, ScanContext } from './types';
4
3
  export interface BuildScanContextArgs {
5
4
  appId?: string;
@@ -8,7 +7,7 @@ export interface BuildScanContextArgs {
8
7
  distributionMode?: 'app_store' | 'ad_hoc';
9
8
  androidFlavor?: string;
10
9
  apikey?: string;
11
- supabase?: SupabaseClient<Database>;
10
+ client?: CapgoClient;
12
11
  /** pre-merged credentials when called from build request (avoids double work) */
13
12
  credentials?: Record<string, string>;
14
13
  }
@@ -1,5 +1,4 @@
1
- import type { SupabaseClient } from '@supabase/supabase-js';
2
- import type { Database } from '../../types/supabase.types';
1
+ import type { CapgoClient } from '../../utils';
3
2
  import type { CapacitorConfig } from '../../schemas/config';
4
3
  export type Severity = 'error' | 'warning' | 'info';
5
4
  export type Platform = 'ios' | 'android';
@@ -32,14 +31,14 @@ export interface ScanContext {
32
31
  distributionMode?: 'app_store' | 'ad_hoc';
33
32
  androidFlavor?: string;
34
33
  apikey?: string;
35
- supabase?: SupabaseClient<Database>;
34
+ client?: CapgoClient;
36
35
  }
37
36
  export interface PrescanCheck {
38
37
  id: string;
39
38
  platforms: Platform[];
40
39
  /** Findings from this check stay information-only until this UTC instant. */
41
40
  enforceAfter?: string;
42
- /** requires ctx.supabase; skipped (with notice) when absent */
41
+ /** requires ctx.client; skipped (with notice) when absent */
43
42
  remote?: boolean;
44
43
  appliesTo?: (ctx: ScanContext) => boolean;
45
44
  run: (ctx: ScanContext) => Promise<Finding[]>;
@@ -1,5 +1,4 @@
1
- import type { SupabaseClient } from '@supabase/supabase-js';
2
- import type { Database } from '../types/supabase.types';
1
+ import type { CapgoClient } from '../utils';
3
2
  import type { AutoBumpLevel } from '../versionHelpers';
4
3
  export type ManifestEntry = {
5
4
  file: string;
@@ -20,8 +19,8 @@ export type AiBumpDecision = {
20
19
  reason: string;
21
20
  };
22
21
  export declare function diffManifests(local: ManifestEntry[], remote: ManifestEntry[]): ManifestDiff;
23
- export declare function fetchRemoteManifest(supabase: SupabaseClient<Database>, versionId: number): Promise<ManifestEntry[]>;
24
- export declare function resolveBaseVersionForAutoBump(supabase: SupabaseClient<Database>, appid: string, channels: string[]): Promise<{
22
+ export declare function fetchRemoteManifest(client: CapgoClient, versionId: number): Promise<ManifestEntry[]>;
23
+ export declare function resolveBaseVersionForAutoBump(client: CapgoClient, appid: string, channels: string[]): Promise<{
25
24
  name: string;
26
25
  id: number;
27
26
  } | null>;
@@ -34,17 +33,15 @@ export declare function requestAiBumpLevel(options: {
34
33
  summary: string;
35
34
  breaking?: boolean;
36
35
  };
37
- supaHost?: string;
38
- supaAnon?: string;
36
+ apiHost?: string;
39
37
  }): Promise<AiBumpDecision>;
40
38
  export declare function resolveAutoBumpLevelFromAi(ctx: {
41
- supabase: SupabaseClient<Database>;
39
+ client: CapgoClient;
42
40
  appid: string;
43
41
  channels: string[];
44
42
  path: string;
45
43
  apikey: string;
46
44
  options?: {
47
- supaHost?: string;
48
- supaAnon?: string;
45
+ apiHost?: string;
49
46
  };
50
47
  }): Promise<AiBumpDecision>;
@@ -3,8 +3,7 @@ interface FinalizeBundleOptions {
3
3
  apikey: string;
4
4
  appId: string;
5
5
  bundle: string;
6
- supaHost?: string;
7
- supaAnon?: string;
6
+ apiHost?: string;
8
7
  reporter: UploadReporter;
9
8
  }
10
9
  interface FinalizeInvokeOptions {
@@ -14,8 +13,7 @@ interface FinalizeInvokeOptions {
14
13
  app_id: string;
15
14
  name: string;
16
15
  };
17
- supaHost?: string;
18
- supaAnon?: string;
16
+ apiHost?: string;
19
17
  }
20
18
  interface FinalizeBundleDependencies {
21
19
  invoke: (path: string, options: FinalizeInvokeOptions) => Promise<{
@@ -1,26 +1,2 @@
1
1
  import type { OptionsBase } from '../schemas/base';
2
- export declare function listBundle(appId: string, options: OptionsBase, silent?: boolean): Promise<{
3
- app_id: string;
4
- checksum: string | null;
5
- cli_version: string | null;
6
- comment: string | null;
7
- created_at: string | null;
8
- created_by_apikey_rbac_id: string | null;
9
- deleted: boolean;
10
- deleted_at: string | null;
11
- external_url: string | null;
12
- id: number;
13
- key_id: string | null;
14
- link: string | null;
15
- manifest: import("../sdk").Database["public"]["CompositeTypes"]["manifest_entry"][] | null;
16
- manifest_count: number;
17
- min_update_version: string | null;
18
- name: string;
19
- native_packages: import("../types/supabase.types").Json[] | null;
20
- owner_org: string;
21
- r2_path: string | null;
22
- session_key: string | null;
23
- storage_provider: string;
24
- updated_at: string | null;
25
- user_id: string | null;
26
- }[]>;
2
+ export declare function listBundle(appId: string, options: OptionsBase, silent?: boolean): Promise<import("../sdk").AppVersionRow[]>;
@@ -71,5 +71,5 @@ export declare function manifestUploadFileHashFormat(encryptionEnabled: boolean,
71
71
  export declare function isManifestUploadAutoEnabled(userRequestedDelta: boolean, fullZipEnabled: boolean): boolean;
72
72
  type ManifestUploadInvoke = typeof invokeCapgoCliApi;
73
73
  export declare function resolveManifestUploadResponse(request: ManifestUploadRequest, input: unknown): ResolvedManifestUpload;
74
- export declare function requestManifestUpload(apikey: string, request: ManifestUploadRequest, options?: Pick<CapgoCliInvokeOptions, 'supaHost' | 'supaAnon'>, invoke?: ManifestUploadInvoke, sleep?: (ms: number) => Promise<void>): Promise<ResolvedManifestUpload>;
74
+ export declare function requestManifestUpload(apikey: string, request: ManifestUploadRequest, options?: Pick<CapgoCliInvokeOptions, 'apiHost'>, invoke?: ManifestUploadInvoke, sleep?: (ms: number) => Promise<void>): Promise<ResolvedManifestUpload>;
75
75
  export {};
@@ -2,8 +2,7 @@ interface BundleUnlinkOptions {
2
2
  bundle?: string;
3
3
  packageJson?: string;
4
4
  apikey?: string;
5
- supaHost?: string;
6
- supaAnon?: string;
5
+ apiHost?: string;
7
6
  }
8
7
  export declare function unlinkDeviceInternal(channel: string, appId: string, options: BundleUnlinkOptions, silent?: boolean): Promise<boolean>;
9
8
  export declare function unlinkDevice(channel: string, appId: string, options: BundleUnlinkOptions): Promise<void>;
@@ -2,8 +2,6 @@ import type { UploadBundleResult } from '../schemas/bundle';
2
2
  import type { UploadReporter, UploadSpinner } from './reporter';
3
3
  import type { OptionsUpload } from './upload_interface';
4
4
  import { CliUserError } from '../shared/cli-user-error';
5
- import { createSupabaseClient } from '../utils';
6
- type SupabaseType = Awaited<ReturnType<typeof createSupabaseClient>>;
7
5
  export type { UploadBundleResult };
8
6
  export type { UploadReporter, UploadSpinner };
9
7
  /**
@@ -19,7 +17,9 @@ export type { UploadReporter, UploadSpinner };
19
17
  */
20
18
  export declare class IncompatibleBundleError extends CliUserError {
21
19
  }
22
- export declare function getDefaultUploadChannel(appId: string, supabase: SupabaseType, hostWeb: string): Promise<string>;
20
+ export declare function getDefaultUploadChannel(appId: string, apikey: string, hostWeb: string, httpOptions?: {
21
+ apiHost?: string;
22
+ }): Promise<string>;
23
23
  export declare function uploadBundleInternal(preAppid: string, options: OptionsUpload, silent?: boolean, reporter?: UploadReporter): Promise<UploadBundleResult>;
24
24
  /**
25
25
  * Validate mutually-exclusive and dependent upload options, failing fast (via
@@ -1,11 +1,10 @@
1
- import type { SupabaseClient } from '@supabase/supabase-js';
1
+ import type { CapgoClient } from '../utils';
2
2
  import type { ChannelAddOptions } from '../schemas/channel';
3
- import type { Database } from '../types/supabase.types';
4
- export declare function isChannelReadableByCaller(supabase: SupabaseClient<Database>, appId: string, channelName: string): Promise<boolean | null>;
3
+ export declare function isChannelReadableByCaller(client: CapgoClient, appId: string, channelName: string): Promise<boolean | null>;
5
4
  export type ChannelAddDuplicateOutcome = 'duplicate_readable' | 'duplicate_inaccessible' | 'not_duplicate';
6
5
  export declare function resolveChannelAddDuplicateOutcome(params: {
7
6
  createError: unknown;
8
- supabase: SupabaseClient<Database>;
7
+ client: CapgoClient;
9
8
  appId: string;
10
9
  channelName: string;
11
10
  }, deps?: {
@@ -2,7 +2,7 @@ import type { OnboardingBuilderOptions } from '../build/onboarding/command';
2
2
  import { invokeCapgoCliApi } from '../utils';
3
3
  type SetupOptions = {
4
4
  apikey: string;
5
- } & Pick<OnboardingBuilderOptions, 'supaHost' | 'supaAnon' | 'analytics'>;
5
+ } & Pick<OnboardingBuilderOptions, 'apiHost' | 'analytics'>;
6
6
  export declare function readBuilderOnlyAssignment(appId: string, options: SetupOptions, request?: typeof invokeCapgoCliApi): Promise<{
7
7
  version: number;
8
8
  path: "builder";
@@ -1,9 +1,8 @@
1
- import type { SupabaseClient } from '@supabase/supabase-js';
2
- import type { Database } from '../types/supabase.types';
1
+ import type { CapgoClient } from '../utils';
3
2
  interface ChannelSelectionPrompts {
4
3
  reuseChannel: (name: string) => Promise<boolean>;
5
4
  chooseName: (existingNames: string[]) => Promise<string>;
6
5
  createChannel: (name: string) => Promise<void>;
7
6
  }
8
- export declare function selectOnboardingChannel(supabase: SupabaseClient<Database>, appId: string, preferredName: string, prompts: ChannelSelectionPrompts): Promise<string>;
7
+ export declare function selectOnboardingChannel(client: CapgoClient, appId: string, preferredName: string, prompts: ChannelSelectionPrompts): Promise<string>;
9
8
  export {};
@@ -1,13 +1,11 @@
1
1
  import type { InitOnboardingStepId } from './onboarding-steps';
2
2
  export declare function reportInitOnboardingStep(apikey: string, appId: string | undefined, stepNumber: number, status?: 'done' | 'skipped', options?: {
3
- supaHost?: string;
4
- supaAnon?: string;
3
+ apiHost?: string;
5
4
  outcome?: 'completed' | 'skipped' | 'in_progress';
6
5
  }): Promise<void>;
7
6
  export declare function reportInitOnboarding(apikey: string, appId: string, steps: Partial<Record<InitOnboardingStepId, {
8
7
  status: 'done' | 'skipped';
9
8
  }>>, options?: {
10
- supaHost?: string;
11
- supaAnon?: string;
9
+ apiHost?: string;
12
10
  outcome?: 'completed' | 'skipped' | 'in_progress' | 'switched_to_manual';
13
11
  }): Promise<void>;
@@ -46,8 +46,8 @@ interface StartInitReplayOptions {
46
46
  replayUrl?: string;
47
47
  rows?: number;
48
48
  sessionPrefix?: string;
49
- supaAnon?: string;
50
- supaHost?: string;
49
+ /** Custom Capgo API (--api-host): replays go to its /private/replay. */
50
+ apiHost?: string;
51
51
  throttleMs?: number;
52
52
  terminalPixelSize?: TerminalPixelSize;
53
53
  transport?: InitReplayTransport;
@@ -61,7 +61,6 @@ export declare function finishActiveCliReplay(): Promise<void>;
61
61
  export declare function isCliTelemetryDisabled(): boolean;
62
62
  export declare function shouldStartInitReplay(input: InitReplayGateInput): boolean;
63
63
  export declare function resolveCapgoReplayUrl(host?: string): string | undefined;
64
- export declare function resolveSupabaseReplayUrl(supaHost?: string): string | undefined;
65
64
  export declare function resolveReplayUrlForFlush(replayUrl: Promise<string | undefined>, timeoutMs?: number, onTimeout?: () => void): Promise<string | undefined>;
66
65
  export declare function getReplayViewportSize(cols?: number, rows?: number, terminalPixelSize?: TerminalPixelSize): {
67
66
  height: number;
@@ -1,8 +1,7 @@
1
1
  interface Options {
2
2
  apikey?: string;
3
3
  local: boolean;
4
- supaHost?: string;
5
- supaAnon?: string;
4
+ apiHost?: string;
6
5
  }
7
6
  export type LoginMethod = 'browser' | 'paste';
8
7
  type LoginMethodPrompt = (options: {
@@ -50,8 +50,8 @@ export declare const mcpUploadBundleInputSchema: z.ZodObject<{
50
50
  major: "major";
51
51
  minor: "minor";
52
52
  patch: "patch";
53
- metadata: "metadata";
54
53
  ai: "ai";
54
+ metadata: "metadata";
55
55
  }>>;
56
56
  encrypt: z.ZodOptional<z.ZodBoolean>;
57
57
  acceptIncompatible: z.ZodOptional<z.ZodBoolean>;
@@ -196,13 +196,13 @@ export declare const mcpRemoveOrganizationMemberInputSchema: z.ZodObject<{
196
196
  }, z.core.$strip>;
197
197
  export declare const mcpGetAccountInputSchema: z.ZodObject<{}, z.core.$strip>;
198
198
  export declare const mcpUpdateAccountInputSchema: z.ZodObject<{
199
- notifications: z.ZodOptional<z.ZodBoolean>;
200
- country: z.ZodOptional<z.ZodString>;
201
199
  emailPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
202
200
  firstName: z.ZodOptional<z.ZodString>;
203
201
  lastName: z.ZodOptional<z.ZodString>;
202
+ country: z.ZodOptional<z.ZodString>;
204
203
  discordUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
204
  formatLocale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ notifications: z.ZodOptional<z.ZodBoolean>;
206
206
  newsletter: z.ZodOptional<z.ZodBoolean>;
207
207
  }, z.core.$strip>;
208
208
  export declare const mcpSearchDocsInputSchema: z.ZodObject<{
@@ -228,15 +228,15 @@ export declare const mcpObserveInputSchema: z.ZodObject<{
228
228
  oldest: "oldest";
229
229
  }>>;
230
230
  deviceId: z.ZodOptional<z.ZodString>;
231
- action: z.ZodOptional<z.ZodString>;
232
231
  view: z.ZodOptional<z.ZodEnum<{
233
232
  device: "device";
234
- events: "events";
235
233
  summary: "summary";
236
234
  metrics: "metrics";
235
+ events: "events";
237
236
  routes: "routes";
238
237
  versions: "versions";
239
238
  }>>;
239
+ action: z.ZodOptional<z.ZodString>;
240
240
  limit: z.ZodOptional<z.ZodNumber>;
241
241
  days: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<3>, z.ZodLiteral<7>, z.ZodLiteral<30>]>>;
242
242
  versionName: z.ZodOptional<z.ZodString>;
@@ -8,7 +8,6 @@ export interface ObserveCliOptions {
8
8
  sort?: string;
9
9
  limit?: string;
10
10
  json?: boolean;
11
- supaHost?: string;
12
- supaAnon?: string;
11
+ apiHost?: string;
13
12
  }
14
13
  export declare function observeCommand(view: ObserveView, appIdArg: string | undefined, options: ObserveCliOptions, deviceIdArg?: string): Promise<void>;
@@ -1,2 +1,2 @@
1
1
  import type { OnboardingCheckOptions } from './background';
2
- export declare function isTrustedOnboardingApiHost(apiHost: string, options: Pick<OnboardingCheckOptions, 'supaHost' | 'supaAnon'>, trustedOrigins: readonly string[]): boolean;
2
+ export declare function isTrustedOnboardingApiHost(apiHost: string, options: Pick<OnboardingCheckOptions, 'apiHost'>, trustedOrigins: readonly string[]): boolean;
@@ -7,7 +7,6 @@ interface BackgroundOnboardingCheck {
7
7
  export interface PreparedOnboardingCheck {
8
8
  project: OnboardingScanProject;
9
9
  apiHost: string;
10
- anonKey?: string;
11
10
  webHost?: string;
12
11
  apikey: string;
13
12
  command: string;
@@ -9,8 +9,7 @@ export interface OnboardingCheckOptions {
9
9
  capacitorConfig?: string;
10
10
  packageJson?: string;
11
11
  mainFile?: string;
12
- supaHost?: string;
13
- supaAnon?: string;
12
+ apiHost?: string;
14
13
  setupNotice?: boolean;
15
14
  }
16
15
  export declare function startOnboardingCheck(command: Command, commandPath: string, workerUrl: URL, attemptIds?: string[], ci?: boolean): void;
@@ -1,29 +1,7 @@
1
1
  import type { OrganizationAddOptions } from '../schemas/organization';
2
2
  export declare function addOrganizationInternal(options: OrganizationAddOptions, silent?: boolean): Promise<{
3
- created_at: string | null;
4
- created_by: string;
5
- customer_id: string | null;
6
- email_preferences: import("../types/supabase.types").Json;
7
- enforce_encrypted_bundles: boolean;
8
- enforce_hashed_api_keys: boolean;
9
- enforcing_2fa: boolean;
10
- has_usage_credits: boolean;
11
- id: string;
12
- last_stats_updated_at: string | null;
13
- logo: string | null;
14
- management_email: string;
15
- max_apikey_expiration_days: number | null;
16
3
  name: string;
17
- onboarding: import("../types/supabase.types").Json;
18
- password_policy_config: import("../types/supabase.types").Json | null;
19
- require_apikey_expiration: boolean;
20
- required_encryption_key: string | null;
21
- stats_refresh_requested_at: string | null;
22
- stats_updated_at: string | null;
23
- support_channel_set_at: string | null;
24
- support_channel_type: string | null;
25
- support_channel_url: string | null;
26
- updated_at: string | null;
27
- website: string | null;
4
+ management_email: string;
5
+ id: string;
28
6
  }>;
29
7
  export declare function addOrganization(options: OrganizationAddOptions): Promise<void>;
@@ -1,36 +1,6 @@
1
1
  import type { OptionsBase } from '../schemas/base';
2
- export declare function listOrganizationsInternal(options: OptionsBase, silent?: boolean): Promise<{
3
- "2fa_has_access": boolean;
4
- app_count: number;
5
- can_use_more: boolean;
6
- created_at: string;
7
- created_by: string;
8
- credit_available: number;
9
- credit_next_expiration: string;
10
- credit_total: number;
11
- enforce_encrypted_bundles: boolean;
12
- enforce_hashed_api_keys: boolean;
13
- enforcing_2fa: boolean;
14
- gid: string;
15
- is_canceled: boolean;
16
- is_invite: boolean;
17
- is_yearly: boolean;
18
- logo: string;
19
- management_email: string;
20
- max_apikey_expiration_days: number;
21
- name: string;
22
- next_stats_update_at: string;
23
- password_has_access: boolean;
24
- password_policy_config: import("../types/supabase.types").Json;
25
- paying: boolean;
26
- require_apikey_expiration: boolean;
27
- required_encryption_key: string;
28
- role: string;
29
- stats_refresh_requested_at: string;
30
- stats_updated_at: string;
31
- subscription_end: string;
32
- subscription_start: string;
33
- trial_left: number;
34
- website: string;
35
- }[]>;
2
+ import type { Organization } from '../utils';
3
+ export declare function listOrganizationsInternal(options: OptionsBase, silent?: boolean): Promise<(Organization & {
4
+ allowed?: boolean;
5
+ })[]>;
36
6
  export declare function listOrganizations(options: OptionsBase): Promise<void>;