mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
feat(core): improve mcp management (#15221)
#### PR Dependency Tree * **PR #15221** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added MCP credential management (create/reveal, list, rotate, revoke) with expiration and status tracking. * Introduced read-only vs read/write access modes, with read/write tooling enabled only when permitted. * Added workspace MCP credential configuration UI, including token reveal and setup generation. * Added MCP credential GraphQL APIs to back the UI. * **Changes** * Replaced legacy access-token support with MCP credentials across authentication and realtime updates. * **Bug Fixes** * MCP authentication now reliably rejects revoked, rotated, expired, or disabled-user credentials. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -41,10 +41,6 @@ export interface RealtimeRequestMap {
|
||||
input: Record<string, never>;
|
||||
output: { settings: UserSettingsSnapshot };
|
||||
};
|
||||
'user.access-tokens.get': {
|
||||
input: Record<string, never>;
|
||||
output: { tokens: AccessTokenSnapshot[] };
|
||||
};
|
||||
'notification.count.get': {
|
||||
input: Record<string, never>;
|
||||
output: { count: number };
|
||||
@@ -180,13 +176,6 @@ export interface UserSettingsSnapshot {
|
||||
receiveCommentEmail: boolean;
|
||||
}
|
||||
|
||||
export interface AccessTokenSnapshot {
|
||||
id: string;
|
||||
name: string;
|
||||
createdAt: string;
|
||||
expiresAt: string | null;
|
||||
}
|
||||
|
||||
export type CommentChangeActionSnapshot = 'update' | 'delete';
|
||||
|
||||
export interface CommentChangeSnapshot {
|
||||
@@ -285,10 +274,6 @@ export interface RealtimeTopicMap {
|
||||
input: Record<string, never>;
|
||||
event: { changed: true; reason: string };
|
||||
};
|
||||
'user.access-tokens.changed': {
|
||||
input: Record<string, never>;
|
||||
event: { changed: true; reason: string };
|
||||
};
|
||||
'notification.count.changed': {
|
||||
input: Record<string, never>;
|
||||
event: {
|
||||
|
||||
Reference in New Issue
Block a user