diff --git a/public/registry/index.json b/public/registry/index.json index 999d0c2..ca44d0c 100644 --- a/public/registry/index.json +++ b/public/registry/index.json @@ -1,24 +1,24 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "plugins": { "count": 41, - "updatedAt": "2026-10-13T12:57:05.708Z" + "updatedAt": "2026-10-15T11:17:46.820Z" }, "themes": { "count": 77, - "updatedAt": "2026-10-13T12:57:05.708Z" + "updatedAt": "2026-10-15T11:17:46.820Z" }, "widgets": { "count": 64, - "updatedAt": "2026-10-13T12:57:05.708Z" + "updatedAt": "2026-10-15T11:17:46.820Z" }, "skills": { "count": 44, - "updatedAt": "2026-10-13T12:57:05.708Z" + "updatedAt": "2026-10-15T11:17:46.820Z" }, "queries": { "count": 35, - "updatedAt": "2026-10-13T12:57:05.708Z" + "updatedAt": "2026-10-15T11:17:46.820Z" } } diff --git a/public/registry/plugins.json b/public/registry/plugins.json index 9a3ec52..ddbe100 100644 --- a/public/registry/plugins.json +++ b/public/registry/plugins.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "plugins": [ { "id": "ai-actions", @@ -57,7 +57,11 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "ai.invoke", + "drafts.write" + ] } }, { @@ -121,7 +125,8 @@ "command" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -173,7 +178,10 @@ "note_action" ], "external": true, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "vault.use" + ] } }, { @@ -215,7 +223,8 @@ "note_post_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -258,7 +267,8 @@ "note_post_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -308,7 +318,10 @@ "note_action" ], "external": true, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "network.external" + ] } }, { @@ -361,7 +374,8 @@ "on:notification:new" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -405,7 +419,8 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -448,7 +463,8 @@ "post_form_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -505,7 +521,8 @@ "mkApi": [], "hooks": [], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -557,7 +574,8 @@ "command" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -612,7 +630,8 @@ "on:note:new" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -670,7 +689,8 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -694,7 +714,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/smart-delete/api.json", "sha512": "bba0644c86ac0c45dbaf9349e029a698c7344e5a4c86f3bf10eb857b5455ece86c0d6b5eb1f0b7dfd38d3ab1175b71d10935fb756617838aa5673bfa65374504", "createdAt": "2026-07-20T09:16:14+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -704,10 +724,10 @@ } }, "permissions": [ - "read:account", - "read:drive", - "write:notes", - "write:drive" + "account.read", + "drive.read", + "drive.write", + "notes.write" ], "iconUrl": "https://store.notedeck.io/registry/plugins/smart-delete/icon.svg", "contract": { @@ -733,7 +753,13 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:account", + "read:drive", + "write:drive", + "write:notes" + ] } }, { @@ -789,7 +815,8 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -813,7 +840,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/dominator/api.json", "sha512": "cc9af17a82161008c7bb8a9f41e80f8de27e84e26c93839e95f5d465112dfe5ddcac598f6f88cd20f00fc79a77d41f5af77ef4a91289ed72dec0a1f9fbfa0f35", "createdAt": "2026-07-14T13:43:33+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -822,9 +849,6 @@ "description": "Scan a user's Crime Coefficient (spam tendency / trust score) from the user menu and see the breakdown. The scoring maps X's public tweepcred algorithm onto Misskey; it is computed entirely inside the client, with nothing sent externally or published." } }, - "permissions": [ - "read:account" - ], "iconUrl": "https://store.notedeck.io/registry/plugins/dominator/icon.svg", "contract": { "runsOn": [ @@ -842,7 +866,10 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:account" + ] } }, { @@ -886,7 +913,8 @@ "note_view_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -937,7 +965,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "memos.write" + ] } }, { @@ -989,7 +1020,10 @@ "note_action" ], "external": true, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "vault.use" + ] } }, { @@ -1011,7 +1045,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/misskey-translate/api.json", "sha512": "99162928e722cb4abbb6512c3c1b8c20dd3f46a84af56fe9c0bdde135fb8da7de01205409083108f58f99dc5a887a8e2b7f64a15681468d73419b0069378834a", "createdAt": "2026-10-12T17:16:47+09:00", - "updatedAt": "2026-10-12T17:16:47+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1021,7 +1055,7 @@ } }, "permissions": [ - "read:account" + "account.read" ], "iconUrl": "https://store.notedeck.io/registry/plugins/misskey-translate/icon.svg", "contract": { @@ -1042,7 +1076,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:account" + ] } }, { @@ -1065,7 +1102,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/pakuru/api.json", "sha512": "1075e1d86a32040c67800dd0d9732b1fa27750b3f7a13b0815a65433a745e2d635aef6d793e68ba69dee5bb1cc0e66e301a1a9f37b895a93904bd8f10b3faa8d", "createdAt": "2026-07-13T22:03:54+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1075,7 +1112,7 @@ } }, "permissions": [ - "write:notes" + "notes.write" ], "iconUrl": "https://store.notedeck.io/registry/plugins/pakuru/icon.svg", "contract": { @@ -1095,7 +1132,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "write:notes" + ] } }, { @@ -1118,7 +1158,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/block-checker/api.json", "sha512": "e4fe2a6260892a7eba7439aeb716d2d914e9dd84dfcfe7d1c91aca8646ce86608deccc65353d43bd1e3cb2b519d61b6b98eade937dc328f022595ed302191a36", "createdAt": "2026-07-16T07:08:20+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1127,9 +1167,6 @@ "description": "Check from the user menu whether a user has blocked you. Also shows your follow relationship and whether you block or mute them. Whether they mute you cannot be checked, by Misskey's design." } }, - "permissions": [ - "read:account" - ], "iconUrl": "https://store.notedeck.io/registry/plugins/block-checker/icon.svg", "contract": { "runsOn": [ @@ -1146,7 +1183,10 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:account" + ] } }, { @@ -1170,7 +1210,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/block-combo/api.json", "sha512": "2af88eca65cd26993f5326d8f1c279d0b5bc2eff083be24114b6d345a594e894f6c405d6fbff6dbd0930c7c8bcc21272354adff15de9107daaf12a28bf946c39", "createdAt": "2026-07-17T07:17:06+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1180,9 +1220,7 @@ } }, "permissions": [ - "read:account", - "write:blocks", - "write:mutes" + "account.write" ], "iconUrl": "https://store.notedeck.io/registry/plugins/block-combo/icon.svg", "contract": { @@ -1205,7 +1243,12 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:account", + "write:blocks", + "write:mutes" + ] } }, { @@ -1229,7 +1272,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/reaction-piggyback/api.json", "sha512": "f237acfb9f0532b64caecfdd1817691810064d8a844e613ac36269e38577a1a64d71903261aa0952dbfcb284c27e64dff224356629a7cfdff612324c5a8a507c", "createdAt": "2026-08-12T13:30:08+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1239,7 +1282,7 @@ } }, "permissions": [ - "write:reactions" + "notes.react" ], "iconUrl": "https://store.notedeck.io/registry/plugins/reaction-piggyback/icon.svg", "contract": { @@ -1260,7 +1303,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "write:reactions" + ] } }, { @@ -1317,7 +1363,8 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1362,7 +1409,8 @@ "post_form_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1424,7 +1472,8 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1467,7 +1516,8 @@ "note_view_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1491,7 +1541,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/same-emoji-react/api.json", "sha512": "5c6deb32aaf324f5a0699f99f88a6d481b96f71e0e1b77932f13f60b264faf0b4b923e657caa78328c25042c3b0e8d464428d097bb6a316bf1d301f9cdae567e", "createdAt": "2026-08-12T13:21:58+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -1501,7 +1551,7 @@ } }, "permissions": [ - "write:reactions" + "notes.react" ], "iconUrl": "https://store.notedeck.io/registry/plugins/same-emoji-react/icon.svg", "contract": { @@ -1522,7 +1572,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "write:reactions" + ] } }, { @@ -1565,7 +1618,8 @@ "post_form_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1609,7 +1663,8 @@ "post_form_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1664,7 +1719,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "clipboard" + ] } }, { @@ -1722,7 +1780,8 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1769,7 +1828,8 @@ "post_form_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1812,7 +1872,8 @@ "note_post_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1865,7 +1926,8 @@ "mkApi": [], "hooks": [], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1913,7 +1975,8 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -1957,7 +2020,8 @@ "note_post_interruptor" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [] } }, { @@ -2008,7 +2072,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "files.export" + ] } }, { @@ -2031,7 +2098,7 @@ "apiUrl": "https://store.notedeck.io/registry/plugins/federation-checker/api.json", "sha512": "66791625edc52f7bd27cf4b95654216e7643c525e156f5f550f5b92cb29084dca45213b511b16616879334d245f9194906ac0a6a22c81048e8a440bf512eb323", "createdAt": "2026-07-16T07:49:09+09:00", - "updatedAt": "2026-09-25T18:20:03+09:00", + "updatedAt": "2026-10-15T20:13:44+09:00", "authorUrl": "https://github.com/hitalin", "license": "MIT", "locales": { @@ -2040,9 +2107,6 @@ "description": "Check federation status with a user's server from the user menu. Shows your server's blocks / suspended delivery / silencing, delivery success, and last received time together, and can also open a two-way check on misspace." } }, - "permissions": [ - "read:federation" - ], "iconUrl": "https://store.notedeck.io/registry/plugins/federation-checker/icon.svg", "contract": { "runsOn": [ @@ -2060,7 +2124,10 @@ "user_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "read:federation" + ] } }, { @@ -2114,7 +2181,10 @@ "note_action" ], "external": false, - "unresolved": [] + "unresolved": [], + "misskeyScopes": [ + "clipboard" + ] } } ] diff --git a/public/registry/plugins/block-checker/meta.json b/public/registry/plugins/block-checker/meta.json index 6d44412..bcf0bc2 100644 --- a/public/registry/plugins/block-checker/meta.json +++ b/public/registry/plugins/block-checker/meta.json @@ -9,6 +9,6 @@ "category": "moderation", "capabilities": ["misskey-api"], "tags": ["block", "mute", "relation", "moderation"], - "permissions": ["read:account"], + "permissions": [], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/block-combo/meta.json b/public/registry/plugins/block-combo/meta.json index d9f79ce..4780df3 100644 --- a/public/registry/plugins/block-combo/meta.json +++ b/public/registry/plugins/block-combo/meta.json @@ -9,6 +9,6 @@ "category": "moderation", "capabilities": ["misskey-api"], "tags": ["block", "mute", "unfollow", "burokai", "moderation"], - "permissions": ["read:account", "write:blocks", "write:mutes"], + "permissions": ["account.write"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/dominator/meta.json b/public/registry/plugins/dominator/meta.json index db28592..c7a0c19 100644 --- a/public/registry/plugins/dominator/meta.json +++ b/public/registry/plugins/dominator/meta.json @@ -9,6 +9,6 @@ "category": "moderation", "capabilities": ["misskey-api"], "tags": ["score", "spam", "trust", "psycho-pass", "moderation"], - "permissions": ["read:account"], + "permissions": [], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/federation-checker/meta.json b/public/registry/plugins/federation-checker/meta.json index 77a09e2..91e6ad2 100644 --- a/public/registry/plugins/federation-checker/meta.json +++ b/public/registry/plugins/federation-checker/meta.json @@ -9,6 +9,6 @@ "category": "moderation", "capabilities": ["misskey-api"], "tags": ["federation", "instance", "block", "moderation"], - "permissions": ["read:federation"], + "permissions": [], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/misskey-translate/meta.json b/public/registry/plugins/misskey-translate/meta.json index fd7925c..7c10db3 100644 --- a/public/registry/plugins/misskey-translate/meta.json +++ b/public/registry/plugins/misskey-translate/meta.json @@ -9,6 +9,6 @@ "category": "utility", "capabilities": ["misskey-api"], "tags": ["translate", "i18n", "note-action"], - "permissions": ["read:account"], + "permissions": ["account.read"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/pakuru/meta.json b/public/registry/plugins/pakuru/meta.json index 819069c..efb7b92 100644 --- a/public/registry/plugins/pakuru/meta.json +++ b/public/registry/plugins/pakuru/meta.json @@ -9,6 +9,6 @@ "category": "other", "capabilities": ["misskey-api"], "tags": ["fun", "classic", "pakuru", "numberquote"], - "permissions": ["write:notes"], + "permissions": ["notes.write"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/reaction-piggyback/meta.json b/public/registry/plugins/reaction-piggyback/meta.json index 315ef58..a4932b4 100644 --- a/public/registry/plugins/reaction-piggyback/meta.json +++ b/public/registry/plugins/reaction-piggyback/meta.json @@ -9,6 +9,6 @@ "category": "utility", "capabilities": ["misskey-api", "misskey-account"], "tags": ["emoji", "reaction", "custom-emoji", "remote"], - "permissions": ["write:reactions"], + "permissions": ["notes.react"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/same-emoji-react/meta.json b/public/registry/plugins/same-emoji-react/meta.json index fc6d6cb..970caf2 100644 --- a/public/registry/plugins/same-emoji-react/meta.json +++ b/public/registry/plugins/same-emoji-react/meta.json @@ -9,6 +9,6 @@ "category": "utility", "capabilities": ["misskey-api", "misskey-account"], "tags": ["emoji", "reaction", "custom-emoji", "twemoji"], - "permissions": ["write:reactions"], + "permissions": ["notes.react"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/plugins/smart-delete/meta.json b/public/registry/plugins/smart-delete/meta.json index 83168e5..1ded9a1 100644 --- a/public/registry/plugins/smart-delete/meta.json +++ b/public/registry/plugins/smart-delete/meta.json @@ -9,6 +9,6 @@ "category": "utility", "capabilities": ["misskey-api"], "tags": ["delete", "drive", "cleanup", "attachment", "privacy"], - "permissions": ["read:account", "read:drive", "write:notes", "write:drive"], + "permissions": ["account.read", "drive.read", "drive.write", "notes.write"], "minNoteDeckVersion": "1.8.0" } diff --git a/public/registry/queries.json b/public/registry/queries.json index 7e20639..724e044 100644 --- a/public/registry/queries.json +++ b/public/registry/queries.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "queries": [ { "id": "bot-only", diff --git a/public/registry/skills.json b/public/registry/skills.json index 838a319..d64efef 100644 --- a/public/registry/skills.json +++ b/public/registry/skills.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "skills": [ { "id": "aiscript-surgeon", @@ -558,8 +558,8 @@ "sourceUrl": "https://store.notedeck.io/registry/skills/account-accent/skill.md", "apiUrl": "https://store.notedeck.io/registry/skills/account-accent/api.json", "sha512": "562e7dedd6dc62c8af672222b66ccecb5be92f491835d5d82f6f227243dc01af49dca4993203f00e2592eaf4f8dc082b2288ff58dea95de1107cd7c7b696aa29", - "createdAt": "2026-10-13T12:57:09.792Z", - "updatedAt": "2026-10-13T12:57:09.792Z", + "createdAt": "2026-10-13T21:57:29+09:00", + "updatedAt": "2026-10-13T21:57:29+09:00", "locales": { "en": { "name": "Per-account Colors", diff --git a/public/registry/themes.json b/public/registry/themes.json index 42b4bfc..c4ea883 100644 --- a/public/registry/themes.json +++ b/public/registry/themes.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "themes": [ { "id": "adwaita-dark", diff --git a/public/registry/widgets.json b/public/registry/widgets.json index bfed112..3932ec0 100644 --- a/public/registry/widgets.json +++ b/public/registry/widgets.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-10-13T12:57:05.708Z", + "updatedAt": "2026-10-15T11:17:46.820Z", "widgets": [ { "id": "aiscript-health", diff --git a/scripts/lib/derive-contract.mjs b/scripts/lib/derive-contract.mjs index 6a31566..c95745c 100644 --- a/scripts/lib/derive-contract.mjs +++ b/scripts/lib/derive-contract.mjs @@ -349,6 +349,22 @@ export function computeProfile(keys, permissionPresets) { * @param {object} [meta] meta.json (plugins / widgets)。skills は frontmatter を source から読むので省略可 * @param {object} [contract] 契約スナップショット (既定: scripts/contract/notedeck-contract.json) */ +// プラグインのメタブロック (`### { … }`) の permissions = 本家 Misskey Web が +// トークン発行時に求めるスコープ。NoteDeck の permission key とは別の語彙なので +// meta.json の permissions とは混ぜず、詳細ページで別に見せる。読めなければ [] +function misskeyScopesOf(source) { + let ast + try { + ast = Parser.parse(source) + } catch { + return [] + } + const meta = ast.find((n) => n.type === 'meta' && n.name == null) + const perms = meta?.value?.type === 'obj' ? meta.value.value.get('permissions') : undefined + if (perms?.type !== 'arr') return [] + return sortedUnique(perms.value.filter((v) => v.type === 'str').map((v) => v.value)) +} + export function deriveContract(kind, source, meta = {}, contract = (defaultContract ??= loadContract())) { const k = normalizeKind(kind) const issues = [] @@ -444,6 +460,7 @@ export function deriveContract(kind, source, meta = {}, contract = (defaultContr hooks: sortedUnique(analysis.hooks), external: analysis.external, unresolved: [...analysis.unresolved], + ...(k === 'plugin' ? { misskeyScopes: misskeyScopesOf(source) } : {}), issues, ...(analysis.parseError ? { parseError: analysis.parseError } : {}), } diff --git a/src/pages/PluginDetail.vue b/src/pages/PluginDetail.vue index 4c154fe..2433ae0 100644 --- a/src/pages/PluginDetail.vue +++ b/src/pages/PluginDetail.vue @@ -178,6 +178,13 @@ function openMisskeyInstall() { :empty-text="t.detail.noPermissions" /> + + diff --git a/src/types/index.ts b/src/types/index.ts index 3f16d3d..c72341b 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -131,6 +131,8 @@ export interface ItemContract { external: boolean // 設定由来の宛先など、静的に判定できなかった呼び出し unresolved: string[] + // プラグインのみ: 本家 Misskey Web がトークン発行時に求めるスコープ (メタブロックの permissions) + misskeyScopes?: string[] } // NoteDeck のカラムフィルタクエリ (notedeck#783)。