Skip to content

fix(plugins): meta.json の permissions を NoteDeck の権限キーで書く - #87

Merged
hitalin merged 2 commits into
mainfrom
fix/plugin-permissions-notedeck-keys
Oct 15, 2026
Merged

hitalin merged 2 commits into
mainfrom
fix/plugin-permissions-notedeck-keys

Conversation

@hitalin

@hitalin hitalin commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

なぜ

meta.json の permissions は NoteDeck の権限キーで書く決まり (docs/registry-format.md の「互換性と権限」) だが、9 件のプラグインが Misskey 本家のスコープ (write:notes など) を書いていた。plugin.is のヘッダから写したものと思われる。契約チェックの警告 9 件はすべてこれ。

変更

契約チェックが呼び出しから導いた値に揃えた (各ファイル 1 行)。

プラグイン 前 後
block-checker read:account (なし)
block-combo read:account, write:blocks, write:mutes account.write
dominator read:account (なし)
federation-checker read:federation (なし)
misskey-translate read:account account.read
pakuru write:notes notes.write
reaction-piggyback write:reactions notes.react
same-emoji-react write:reactions notes.react
smart-delete read:account, read:drive, write:notes, write:drive account.read, drive.read, drive.write, notes.write

(なし) の 3 件は、権限の要らない公開 endpoint の読み取りしかしていない。

本家向けのスコープは plugin.is のヘッダにそのまま残っているので、本家 Misskey Web での動作は変わらない。プラグインのソースは変えていないので版は上げていない。

本家のスコープの表示 (追加)

9 件はどれも本家 Misskey Web でも動く両対応のプラグインで、これまで詳細ページの「Permissions」欄に出ていた本家のスコープは、本家の利用者にとって「入れるとこの権限を求められる」という意味のある情報だった。NoteDeck の権限キーに揃えるとそれが消えるので、plugin.is のメタブロックの permissions を契約情報の misskeyScopes として導き出し、runsOn に misskey-web を含むプラグインでは「Misskey Web scopes」として別の枠に出すようにした。NoteDeck 専用のプラグインではこの枠を出さない。

本家がストアから入れるときに受け取る api.json はソースだけで、meta.json は含まれない。本家での動作はこの PR の前後で変わらない。

確認

  • registry:build / レジストリ完全性チェック OK
  • pnpm contract:verify: 149 件中、合格 149 / 不合格 0、警告 0 件 (前は 9 件)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Plugin details now show requested Misskey Web scopes, with a clear message when none are needed.
  • Updates
    • Refreshed registry information and aligned plugin permission labels with NoteDeck’s permission names.
    • Updated permission requirements for several plugins, including cases where no permissions are required.

9 件のプラグインが meta.json の permissions に Misskey 本家のスコープ
(write:notes など) を書いていた。meta.json の permissions は NoteDeck の
権限キーで書く決まりなので、契約チェックが呼び出しから導いた値に揃える。
本家向けのスコープは plugin.is のヘッダに残っているので、本家での動作は
変わらない。契約チェックの警告 9 件が 0 件になる。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ab0bf87f-fa71-483c-909e-8523b1e219bc
📥 Commits

Reviewing files that changed from the base of the PR and between 67f0b7f and 96872d4.

📒 Files selected for processing: 18
  • public/registry/index.json
  • public/registry/plugins.json
  • public/registry/plugins/block-checker/meta.json
  • public/registry/plugins/block-combo/meta.json
  • public/registry/plugins/dominator/meta.json
  • public/registry/plugins/federation-checker/meta.json
  • public/registry/plugins/misskey-translate/meta.json
  • public/registry/plugins/pakuru/meta.json
  • public/registry/plugins/reaction-piggyback/meta.json
  • public/registry/plugins/same-emoji-react/meta.json
  • public/registry/plugins/smart-delete/meta.json
  • public/registry/queries.json
  • public/registry/skills.json
  • public/registry/themes.json
  • public/registry/widgets.json
  • scripts/lib/derive-contract.mjs
  • src/pages/PluginDetail.vue
  • src/types/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Plugin contracts now record Misskey scopes derived from plugin permissions, and the plugin detail page displays those scopes. Selected plugin permission declarations and registry timestamps were also updated.

Changes: Plugin contracts and registry updates

Layer / File(s) Summary
Add Misskey scope contracts
scripts/lib/derive-contract.mjs, src/types/index.ts, src/pages/PluginDetail.vue, public/registry/plugins.json
Plugin contract generation adds sorted, unique string values from plugin metadata permissions as misskeyScopes. The detail page displays this field for Misskey Web plugins. Registry plugin contracts now contain scope values or empty arrays.
Update plugin permission declarations
public/registry/plugins.json, public/registry/plugins/*/meta.json
Selected plugin permission declarations use updated permission names or empty lists. Their registry contracts record the corresponding prior Misskey scopes. Selected plugin timestamps were also updated.
Refresh registry timestamps
public/registry/index.json, public/registry/plugins.json, public/registry/queries.json, public/registry/skills.json, public/registry/themes.json, public/registry/widgets.json
Registry-level timestamps and the account-accent skill timestamps changed. Category counts and the other listed entries remain unchanged.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 96872

NoteDeck permissions and Misskey Web scopes remain distinct and are displayed with the intended values. The timestamp correction does not change skill ordering, and no concrete merge-blocking issue remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (16 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: updating plugin meta.json permissions to use NoteDeck permission keys. It is concise and directly related to the pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (16 skipped: 16 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hitalin hitalin self-assigned this Oct 15, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
misstore 96872d4 Oct 15 2026, 11:20 AM

meta.json の permissions を NoteDeck の権限キーに揃えると、両対応の
プラグインで「本家ではどのスコープを求められるか」が詳細ページから
消えてしまう。plugin.is のメタブロックの permissions を契約情報の
misskeyScopes として導出し、runsOn に misskey-web を含むプラグインでは
「Misskey Web scopes」として Permissions とは別の枠に表示する。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hitalin
hitalin merged commit ebd8606 into main Oct 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant