mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
Add guided external-agent invitations with live Dot connection checks and ongoing access until revoked. Keep expired credentials invalid and enforce permissions for private avatar uploads. Preserve Runner recovery and remote launch boundaries. Co-Authored-By: Paperclip <noreply@paperclip.ing>
16 lines
644 B
SQL
16 lines
644 B
SQL
ALTER TABLE "mcp_oauth_tokens" ALTER COLUMN "expires_at" DROP NOT NULL;
|
|
--> statement-breakpoint
|
|
-- Active Dot connections keep working without another consent flow. Expired
|
|
-- or consumed credentials stay invalid, revoked grants stay revoked, and
|
|
-- personal assistant connections retain their expiry.
|
|
UPDATE "mcp_oauth_tokens" AS tokens
|
|
SET "expires_at" = NULL
|
|
FROM "mcp_oauth_grants" AS grants
|
|
WHERE tokens."grant_id" = grants."id"
|
|
AND tokens."kind" = 'refresh'
|
|
AND tokens."used_at" IS NULL
|
|
AND tokens."expires_at" > now()
|
|
AND grants."purpose" = 'agent'
|
|
AND grants."resource" LIKE '%/mcp/runner'
|
|
AND grants."revoked_at" IS NULL;
|