mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 18:34:09 +00:00
092223c259
One coarse scope rather than per-plugin granularity. Which plugins are
installed is runtime data, so a per-plugin scope cannot be statically
enumerated: it would break the ${group}:${mode} derivation and the
AssertExact guards in nest-mcp-policy.ts, and its consent copy could not
be written ahead of time for a third-party plugin name. Tokens issued
before a plugin existed could never carry its scope either. Per-plugin
granularity already exists one layer down as the admin's mcp:tools grant.
'use' is a fourth mode, which widens ScopeMode. Nothing else moves:
McpAccessGroup and McpAccessMode derive from Scope, so both AssertExact
guards self-heal, and the policy's fallback branch already covers a third
mode the way it covers files:content.
The presets needed an explicit exclusion. Five of the six are written as
"everything except deletes", so plugins:use would have joined Claude.ai,
Cursor, Windsurf and Zed silently and handed out third-party tool
execution without anyone choosing it. That filter was duplicated across
the desktop and mobile files with nothing pinning it, so both now use one
shared constant, and FE-OAUTH-SCOPES-012 holds the line for the next
scope like this one.
The consent copy says what the scope does not do: the RPC host authorises
from grants frozen at construction, so this scope plus weather:read still
reaches whatever the plugin itself was granted.
Two i18n gates, not one. The dot-only group key is tracked by
i18n-parity.mjs, whose regex has no colon in its character class; the
colon-bearing label/description pair is invisible to it but is compared by
client/tests/unit/i18n/parity.test.ts, which diffs merged bundles. All 23
locales get all three keys, including the three in neither gate.
The consent glyph gets a ':use' branch. Falling through to the eye would
tell the user a tool-running scope only looks at things.
114 lines
8.4 KiB
TypeScript
114 lines
8.4 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const oauth: TranslationStrings = {
|
|
'oauth.scope.group.trips': '旅行',
|
|
'oauth.scope.group.places': '場所',
|
|
'oauth.scope.group.collections': 'コレクション',
|
|
'oauth.scope.group.atlas': '地図',
|
|
'oauth.scope.group.packing': '持ち物',
|
|
'oauth.scope.group.todos': 'ToDo',
|
|
'oauth.scope.group.budget': '予算',
|
|
'oauth.scope.group.reservations': '予約',
|
|
'oauth.scope.group.collab': 'コラボ',
|
|
'oauth.scope.group.notifications': '通知',
|
|
'oauth.scope.group.vacay': '休暇',
|
|
'oauth.scope.group.geo': '地図',
|
|
'oauth.scope.group.weather': '天気',
|
|
'oauth.scope.group.journey': '日記',
|
|
'oauth.scope.trips:read.label': '旅行・旅程を表示',
|
|
'oauth.scope.trips:read.description': '旅行、日程、メモ、メンバーを閲覧',
|
|
'oauth.scope.trips:write.label': '旅行・旅程を編集',
|
|
'oauth.scope.trips:write.description': '旅行や日程、メモの作成・更新、メンバー管理',
|
|
'oauth.scope.trips:delete.label': '旅行を削除',
|
|
'oauth.scope.trips:delete.description': '旅行全体を完全に削除(元に戻せません)',
|
|
'oauth.scope.trips:share.label': '共有リンクを管理',
|
|
'oauth.scope.trips:share.description': '旅行の公開共有リンクを作成・更新・無効化',
|
|
'oauth.scope.places:read.label': '場所・地図データを表示',
|
|
'oauth.scope.places:read.description': '場所、日への割り当て、タグ、カテゴリを閲覧',
|
|
'oauth.scope.places:write.label': '場所を管理',
|
|
'oauth.scope.places:write.description': '場所、割り当て、タグの作成・更新・削除',
|
|
'oauth.scope.collections:read.label': 'コレクションを表示',
|
|
'oauth.scope.collections:read.description':
|
|
'保存した場所のコレクションと、その中の場所、評価、ラベル、メンバーを読み取る',
|
|
'oauth.scope.collections:write.label': 'コレクションを管理',
|
|
'oauth.scope.collections:write.description':
|
|
'コレクションの作成・編集、場所の保存・評価・ラベル付け・コピー、リストの共有',
|
|
'oauth.scope.atlas:read.label': '地図を表示',
|
|
'oauth.scope.atlas:read.description': '訪問した国・地域、バケットリストを閲覧',
|
|
'oauth.scope.atlas:write.label': '地図を管理',
|
|
'oauth.scope.atlas:write.description': '訪問済みの国・地域を管理、バケットリスト編集',
|
|
'oauth.scope.packing:read.label': '持ち物リストを表示',
|
|
'oauth.scope.packing:read.description': '持ち物、バッグ、担当者を閲覧',
|
|
'oauth.scope.packing:write.label': '持ち物リストを管理',
|
|
'oauth.scope.packing:write.description': '持ち物やバッグの追加・編集・削除・並び替え',
|
|
'oauth.scope.todos:read.label': 'ToDoリストを表示',
|
|
'oauth.scope.todos:read.description': '旅行のToDoと担当者を閲覧',
|
|
'oauth.scope.todos:write.label': 'ToDoリストを管理',
|
|
'oauth.scope.todos:write.description': 'ToDoの作成・編集・完了・削除・並び替え',
|
|
'oauth.scope.budget:read.label': '予算を表示',
|
|
'oauth.scope.budget:read.description': '予算項目や内訳を閲覧',
|
|
'oauth.scope.budget:write.label': '予算を管理',
|
|
'oauth.scope.budget:write.description': '予算項目の作成・編集・削除',
|
|
'oauth.scope.reservations:read.label': '予約を表示',
|
|
'oauth.scope.reservations:read.description': '予約や宿泊情報を閲覧',
|
|
'oauth.scope.reservations:write.label': '予約を管理',
|
|
'oauth.scope.reservations:write.description': '予約の作成・編集・削除・並び替え',
|
|
'oauth.scope.collab:read.label': 'コラボを表示',
|
|
'oauth.scope.collab:read.description': '共同メモ、投票、メッセージを閲覧',
|
|
'oauth.scope.collab:write.label': 'コラボを管理',
|
|
'oauth.scope.collab:write.description': '共同メモ、投票、メッセージを管理',
|
|
'oauth.scope.notifications:read.label': '通知を表示',
|
|
'oauth.scope.notifications:read.description': 'アプリ内通知と未読数を閲覧',
|
|
'oauth.scope.notifications:write.label': '通知を管理',
|
|
'oauth.scope.notifications:write.description': '通知を既読にする・対応する',
|
|
'oauth.scope.vacay:read.label': '休暇プランを表示',
|
|
'oauth.scope.vacay:read.description': '休暇プランのデータや統計を閲覧',
|
|
'oauth.scope.vacay:write.label': '休暇プランを管理',
|
|
'oauth.scope.vacay:write.description': '休暇エントリーや予定を管理',
|
|
'oauth.scope.geo:read.label': '地図・ジオコーディング',
|
|
'oauth.scope.geo:read.description': '場所検索、地図URL解析、逆ジオコーディング',
|
|
'oauth.scope.weather:read.label': '天気予報',
|
|
'oauth.scope.weather:read.description': '旅行先・日程の天気予報を取得',
|
|
'oauth.scope.journey:read.label': '日記を表示',
|
|
'oauth.scope.journey:read.description': '日記、エントリー、参加者を閲覧',
|
|
'oauth.scope.journey:write.label': '日記を管理',
|
|
'oauth.scope.journey:write.description': '日記やエントリーの作成・編集・削除',
|
|
'oauth.scope.journey:share.label': '日記共有を管理',
|
|
'oauth.scope.journey:share.description': '公開共有リンクの作成・更新・無効化',
|
|
'oauth.authorize.authorizing': 'Authorizing…', // en-fallback
|
|
'oauth.authorize.loading': 'Loading…', // en-fallback
|
|
'oauth.authorize.errorTitle': 'Authorization Error', // en-fallback
|
|
'oauth.authorize.loginTitle': 'Sign in to continue', // en-fallback
|
|
'oauth.authorize.loginDescription': '{client} wants access to your TREK account. Please sign in first.', // en-fallback
|
|
'oauth.authorize.loginButton': 'Sign in to TREK', // en-fallback
|
|
'oauth.authorize.requestLabel': 'Authorization Request', // en-fallback
|
|
'oauth.authorize.requestDescription': 'This application is requesting access to your TREK account.', // en-fallback
|
|
'oauth.authorize.trustNote': 'Only grant access to applications you trust. Your data stays on your server.', // en-fallback
|
|
'oauth.authorize.selectScope': 'Select at least one scope', // en-fallback
|
|
'oauth.authorize.approveOneScope': 'Approve ({count} scope)', // en-fallback
|
|
'oauth.authorize.approveManyScopes': 'Approve ({count} scopes)', // en-fallback
|
|
'oauth.authorize.approveAccess': 'Approve Access', // en-fallback
|
|
'oauth.authorize.deny': 'Deny', // en-fallback
|
|
'oauth.authorize.choosePermissions': 'Choose which permissions to grant', // en-fallback
|
|
'oauth.authorize.permissionsRequested': 'Permissions requested', // en-fallback
|
|
'oauth.authorize.alwaysIncluded': 'Always included', // en-fallback
|
|
'oauth.authorize.alwaysTool.listTrips': 'List your trips so the AI can discover trip IDs', // en-fallback
|
|
'oauth.authorize.alwaysTool.getTripSummary': 'Read a trip overview needed to use any other tool', // en-fallback
|
|
'oauth.scope.group.files': 'ファイル',
|
|
'oauth.scope.group.settings': '設定',
|
|
'oauth.scope.files:read.label': '旅行のファイルを表示',
|
|
'oauth.scope.files:read.description': '旅行の書類を一覧表示します。名前、サイズ、アップロードした人、リンク先',
|
|
'oauth.scope.files:write.label': '旅行のファイルを管理',
|
|
'oauth.scope.files:write.description': 'ファイルの名前と説明の変更、予約や場所への紐付け、スターとゴミ箱への移動',
|
|
'oauth.scope.files:content.label': 'ファイルの中身を読む',
|
|
'oauth.scope.files:content.description': 'アップロードされた書類の中身を読みます。予約PDFやチケットなど',
|
|
'oauth.scope.settings:read.label': '環境設定を表示',
|
|
'oauth.scope.settings:read.description': '単位、時刻表示、言語、既定通貨、開始ページの読み取り',
|
|
'oauth.scope.settings:write.label': '環境設定を変更',
|
|
'oauth.scope.settings:write.description': '単位、時刻表示、言語、既定通貨、開始ページの変更。保存されたAPIキーは対象外',
|
|
'oauth.scope.group.plugins': 'プラグイン',
|
|
'oauth.scope.plugins:use.label': 'プラグインのツールを実行',
|
|
'oauth.scope.plugins:use.description': '管理者がインストールして承認したプラグインが公開するツールを、このクライアントから呼び出せるようにします。各プラグインは、このトークンのスコープではなく、すでに付与されている権限で動作します',
|
|
};
|
|
export default oauth;
|