mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 06:56:44 +00:00
Merge remote-tracking branch 'origin/codex/mika-integrations-hardening' into codex/mika-skills-hardening
This commit is contained in:
commit
3937b306f9
4 changed files with 8 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ export function DisconnectMCPDialog({
|
||||||
onDisconnected?.();
|
onDisconnected?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
||||||
<AlertDialogContent>
|
<AlertDialogContent>
|
||||||
|
|
@ -109,6 +110,7 @@ export function DisconnectMCPDialog({
|
||||||
</ul>
|
</ul>
|
||||||
<p className="mt-2 text-xs">
|
<p className="mt-2 text-xs">
|
||||||
Elas serão pausadas automaticamente ao desconectar.
|
Elas serão pausadas automaticamente ao desconectar.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -125,6 +127,7 @@ export function DisconnectMCPDialog({
|
||||||
handleDisconnect();
|
handleDisconnect();
|
||||||
}}
|
}}
|
||||||
disabled={submitting || isLoading}
|
disabled={submitting || isLoading}
|
||||||
|
|
||||||
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||||
>
|
>
|
||||||
{submitting ? "Desconectando..." : "Desconectar"}
|
{submitting ? "Desconectando..." : "Desconectar"}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ function IntegrationDetailPage() {
|
||||||
queryClient.invalidateQueries({ queryKey: ["user-integrations"] });
|
queryClient.invalidateQueries({ queryKey: ["user-integrations"] });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleRefresh() {
|
async function handleRefresh() {
|
||||||
setRefreshing(true);
|
setRefreshing(true);
|
||||||
const { data, error } = await invokeFunction<{
|
const { data, error } = await invokeFunction<{
|
||||||
|
|
@ -300,6 +301,7 @@ function IntegrationDetailPage() {
|
||||||
mcpSlug={mcp.slug}
|
mcpSlug={mcp.slug}
|
||||||
mcpName={mcp.name}
|
mcpName={mcp.name}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ export function getProviderEnv(slug: ProviderSlug, redirectUri: string): Provide
|
||||||
return { clientId, clientSecret, redirectUri };
|
return { clientId, clientSecret, redirectUri };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monta a URL de autorização para iniciar o fluxo OAuth.
|
* Monta a URL de autorização para iniciar o fluxo OAuth.
|
||||||
*/
|
*/
|
||||||
|
|
@ -442,6 +443,7 @@ export async function revokeToken(
|
||||||
// Todoist precisa client_id/secret + access_token no body
|
// Todoist precisa client_id/secret + access_token no body
|
||||||
const clientId = readFirstEnv(["TODOIST_CLIENT_ID", "TODOIST_OAUTH_CLIENT_ID"]);
|
const clientId = readFirstEnv(["TODOIST_CLIENT_ID", "TODOIST_OAUTH_CLIENT_ID"]);
|
||||||
const clientSecret = readFirstEnv(["TODOIST_CLIENT_SECRET", "TODOIST_OAUTH_CLIENT_SECRET"]);
|
const clientSecret = readFirstEnv(["TODOIST_CLIENT_SECRET", "TODOIST_OAUTH_CLIENT_SECRET"]);
|
||||||
|
|
||||||
const body = new URLSearchParams({
|
const body = new URLSearchParams({
|
||||||
client_id: clientId,
|
client_id: clientId,
|
||||||
client_secret: clientSecret,
|
client_secret: clientSecret,
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ Deno.serve(async (req) => {
|
||||||
if (!pErr) pausedCount = jobsToPause.length;
|
if (!pErr) pausedCount = jobsToPause.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 2. Busca tokens ANTES de qualquer delete
|
// 2. Busca tokens ANTES de qualquer delete
|
||||||
const accessToken = integ.access_token_vault_id
|
const accessToken = integ.access_token_vault_id
|
||||||
? await getDecryptedSecret(admin, integ.access_token_vault_id)
|
? await getDecryptedSecret(admin, integ.access_token_vault_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue