@motorical/scope-catalog 0.1.0 → 0.3.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/README.md +9 -1
- package/package.json +1 -1
- package/src/scopes.js +15 -1
- package/src/tools.js +37 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Canonical MCP/OAuth scope metadata for Motorical. One source of truth for:
|
|
4
4
|
|
|
5
|
-
- what each of the
|
|
5
|
+
- what each of the eight grantable MCP scopes means, for an agent AND for a customer (`SCOPES`)
|
|
6
6
|
- which Public API scopes each MCP scope unlocks (`SCOPES[id].publicScopes`, `publicScopesFor`)
|
|
7
7
|
- "manage implies read", in both the MCP and Public API vocabularies (`implication.js`)
|
|
8
8
|
- which scopes a tool needs, and which scopes a given MCP resource server allows (`tools.js`)
|
|
@@ -11,3 +11,11 @@ Canonical MCP/OAuth scope metadata for Motorical. One source of truth for:
|
|
|
11
11
|
Consumed by `motorical-backend` (OAuth server, Public API auth) and `@motorical/mcp`
|
|
12
12
|
(the hosted/local MCP server). See `motorical-docs/specs/2026-09-23-mcp-p7-scope-legibility-founding-doc.md`
|
|
13
13
|
for why this package exists.
|
|
14
|
+
|
|
15
|
+
## Motor Block management
|
|
16
|
+
|
|
17
|
+
`manage:motor-blocks` maps to the existing Public API `config.read` and
|
|
18
|
+
`config.manage` scopes. Its dedicated resource is
|
|
19
|
+
`https://mcp.motorical.com/v1/motorical_motor_blocks/mcp`, which advertises the
|
|
20
|
+
nine bounded production Motor Block lifecycle tools. Communications Block and
|
|
21
|
+
marketing-block operations are deliberately excluded.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motorical/scope-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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
|
@@ -39,13 +39,27 @@ const SCOPES = {
|
|
|
39
39
|
agentDescription: 'Add, verify, and read sending domains and their DNS health. Includes everything read:domains grants.',
|
|
40
40
|
customerAction: 'Add and verify sending domains',
|
|
41
41
|
},
|
|
42
|
+
'manage:motor-blocks': {
|
|
43
|
+
resource: 'motor-blocks',
|
|
44
|
+
level: 'manage',
|
|
45
|
+
publicScopes: ['config.read', 'config.manage'],
|
|
46
|
+
agentDescription: 'List and manage the ordinary lifecycle of production Motor Blocks: create, rename, change type, assign domain, deactivate, reactivate, and delete. Includes no credential values and cannot change the active auth method.',
|
|
47
|
+
customerAction: 'Manage production Motor Blocks',
|
|
48
|
+
},
|
|
42
49
|
'manage:sandbox': {
|
|
43
50
|
resource: 'sandbox',
|
|
44
51
|
level: 'manage',
|
|
45
52
|
publicScopes: ['sandbox.manage'],
|
|
46
|
-
agentDescription: 'Check, provision, and convert the developer sandbox.
|
|
53
|
+
agentDescription: 'Check, provision, and convert the developer sandbox. Allowlisting by 6-digit code additionally requires a dashboard session, so this scope alone does not make that callable over OAuth; recipients confirm by emailed link under manage:recipients instead.',
|
|
47
54
|
customerAction: 'Manage your developer sandbox',
|
|
48
55
|
},
|
|
56
|
+
'manage:recipients': {
|
|
57
|
+
resource: 'recipients',
|
|
58
|
+
level: 'manage',
|
|
59
|
+
publicScopes: ['recipients.manage'],
|
|
60
|
+
agentDescription: 'Request permission to send test email to an address you name, and see which addresses have confirmed or stopped. The recipient confirms by clicking an emailed link; an agent can never confirm on their behalf.',
|
|
61
|
+
customerAction: 'Ask recipients to allow your test emails, and see who has confirmed',
|
|
62
|
+
},
|
|
49
63
|
'manage:webhooks': {
|
|
50
64
|
resource: 'webhooks',
|
|
51
65
|
level: 'manage',
|
package/src/tools.js
CHANGED
|
@@ -54,6 +54,9 @@ const SANDBOX_TOOLS = [
|
|
|
54
54
|
'motorical_sandbox_convert',
|
|
55
55
|
'motorical_sandbox_allowlist_request',
|
|
56
56
|
'motorical_sandbox_allowlist_confirm',
|
|
57
|
+
'motorical_free_recipient_add',
|
|
58
|
+
'motorical_free_recipient_list',
|
|
59
|
+
'motorical_free_recipient_remove',
|
|
57
60
|
];
|
|
58
61
|
|
|
59
62
|
const WEBHOOK_TOOLS = [
|
|
@@ -66,8 +69,27 @@ const WEBHOOK_TOOLS = [
|
|
|
66
69
|
'motorical_webhook_get_stats',
|
|
67
70
|
];
|
|
68
71
|
|
|
72
|
+
const MOTOR_BLOCK_TOOLS = [
|
|
73
|
+
'motorical_motor_block_list',
|
|
74
|
+
'motorical_motor_block_create',
|
|
75
|
+
'motorical_motor_block_rename',
|
|
76
|
+
'motorical_motor_block_change_type',
|
|
77
|
+
'motorical_motor_block_assign_domain',
|
|
78
|
+
'motorical_motor_block_deactivate',
|
|
79
|
+
'motorical_motor_block_reactivate',
|
|
80
|
+
'motorical_motor_block_delete',
|
|
81
|
+
'motorical_motor_block_delete_status',
|
|
82
|
+
];
|
|
83
|
+
|
|
69
84
|
const ALL_TOOLS = [
|
|
70
|
-
...new Set([
|
|
85
|
+
...new Set([
|
|
86
|
+
...TRANSACTIONAL_TOOLS,
|
|
87
|
+
...ANALYTICS_TOOLS,
|
|
88
|
+
...DOMAIN_TOOLS,
|
|
89
|
+
...SANDBOX_TOOLS,
|
|
90
|
+
...WEBHOOK_TOOLS,
|
|
91
|
+
...MOTOR_BLOCK_TOOLS,
|
|
92
|
+
]),
|
|
71
93
|
];
|
|
72
94
|
|
|
73
95
|
const SERVER_TOOLS = {
|
|
@@ -77,6 +99,7 @@ const SERVER_TOOLS = {
|
|
|
77
99
|
domains: DOMAIN_TOOLS,
|
|
78
100
|
sandbox: SANDBOX_TOOLS,
|
|
79
101
|
webhooks: WEBHOOK_TOOLS,
|
|
102
|
+
motorBlocks: MOTOR_BLOCK_TOOLS,
|
|
80
103
|
signup: ['motorical_signup_handoff'],
|
|
81
104
|
};
|
|
82
105
|
|
|
@@ -113,6 +136,9 @@ const TOOL_SCOPES = {
|
|
|
113
136
|
motorical_sandbox_convert: ['manage:sandbox'],
|
|
114
137
|
motorical_sandbox_allowlist_request: ['manage:sandbox'],
|
|
115
138
|
motorical_sandbox_allowlist_confirm: ['manage:sandbox'],
|
|
139
|
+
motorical_free_recipient_add: ['manage:recipients'],
|
|
140
|
+
motorical_free_recipient_list: ['manage:recipients'],
|
|
141
|
+
motorical_free_recipient_remove: ['manage:recipients'],
|
|
116
142
|
motorical_webhook_list: ['read:webhooks'],
|
|
117
143
|
motorical_webhook_create: ['manage:webhooks'],
|
|
118
144
|
motorical_webhook_update: ['manage:webhooks'],
|
|
@@ -120,6 +146,15 @@ const TOOL_SCOPES = {
|
|
|
120
146
|
motorical_webhook_test: ['manage:webhooks'],
|
|
121
147
|
motorical_webhook_get_deliveries: ['read:webhooks'],
|
|
122
148
|
motorical_webhook_get_stats: ['read:webhooks'],
|
|
149
|
+
motorical_motor_block_list: ['manage:motor-blocks'],
|
|
150
|
+
motorical_motor_block_create: ['manage:motor-blocks'],
|
|
151
|
+
motorical_motor_block_rename: ['manage:motor-blocks'],
|
|
152
|
+
motorical_motor_block_change_type: ['manage:motor-blocks'],
|
|
153
|
+
motorical_motor_block_assign_domain: ['manage:motor-blocks'],
|
|
154
|
+
motorical_motor_block_deactivate: ['manage:motor-blocks'],
|
|
155
|
+
motorical_motor_block_reactivate: ['manage:motor-blocks'],
|
|
156
|
+
motorical_motor_block_delete: ['manage:motor-blocks'],
|
|
157
|
+
motorical_motor_block_delete_status: ['manage:motor-blocks'],
|
|
123
158
|
};
|
|
124
159
|
|
|
125
160
|
/** `|| []`: a tool with no entry (signup's own tool) contributes no scopes rather than throwing. */
|
|
@@ -134,6 +169,7 @@ const SERVER_SLUGS = {
|
|
|
134
169
|
domains: 'motorical_domains',
|
|
135
170
|
sandbox: 'motorical_sandbox',
|
|
136
171
|
webhooks: 'motorical_webhooks',
|
|
172
|
+
motorBlocks: 'motorical_motor_blocks',
|
|
137
173
|
signup: 'signup',
|
|
138
174
|
};
|
|
139
175
|
|