mitra-interactions-sdk 1.0.58-beta.2 → 1.0.58-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -22,8 +22,6 @@ interface LoginResponse {
22
22
  baseURL: string;
23
23
  /** URL do serviço de integrações (opcional) */
24
24
  integrationURL?: string;
25
- /** URL do WebSocket do Agent Chat (opcional — vem do sdk-auth quando configurado) */
26
- agentWsUrl?: string;
27
25
  }
28
26
  interface EmailSignupOptions {
29
27
  /** URL da página de auth (ex: https://validacao.mitralab.io/sdk-auth/). Opcional se já configurado via configureSdkMitra. */
@@ -521,6 +519,7 @@ interface SetProfilePermissionResponse {
521
519
  [key: string]: unknown;
522
520
  };
523
521
  }
522
+ type AgentType = 'claudecode' | 'codex' | 'opencode-cli' | 'opencode-sdk';
524
523
  interface AgentChat {
525
524
  id: string;
526
525
  name: string;
@@ -541,65 +540,195 @@ interface GetAgentChatsOptions {
541
540
  /** Sobrescreve o projectId configurado globalmente. */
542
541
  projectId?: number;
543
542
  }
544
- interface GetAgentHistoryOptions {
545
- /** ID do chat cuja conversa será carregada. */
546
- taskId: string;
547
- /** Quantidade máxima de mensagens (default: tudo). */
548
- limit?: number;
543
+ interface GetAgentTaskCreateOptions {
544
+ /** Cria chat novo. taskId é preenchido depois do primeiro send(). */
545
+ create: true;
546
+ /** Sobrescreve projectId global. */
547
+ projectId?: number;
548
+ /** Tipo do agente. Default: 'claudecode'. */
549
+ agentType?: AgentType;
550
+ /** Nome do chat (default: derivado do prompt). */
551
+ name?: string;
549
552
  }
550
- interface AgentStreamDeltaEvent {
553
+ interface GetAgentTaskOpenOptions {
554
+ /** Abre chat existente. Detecta automático se stream está ativo. */
551
555
  taskId: string;
552
- /** Pedaço de texto que chegou. */
556
+ }
557
+ type GetAgentTaskOptions = GetAgentTaskCreateOptions | GetAgentTaskOpenOptions;
558
+ type AgentTaskStatus = 'opening' | 'idle' | 'streaming' | 'cancelled' | 'error' | 'closed';
559
+ interface QueuedItem {
560
+ id: string;
561
+ text: string;
562
+ agentType?: AgentType;
563
+ seq: number;
564
+ createdAt: number;
565
+ status: 'pending' | 'sending';
566
+ injected?: boolean;
567
+ }
568
+ interface SendOptions {
569
+ agentType?: AgentType;
570
+ }
571
+ interface AgentDeltaEvent {
553
572
  delta: string;
554
- /** Tipo do conteúdo: 'text' (resposta do agente) ou 'tool' (atividade de ferramenta). */
555
573
  kind: 'text' | 'tool';
556
574
  }
557
- interface AgentStreamToolEvent {
558
- taskId: string;
575
+ interface AgentToolEvent {
559
576
  tool: string;
560
577
  input?: string;
561
578
  content?: string;
562
579
  timestamp: number;
563
580
  }
564
- interface AgentStreamEndEvent {
565
- taskId: string;
566
- /** Conteúdo final acumulado (concatenação dos deltas). */
581
+ interface AgentTurnEndEvent {
582
+ /** Conteúdo final acumulado do turno. */
567
583
  content: string;
568
584
  }
569
585
  interface AgentTaskCreatedEvent {
570
586
  task: AgentChat;
571
587
  }
572
588
  interface AgentErrorEvent {
573
- taskId?: string;
574
589
  error: string;
575
590
  }
576
- interface SendAgentPromptOptions {
577
- /** Texto enviado ao agente. */
578
- prompt: string;
579
- /** ID do chat existente. Se ausente, cria um chat novo. */
580
- taskId?: string;
581
- /** Tipo do agente. Default: 'claudecode'. */
582
- agentType?: 'claudecode' | 'codex' | 'opencode-cli' | 'opencode-sdk';
583
- /** Sobrescreve projectId global. */
584
- projectId?: number;
585
- /** Nome do chat quando criando novo (default: derivado do prompt). */
586
- name?: string;
587
- /** Callback chamado a cada chunk de texto. */
588
- onDelta?: (event: AgentStreamDeltaEvent) => void;
589
- /** Callback chamado quando uma ferramenta é usada. */
590
- onTool?: (event: AgentStreamToolEvent) => void;
591
- /** Callback chamado quando um novo chat é criado (só dispara se taskId era ausente). */
592
- onTaskCreated?: (event: AgentTaskCreatedEvent) => void;
593
- /** Callback chamado quando ocorre erro durante o stream. */
594
- onError?: (event: AgentErrorEvent) => void;
595
- /** Permite cancelar o stream mid-flight. */
596
- signal?: AbortSignal;
597
- }
598
- interface SendAgentPromptResponse {
599
- /** ID do chat (existente ou recém-criado). */
600
- taskId: string;
601
- /** Texto completo acumulado dos deltas. */
602
- content: string;
591
+ interface AgentQueueChangeEvent {
592
+ queue: ReadonlyArray<QueuedItem>;
593
+ }
594
+ interface AgentStatusChangeEvent {
595
+ status: AgentTaskStatus;
596
+ previous: AgentTaskStatus;
597
+ }
598
+ type AgentTaskEventMap = {
599
+ historyLoaded: AgentMessage[];
600
+ turnStart: void;
601
+ delta: AgentDeltaEvent;
602
+ tool: AgentToolEvent;
603
+ turnEnd: AgentTurnEndEvent;
604
+ taskCreated: AgentTaskCreatedEvent;
605
+ cancelled: void;
606
+ error: AgentErrorEvent;
607
+ queueChange: AgentQueueChangeEvent;
608
+ statusChange: AgentStatusChangeEvent;
609
+ };
610
+ type AgentTaskEventName = keyof AgentTaskEventMap;
611
+ interface AgentTaskSession {
612
+ readonly taskId: string | null;
613
+ readonly task: AgentChat | null;
614
+ readonly isNew: boolean;
615
+ readonly status: AgentTaskStatus;
616
+ readonly history: ReadonlyArray<AgentMessage>;
617
+ readonly content: string;
618
+ readonly queue: ReadonlyArray<QueuedItem>;
619
+ loadHistory(options?: {
620
+ limit?: number;
621
+ }): Promise<AgentMessage[]>;
622
+ close(): void;
623
+ send(prompt: string, options?: SendOptions): void;
624
+ cancel(): Promise<void>;
625
+ editQueueItem(itemId: string, newText: string): boolean;
626
+ removeQueueItem(itemId: string): boolean;
627
+ clearQueue(): void;
628
+ on<E extends AgentTaskEventName>(event: E, handler: (payload: AgentTaskEventMap[E]) => void): () => void;
629
+ }
630
+ /** Targets de subscription (OAuth/device flow). */
631
+ type AgentSubscriptionTarget = 'claude' | 'openai_oauth' | 'codex';
632
+ /** Targets de API key (8 providers suportados pelo backend). */
633
+ type AgentApiKeyTarget = 'anthropic' | 'openai' | 'gemini' | 'kimi' | 'minimax' | 'glm' | 'qwen' | 'openrouter';
634
+ /** Union — qualquer credencial. */
635
+ type CredentialTarget = AgentSubscriptionTarget | AgentApiKeyTarget;
636
+ /**
637
+ * Verbos aceitos por `manageAgentCredentialMitra`.
638
+ *
639
+ * Baixo nível (RPC direto contra o backend `credentials`):
640
+ * status | remove | list | validate | save
641
+ * oauth_start | oauth_exchange | device_start | device_poll | device_cancel
642
+ *
643
+ * Alto nível (orquestrado no browser, NÃO é um type WS — encadeia as actions
644
+ * de baixo nível + abre popup + espera autorização):
645
+ * connect
646
+ */
647
+ type CredentialAction = 'connect' | 'status' | 'remove' | 'list' | 'validate' | 'save' | 'oauth_start' | 'oauth_exchange' | 'device_start' | 'device_poll' | 'device_cancel';
648
+ /**
649
+ * Opções de baixo nível (RPC direto) de `manageAgentCredentialMitra`. Campos
650
+ * extras (key, code, codeVerifier, redirectUri, pollId, accessToken,
651
+ * refreshToken, expiresAt) são empacotados em `data` antes de enviar ao backend.
652
+ *
653
+ * NÃO use com action='connect' — para isso use ConnectAgentCredentialOptions.
654
+ */
655
+ interface ManageAgentCredentialOptions {
656
+ action: Exclude<CredentialAction, 'connect'>;
657
+ /** Obrigatório exceto para action='list'. */
658
+ target?: CredentialTarget;
659
+ /** Para `save` / `validate` de API key. */
660
+ key?: string;
661
+ /** Para `oauth_exchange`. */
662
+ code?: string;
663
+ /** Para `oauth_exchange`. */
664
+ state?: string;
665
+ /** Para `oauth_exchange`. */
666
+ codeVerifier?: string;
667
+ /** Para `oauth_start` (openai_oauth) e `oauth_exchange` (openai_oauth). */
668
+ redirectUri?: string;
669
+ /** Para `device_poll` / `device_cancel`. */
670
+ pollId?: string;
671
+ /** Para `save` (codex). */
672
+ accessToken?: string;
673
+ /** Para `save` (codex). */
674
+ refreshToken?: string;
675
+ /** Para `save` (codex). */
676
+ expiresAt?: number;
677
+ }
678
+ /** Tipo "ampliado" — o backend retorna shapes diferentes por (action, target). */
679
+ type ManageAgentCredentialResult = unknown;
680
+ interface AgentSubscriptionAccount {
681
+ email: string;
682
+ orgName: string;
683
+ }
684
+ /**
685
+ * Opções de alto nível de `manageAgentCredentialMitra` quando action='connect'.
686
+ * Orquestra o fluxo OAuth/device ponta-a-ponta no browser (abre popup, espera
687
+ * autorização, troca por tokens server-side).
688
+ */
689
+ interface ConnectAgentCredentialOptions {
690
+ action: 'connect';
691
+ target: AgentSubscriptionTarget;
692
+ /**
693
+ * Callback que retorna o código que o usuário copiou da página da Anthropic
694
+ * após autorizar. **Obrigatório** para target='claude'.
695
+ */
696
+ onCodeNeeded?: (info: {
697
+ authUrl: string;
698
+ state: string;
699
+ }) => Promise<string> | string;
700
+ /**
701
+ * URL no domínio do app publicado que captura o `?code=` da OAuth e faz
702
+ * `window.opener.postMessage({ mitraOpenAICode: code }, '*')`.
703
+ * **Obrigatório** para target='openai_oauth'.
704
+ */
705
+ redirectUri?: string;
706
+ /** Timeout esperando o postMessage (default 5min). */
707
+ messageTimeoutMs?: number;
708
+ /**
709
+ * Callback opcional que recebe o `userCode` e `verificationUrl` assim que
710
+ * o device flow inicia (use pra exibir na UI além do popup automático).
711
+ */
712
+ onDeviceCode?: (info: {
713
+ userCode: string | null;
714
+ verificationUrl: string | null;
715
+ }) => void;
716
+ /** Intervalo de poll do device flow (default 2000ms). */
717
+ pollIntervalMs?: number;
718
+ /** Timeout total do device flow (default 15min). */
719
+ deviceTimeoutMs?: number;
720
+ /** Nome da window do popup (default depende do target). */
721
+ windowName?: string;
722
+ /** `features` string passada para `window.open`. */
723
+ windowFeatures?: string;
724
+ }
725
+ interface ConnectAgentSubscriptionResult {
726
+ target: AgentSubscriptionTarget;
727
+ success: boolean;
728
+ /** Presente em claude / openai_oauth (epoch ms). */
729
+ expiresAt?: number;
730
+ /** Presente apenas em claude. */
731
+ account?: AgentSubscriptionAccount | null;
603
732
  }
604
733
 
605
734
  /**
@@ -649,25 +778,22 @@ interface MitraInstance {
649
778
  validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
650
779
  resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
651
780
  getAgentChats(options?: GetAgentChatsOptions): Promise<AgentChat[]>;
652
- getAgentHistory(options: GetAgentHistoryOptions): Promise<AgentMessage[]>;
653
- sendAgentPrompt(options: SendAgentPromptOptions): Promise<SendAgentPromptResponse>;
654
- disconnectAgentChat(): void;
781
+ getAgentTask(options: GetAgentTaskOptions): AgentTaskSession;
782
+ manageAgentCredential(options: ManageAgentCredentialOptions | ConnectAgentCredentialOptions): Promise<unknown>;
655
783
  openChat(): void;
656
784
  closeChat(): void;
657
785
  }
658
786
  declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
659
787
 
660
788
  interface MitraConfig {
661
- /** URL base da API (ex: https://api.mitra.com) */
662
- baseURL: string;
789
+ /** URL base da API (ex: https://api.mitra.com). Opcional se houver window.__mitraEnv.apiBaseURL (build-proxy). */
790
+ baseURL?: string;
663
791
  /** Token JWT para autenticação (opcional para Server Functions públicas) */
664
792
  token?: string;
665
793
  /** URL base do serviço de integrações (ex: https://api0.mitraecp.com:1003) */
666
794
  integrationURL?: string;
667
795
  /** URL da página de autenticação Mitra (ex: https://coder.mitralab.io/sdk-auth/) */
668
796
  authUrl?: string;
669
- /** URL do WebSocket do Agent Chat (ex: wss://agent.mitralab.io/sdk-ws ou ws://localhost:3456/sdk-ws) */
670
- agentWsUrl?: string;
671
797
  /** ID do projeto (usado como fallback nos métodos de login e serviços) */
672
798
  projectId?: number;
673
799
  /** Callback chamado quando o token é renovado automaticamente (após 401/403). Recebe a nova sessão. */
@@ -675,8 +801,12 @@ interface MitraConfig {
675
801
  }
676
802
  /**
677
803
  * Configura o SDK globalmente e retorna uma instância configurada.
804
+ *
805
+ * Em apps publicadas pelo Mitra (window.__mitraEnv presente), nenhum campo
806
+ * precisa ser passado — todas as URLs vêm da injeção do build-proxy.
807
+ * Em outros contextos, baseURL ainda é necessário (manual ou via login).
678
808
  */
679
- declare function configureSdkMitra(config: MitraConfig): MitraInstance;
809
+ declare function configureSdkMitra(config?: Partial<MitraConfig>): MitraInstance;
680
810
  /**
681
811
  * Obtém a configuração atual
682
812
  */
@@ -779,26 +909,87 @@ declare function validatePasswordResetCodeMitra(options: ValidatePasswordResetCo
779
909
  declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
780
910
 
781
911
  /**
782
- * Mitra Interactions SDK - Agent Chat (embedded)
912
+ * Mitra Interactions SDK Agent Chat
913
+ *
914
+ * Hub do WebSocket compartilhado e factories da API pública:
915
+ * - getAgentChatsMitra({ projectId? })
916
+ * - getAgentTaskMitra({ create | taskId, ... })
783
917
  *
784
- * Conecta via WebSocket ao mitra-agent-websocket. Tudo (lista de chats,
785
- * histórico, envio de prompt + stream) trafega pela mesma conexão.
918
+ * O WS é singleton: todas as sessions usam UMA conexão. O roteamento
919
+ * de eventos é feito por taskId, despachando pra session correspondente.
786
920
  *
787
- * - Open: lazy conecta na primeira chamada.
788
- * - Auth: JWT do config global passado como query param do handshake.
789
- * O backend valida o token e resolve userSpaceID server-side.
790
- * - Request/Response: cada chamada envia { type, requestId } e aguarda
791
- * { type: 'response', requestId, ok, data | error }.
792
- * - Stream: send_prompt dispara push events (stream_delta, stream_end, ...).
921
+ * NÃO `sendAgentPromptMitra` ou `getAgentHistoryMitra` exportados
922
+ * essas operações vivem dentro de `AgentTaskSession`.
793
923
  */
794
924
 
925
+ /**
926
+ * Lista chats do user para um projeto.
927
+ */
795
928
  declare function getAgentChatsMitra(options?: GetAgentChatsOptions): Promise<AgentChat[]>;
796
- declare function getAgentHistoryMitra(options: GetAgentHistoryOptions): Promise<AgentMessage[]>;
797
- declare function sendAgentPromptMitra(options: SendAgentPromptOptions): Promise<SendAgentPromptResponse>;
798
929
  /**
799
- * Fecha o WebSocket do Agent Chat. Útil em testes ou no logout.
930
+ * Abre um handle de chat (session). Use:
931
+ * - `{ create: true }` para iniciar um chat novo
932
+ * - `{ taskId: 'X' }` para abrir um chat existente
933
+ *
934
+ * A session expõe histórico, streaming, fila, cancel e eventos. Se a
935
+ * mesma taskId for aberta duas vezes, retorna a MESMA instância (cache).
936
+ */
937
+ declare function getAgentTaskMitra(options: GetAgentTaskOptions): AgentTaskSession;
938
+
939
+ /**
940
+ * Mitra Interactions SDK — Agent Credentials
941
+ *
942
+ * Função ÚNICA `manageAgentCredentialMitra` sobre /sdk-ws para todas as
943
+ * operações de credencial do agente:
944
+ * - API keys (8 providers: anthropic, openai, gemini, kimi, minimax, glm, qwen, openrouter)
945
+ * - Subscriptions OAuth (Claude / OpenAI / Codex device flow)
946
+ *
947
+ * Actions de baixo nível (RPC direto contra o backend):
948
+ * status | remove | list | validate | save
949
+ * oauth_start | oauth_exchange | device_start | device_poll | device_cancel
950
+ *
951
+ * Action de alto nível (orquestra o fluxo ponta-a-ponta no browser):
952
+ * connect — abre popup, espera código/postMessage/poll, troca por tokens.
953
+ *
954
+ * SEGURANÇA: o token de subscription NUNCA volta cru pro cliente. É salvo
955
+ * server-side (Firestore) e injetado no sandbox E2B direto de lá. O retorno
956
+ * de `connect`/`oauth_exchange` traz só { connected, expiresAt, account }.
957
+ */
958
+
959
+ /**
960
+ * Conecta uma subscription ponta-a-ponta (abre popup, espera autorização,
961
+ * troca por tokens). Retorno tipado: { target, success, expiresAt?, account? }.
962
+ *
963
+ * @example
964
+ * // Claude — caller mostra modal pedindo o paste do código
965
+ * await manageAgentCredentialMitra({
966
+ * action: 'connect', target: 'claude',
967
+ * onCodeNeeded: async () => prompt('Cole o código:') ?? ''
968
+ * });
969
+ *
970
+ * @example
971
+ * // OpenAI — callback page no domínio do app faz postMessage
972
+ * await manageAgentCredentialMitra({
973
+ * action: 'connect', target: 'openai_oauth',
974
+ * redirectUri: window.location.origin + '/auth/openai-callback'
975
+ * });
976
+ *
977
+ * @example
978
+ * // Codex — device flow automático (abre verificação, polling)
979
+ * await manageAgentCredentialMitra({ action: 'connect', target: 'codex' });
980
+ */
981
+ declare function manageAgentCredentialMitra(options: ConnectAgentCredentialOptions): Promise<ConnectAgentSubscriptionResult>;
982
+ /**
983
+ * RPC direto contra o backend. Retorno depende de (action, target) — veja docs.
984
+ *
985
+ * @example
986
+ * await manageAgentCredentialMitra({ action: 'list' });
987
+ * await manageAgentCredentialMitra({ action: 'status', target: 'anthropic' });
988
+ * await manageAgentCredentialMitra({ action: 'validate', target: 'openai', key: 'sk-...' });
989
+ * await manageAgentCredentialMitra({ action: 'save', target: 'glm', key: '...' });
990
+ * await manageAgentCredentialMitra({ action: 'remove', target: 'claude' });
800
991
  */
801
- declare function disconnectAgentChatMitra(): void;
992
+ declare function manageAgentCredentialMitra<R = ManageAgentCredentialResult>(options: ManageAgentCredentialOptions): Promise<R>;
802
993
 
803
994
  /**
804
995
  * Mitra Interactions SDK - Services
@@ -955,4 +1146,4 @@ declare function setProfileScreensMitra(options: SetProfileScreensOptions): Prom
955
1146
  */
956
1147
  declare function setProfileServerFunctionsMitra(options: SetProfileServerFunctionsOptions): Promise<SetProfilePermissionResponse>;
957
1148
 
958
- export { type AgentChat, type AgentErrorEvent, type AgentMessage, type AgentStreamDeltaEvent, type AgentStreamEndEvent, type AgentStreamToolEvent, type AgentTaskCreatedEvent, type CallIntegrationOptions, type CallIntegrationResponse, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetAgentChatsOptions, type GetAgentHistoryOptions, type GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type ResetPasswordOptions, type RunActionOptions, type RunActionResponse, type SendAgentPromptOptions, type SendAgentPromptResponse, type SendPasswordResetCodeOptions, type SetFileStatusOptions, type SetFileStatusResponse, type SetProfileActionsOptions, type SetProfileDmlTablesOptions, type SetProfilePermissionResponse, type SetProfileScreensOptions, type SetProfileSelectTablesOptions, type SetProfileServerFunctionsOptions, type SetProfileUsersOptions, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateProfileOptions, type UpdateProfileResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, type ValidatePasswordResetCodeOptions, callIntegrationMitra, closeChatMitra, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, disconnectAgentChatMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDataLoaderMitra, executeDbActionMitra, executePublicServerFunctionAsyncMitra, executePublicServerFunctionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getAgentChatsMitra, getAgentHistoryMitra, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resetPasswordMitra, resolveProjectId, runActionMitra, sendAgentPromptMitra, sendPasswordResetCodeMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra, validatePasswordResetCodeMitra };
1149
+ export { type AgentApiKeyTarget, type AgentChat, type AgentDeltaEvent, type AgentErrorEvent, type AgentMessage, type AgentQueueChangeEvent, type AgentStatusChangeEvent, type AgentSubscriptionAccount, type AgentSubscriptionTarget, type AgentTaskCreatedEvent, type AgentTaskEventMap, type AgentTaskEventName, type AgentTaskSession, type AgentTaskStatus, type AgentToolEvent, type AgentTurnEndEvent, type AgentType, type CallIntegrationOptions, type CallIntegrationResponse, type ConnectAgentCredentialOptions, type ConnectAgentSubscriptionResult, type CreateProfileOptions, type CreateProfileResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type CredentialAction, type CredentialTarget, type DeleteProfileOptions, type DeleteProfileResponse, type DeleteRecordOptions, type EmailLoginOptions, type EmailResendCodeOptions, type EmailSignupOptions, type EmailVerifyCodeOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteDbActionOptions, type ExecuteDbActionResponse, type ExecutePublicServerFunctionAsyncResponse, type ExecutePublicServerFunctionOptions, type ExecutePublicServerFunctionResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetAgentChatsOptions, type GetAgentTaskCreateOptions, type GetAgentTaskOpenOptions, type GetAgentTaskOptions, type GetProfileDetailsOptions, type GetProfileDetailsResponse, type GetPublicServerFunctionExecutionOptions, type GetPublicServerFunctionExecutionResponse, type GetRecordOptions, type GetVariableOptions, type GetVariableResponse, type IntegrationResponse, type ListIntegrationsOptions, type ListProfilesOptions, type ListProfilesResponse, type ListRecordsOptions, type ListRecordsResponse, type ListVariablesOptions, type ListVariablesResponse, type LoginOptions, type LoginResponse, type ManageAgentCredentialOptions, type ManageAgentCredentialResult, type MitraConfig, type MitraInstance, type PatchRecordOptions, type ProfileTableRef, type QueuedItem, type ResetPasswordOptions, type RunActionOptions, type RunActionResponse, type SendOptions, type SendPasswordResetCodeOptions, type SetFileStatusOptions, type SetFileStatusResponse, type SetProfileActionsOptions, type SetProfileDmlTablesOptions, type SetProfilePermissionResponse, type SetProfileScreensOptions, type SetProfileSelectTablesOptions, type SetProfileServerFunctionsOptions, type SetProfileUsersOptions, type SetVariableOptions, type SetVariableResponse, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateProfileOptions, type UpdateProfileResponse, type UpdateRecordOptions, type UploadFileOptions, type UploadFileResponse, type ValidatePasswordResetCodeOptions, callIntegrationMitra, closeChatMitra, configureSdkMitra, createMitraInstance, createProfileMitra, createRecordMitra, createRecordsBatchMitra, deleteProfileMitra, deleteRecordMitra, emailLoginMitra, emailResendCodeMitra, emailSignupMitra, emailVerifyCodeMitra, executeDataLoaderMitra, executeDbActionMitra, executePublicServerFunctionAsyncMitra, executePublicServerFunctionMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getAgentChatsMitra, getAgentTaskMitra, getConfig, getProfileDetailsMitra, getPublicServerFunctionExecutionMitra, getRecordMitra, getVariableMitra, listIntegrationsMitra, listProfilesMitra, listRecordsMitra, listVariablesMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, manageAgentCredentialMitra, openChatMitra, patchRecordMitra, refreshTokenSilently, resetPasswordMitra, resolveProjectId, runActionMitra, sendPasswordResetCodeMitra, setFileStatusMitra, setProfileActionsMitra, setProfileDmlTablesMitra, setProfileScreensMitra, setProfileSelectTablesMitra, setProfileServerFunctionsMitra, setProfileUsersMitra, setVariableMitra, stopServerFunctionExecutionMitra, updateProfileMitra, updateRecordMitra, uploadFileLoadableMitra, uploadFilePublicMitra, validatePasswordResetCodeMitra };