@motorical/scope-catalog 0.8.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 +54 -1
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
|
@@ -91,7 +91,35 @@ const MOTOR_BLOCK_TOOLS = [
|
|
|
91
91
|
* the comms audience, grant resolution, scope table, workspace binding). Not in ALL_TOOLS and not on the main server: marketing has its
|
|
92
92
|
* own server and its own consent. More tools arrive in M3, each adding the scope it needs to this server's offer.
|
|
93
93
|
*/
|
|
94
|
-
const COMMS_TOOLS = [
|
|
94
|
+
const COMMS_TOOLS = [
|
|
95
|
+
'comms_get_readiness', 'comms_get_map',
|
|
96
|
+
'comms_list_workspaces',
|
|
97
|
+
'comms_list_marketing_blocks',
|
|
98
|
+
'comms_list_lists',
|
|
99
|
+
'comms_get_list',
|
|
100
|
+
'comms_compare_lists',
|
|
101
|
+
'comms_get_list_relations',
|
|
102
|
+
'comms_list_templates',
|
|
103
|
+
'comms_get_template',
|
|
104
|
+
'comms_get_template_rules',
|
|
105
|
+
'comms_lint_template',
|
|
106
|
+
'comms_suggest_template_fixes',
|
|
107
|
+
'comms_check_links',
|
|
108
|
+
'comms_preview_template',
|
|
109
|
+
'comms_list_starters',
|
|
110
|
+
'comms_get_brand_kit',
|
|
111
|
+
'comms_list_campaigns',
|
|
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',
|
|
122
|
+
];
|
|
95
123
|
|
|
96
124
|
const ALL_TOOLS = [
|
|
97
125
|
...new Set([
|
|
@@ -182,6 +210,31 @@ const TOOL_SCOPES = {
|
|
|
182
210
|
motorical_motor_block_delete_status: ['manage:motor-blocks'],
|
|
183
211
|
comms_get_readiness: ['read:comms'],
|
|
184
212
|
comms_get_map: ['read:comms'],
|
|
213
|
+
comms_list_workspaces: ['read:comms'],
|
|
214
|
+
comms_list_marketing_blocks: ['read:comms'],
|
|
215
|
+
comms_list_lists: ['read:comms'],
|
|
216
|
+
comms_get_list: ['read:comms'],
|
|
217
|
+
comms_compare_lists: ['read:comms'],
|
|
218
|
+
comms_get_list_relations: ['read:comms'],
|
|
219
|
+
comms_list_templates: ['read:comms'],
|
|
220
|
+
comms_get_template: ['read:comms'],
|
|
221
|
+
comms_get_template_rules: ['read:comms'],
|
|
222
|
+
comms_lint_template: ['read:comms'],
|
|
223
|
+
comms_suggest_template_fixes: ['read:comms'],
|
|
224
|
+
comms_check_links: ['read:comms'],
|
|
225
|
+
comms_preview_template: ['read:comms'],
|
|
226
|
+
comms_list_starters: ['read:comms'],
|
|
227
|
+
comms_get_brand_kit: ['read:comms'],
|
|
228
|
+
comms_list_campaigns: ['read:comms'],
|
|
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'],
|
|
185
238
|
};
|
|
186
239
|
|
|
187
240
|
/** `|| []`: a tool with no entry (signup's own tool) contributes no scopes rather than throwing. */
|