omnara 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,10 +14,9 @@ export interface AuthAccessOptions {
14
14
  }
15
15
  export declare class AuthProvider {
16
16
  private readonly options;
17
- private cached;
18
- private inflight;
17
+ private lastBadPat;
18
+ private readonly defaultInteractive;
19
19
  private readonly backendUrl;
20
- private lastBadCredentials;
21
20
  constructor(options: AuthProviderOptions);
22
21
  getAuthContext(options?: AuthAccessOptions): Promise<AuthContext>;
23
22
  getAccessToken(options?: AuthAccessOptions): Promise<string>;
@@ -1,19 +1,13 @@
1
1
  import { CredentialsStore, type StoredCredentials } from './credentials-store.js';
2
- export type AuthContextErrorCode = 'missing_credentials' | 'refresh_token_unavailable' | 'access_token_missing' | 'access_token_expired' | 'refresh_failed' | 'network_error';
2
+ export type AuthContextErrorCode = 'missing_credentials' | 'invalid_credentials';
3
3
  export declare class AuthContextError extends Error {
4
4
  readonly code: AuthContextErrorCode;
5
- readonly status?: number;
6
5
  constructor(message: string, code: AuthContextErrorCode, options?: {
7
6
  cause?: unknown;
8
- status?: number;
9
7
  });
10
8
  }
11
9
  export interface AuthContext {
12
10
  credentials: StoredCredentials;
13
- accessToken: string;
11
+ pat: string;
14
12
  }
15
- export interface EnsureAuthContextOptions {
16
- logger?: Console;
17
- }
18
- export declare function ensureAuthContext(store: CredentialsStore, backendUrl: string, initialCredentials?: StoredCredentials | null, options?: EnsureAuthContextOptions): Promise<AuthContext>;
19
- export declare function isInvalidRefreshTokenError(error: unknown): boolean;
13
+ export declare function ensureAuthContext(store: CredentialsStore, initialCredentials?: StoredCredentials | null): Promise<AuthContext>;
@@ -1,4 +1,5 @@
1
1
  export interface StoredCredentials {
2
+ pat?: string;
2
3
  accessToken?: string;
3
4
  accessTokenExpiresAt?: string;
4
5
  refreshToken?: string;
@@ -5,9 +5,4 @@ export interface EnsureCliCredentialsOptions {
5
5
  store?: CredentialsStore;
6
6
  logger?: Console;
7
7
  }
8
- /**
9
- * Guarantees that the CLI has valid Supabase credentials stored locally.
10
- * If the credentials file is missing or expired, this helper runs the
11
- * interactive browser flow before returning.
12
- */
13
8
  export declare function ensureCliCredentials(options?: EnsureCliCredentialsOptions): Promise<void>;
@@ -1,5 +1,4 @@
1
1
  import { CredentialsStore, type StoredCredentials } from './credentials-store.js';
2
- import { type ExchangeCliCodeResult } from './cli-auth-service.js';
3
2
  interface LoginOptions {
4
3
  backendUrlOption?: string;
5
4
  frontendUrlOption?: string;
@@ -8,8 +7,5 @@ interface LoginOptions {
8
7
  export declare function performVerificationLogin({ backendUrlOption, frontendUrlOption, store, }: LoginOptions): Promise<StoredCredentials>;
9
8
  export declare function resolveBackendUrl(option?: string): string;
10
9
  export declare function resolveFrontendUrl(option?: string): string;
11
- export declare function mergeCredentialsAfterExchange(args: {
12
- exchange: ExchangeCliCodeResult;
13
- }): StoredCredentials;
14
10
  export declare function formatDuration(ms: number): string;
15
11
  export {};