@motorical/scope-catalog 0.9.0 → 0.11.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motorical/scope-catalog",
3
- "version": "0.9.0",
3
+ "version": "0.11.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). One area per scope so the consent screen shows sending on its own line. No Public API scopes:
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-audience',
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: 'Add and change your lists and contacts',
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-content',
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: 'Create and edit email templates and campaign drafts, and send test emails to you',
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,23 @@ 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',
122
+ // M3-3: contacts. Reads are masked (read:comms); writes are dry-run-by-default (write:comms.audience). Nothing deletes, exports, resubscribes or sends.
123
+ 'comms_list_list_contacts',
124
+ 'comms_find_contact',
125
+ 'comms_import_contacts',
126
+ 'comms_remove_from_list',
127
+ 'comms_derive_list',
128
+ 'comms_unsubscribe_contact',
129
+ 'comms_add_suppression',
113
130
  ];
114
131
 
115
132
  const ALL_TOOLS = [
@@ -218,6 +235,21 @@ const TOOL_SCOPES = {
218
235
  comms_get_brand_kit: ['read:comms'],
219
236
  comms_list_campaigns: ['read:comms'],
220
237
  comms_get_campaign: ['read:comms'],
238
+ comms_create_template: ['write:comms.content'],
239
+ comms_create_template_from_starter: ['write:comms.content'],
240
+ comms_update_template: ['write:comms.content'],
241
+ comms_apply_template_fixes: ['write:comms.content'],
242
+ comms_duplicate_template: ['write:comms.content'],
243
+ comms_set_brand_kit: ['write:comms.content'],
244
+ comms_create_list: ['write:comms.audience'],
245
+ comms_update_list: ['write:comms.audience'],
246
+ comms_list_list_contacts: ['read:comms'],
247
+ comms_find_contact: ['read:comms'],
248
+ comms_import_contacts: ['write:comms.audience'],
249
+ comms_remove_from_list: ['write:comms.audience'],
250
+ comms_derive_list: ['write:comms.audience'],
251
+ comms_unsubscribe_contact: ['write:comms.audience'],
252
+ comms_add_suppression: ['write:comms.audience'],
221
253
  };
222
254
 
223
255
  /** `|| []`: a tool with no entry (signup's own tool) contributes no scopes rather than throwing. */