@motorical/scope-catalog 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/scopes.js +7 -5
- package/src/tools.js +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motorical/scope-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Canonical MCP/OAuth scope metadata for Motorical — descriptions, Public API scope mapping, implied-read rules, and declarative tool/resource membership. One source of truth consumed by motorical-backend and @motorical/mcp.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"engines": {
|
package/src/scopes.js
CHANGED
|
@@ -81,7 +81,9 @@ const SCOPES = {
|
|
|
81
81
|
agentDescription: 'List and read sending domains, their DNS records and email-authentication health, and read a Motor Block\'s configuration, without adding or verifying any domain.',
|
|
82
82
|
customerAction: 'View your sending domains and Motor Block configuration',
|
|
83
83
|
},
|
|
84
|
-
// Communications (marketing).
|
|
84
|
+
// Communications (marketing). Reading and the two edit scopes share ONE consent line (`resource: 'comms'`, one label for both edit scopes:
|
|
85
|
+
// the account has one person, so the first consent stays short); sending, workspace settings and webhooks each keep their own line,
|
|
86
|
+
// so sending is never hidden under editing. No Public API scopes:
|
|
85
87
|
// the Comms API is not a Public API route, the Communications Block checks these itself. There is deliberately no scope for
|
|
86
88
|
// permanent delete, recycle-bin cleanup or GDPR export/erase: those stay human-only.
|
|
87
89
|
'read:comms': {
|
|
@@ -92,18 +94,18 @@ const SCOPES = {
|
|
|
92
94
|
customerAction: 'View your lists, templates, campaigns and results',
|
|
93
95
|
},
|
|
94
96
|
'write:comms.audience': {
|
|
95
|
-
resource: 'comms
|
|
97
|
+
resource: 'comms',
|
|
96
98
|
level: 'manage',
|
|
97
99
|
publicScopes: [],
|
|
98
100
|
agentDescription: 'Create and change lists and contacts, add contacts (with a dry run), derive lists from lists, import, and add or remove suppressions. Includes everything read:comms grants. Cannot delete anything permanently.',
|
|
99
|
-
customerAction: '
|
|
101
|
+
customerAction: 'View and edit your lists, contacts, templates and campaign drafts, and send test emails to you. This never emails your contacts.',
|
|
100
102
|
},
|
|
101
103
|
'write:comms.content': {
|
|
102
|
-
resource: 'comms
|
|
104
|
+
resource: 'comms',
|
|
103
105
|
level: 'manage',
|
|
104
106
|
publicScopes: [],
|
|
105
107
|
agentDescription: 'Create and change templates, the brand kit and campaign drafts, duplicate and compile campaigns, and send a test email to the account owner only. Includes everything read:comms grants. Does not send to your contacts.',
|
|
106
|
-
customerAction: '
|
|
108
|
+
customerAction: 'View and edit your lists, contacts, templates and campaign drafts, and send test emails to you. This never emails your contacts.',
|
|
107
109
|
},
|
|
108
110
|
'send:comms.campaign': {
|
|
109
111
|
resource: 'comms-sending',
|
package/src/tools.js
CHANGED
|
@@ -110,6 +110,15 @@ const COMMS_TOOLS = [
|
|
|
110
110
|
'comms_get_brand_kit',
|
|
111
111
|
'comms_list_campaigns',
|
|
112
112
|
'comms_get_campaign',
|
|
113
|
+
// M3-2: content writes (write:comms.content) and the list card (write:comms.audience). Nothing here deletes, sends or touches contacts.
|
|
114
|
+
'comms_create_template',
|
|
115
|
+
'comms_create_template_from_starter',
|
|
116
|
+
'comms_update_template',
|
|
117
|
+
'comms_apply_template_fixes',
|
|
118
|
+
'comms_duplicate_template',
|
|
119
|
+
'comms_set_brand_kit',
|
|
120
|
+
'comms_create_list',
|
|
121
|
+
'comms_update_list',
|
|
113
122
|
];
|
|
114
123
|
|
|
115
124
|
const ALL_TOOLS = [
|
|
@@ -218,6 +227,14 @@ const TOOL_SCOPES = {
|
|
|
218
227
|
comms_get_brand_kit: ['read:comms'],
|
|
219
228
|
comms_list_campaigns: ['read:comms'],
|
|
220
229
|
comms_get_campaign: ['read:comms'],
|
|
230
|
+
comms_create_template: ['write:comms.content'],
|
|
231
|
+
comms_create_template_from_starter: ['write:comms.content'],
|
|
232
|
+
comms_update_template: ['write:comms.content'],
|
|
233
|
+
comms_apply_template_fixes: ['write:comms.content'],
|
|
234
|
+
comms_duplicate_template: ['write:comms.content'],
|
|
235
|
+
comms_set_brand_kit: ['write:comms.content'],
|
|
236
|
+
comms_create_list: ['write:comms.audience'],
|
|
237
|
+
comms_update_list: ['write:comms.audience'],
|
|
221
238
|
};
|
|
222
239
|
|
|
223
240
|
/** `|| []`: a tool with no entry (signup's own tool) contributes no scopes rather than throwing. */
|