@motorical/scope-catalog 0.1.0 → 0.2.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 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 seven grantable MCP scopes means, for an agent AND for a customer (`SCOPES`)
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.1.0",
3
+ "version": "0.2.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,6 +39,13 @@ 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',
package/src/tools.js CHANGED
@@ -66,8 +66,27 @@ const WEBHOOK_TOOLS = [
66
66
  'motorical_webhook_get_stats',
67
67
  ];
68
68
 
69
+ const MOTOR_BLOCK_TOOLS = [
70
+ 'motorical_motor_block_list',
71
+ 'motorical_motor_block_create',
72
+ 'motorical_motor_block_rename',
73
+ 'motorical_motor_block_change_type',
74
+ 'motorical_motor_block_assign_domain',
75
+ 'motorical_motor_block_deactivate',
76
+ 'motorical_motor_block_reactivate',
77
+ 'motorical_motor_block_delete',
78
+ 'motorical_motor_block_delete_status',
79
+ ];
80
+
69
81
  const ALL_TOOLS = [
70
- ...new Set([...TRANSACTIONAL_TOOLS, ...ANALYTICS_TOOLS, ...DOMAIN_TOOLS, ...SANDBOX_TOOLS, ...WEBHOOK_TOOLS]),
82
+ ...new Set([
83
+ ...TRANSACTIONAL_TOOLS,
84
+ ...ANALYTICS_TOOLS,
85
+ ...DOMAIN_TOOLS,
86
+ ...SANDBOX_TOOLS,
87
+ ...WEBHOOK_TOOLS,
88
+ ...MOTOR_BLOCK_TOOLS,
89
+ ]),
71
90
  ];
72
91
 
73
92
  const SERVER_TOOLS = {
@@ -77,6 +96,7 @@ const SERVER_TOOLS = {
77
96
  domains: DOMAIN_TOOLS,
78
97
  sandbox: SANDBOX_TOOLS,
79
98
  webhooks: WEBHOOK_TOOLS,
99
+ motorBlocks: MOTOR_BLOCK_TOOLS,
80
100
  signup: ['motorical_signup_handoff'],
81
101
  };
82
102
 
@@ -120,6 +140,15 @@ const TOOL_SCOPES = {
120
140
  motorical_webhook_test: ['manage:webhooks'],
121
141
  motorical_webhook_get_deliveries: ['read:webhooks'],
122
142
  motorical_webhook_get_stats: ['read:webhooks'],
143
+ motorical_motor_block_list: ['manage:motor-blocks'],
144
+ motorical_motor_block_create: ['manage:motor-blocks'],
145
+ motorical_motor_block_rename: ['manage:motor-blocks'],
146
+ motorical_motor_block_change_type: ['manage:motor-blocks'],
147
+ motorical_motor_block_assign_domain: ['manage:motor-blocks'],
148
+ motorical_motor_block_deactivate: ['manage:motor-blocks'],
149
+ motorical_motor_block_reactivate: ['manage:motor-blocks'],
150
+ motorical_motor_block_delete: ['manage:motor-blocks'],
151
+ motorical_motor_block_delete_status: ['manage:motor-blocks'],
123
152
  };
124
153
 
125
154
  /** `|| []`: a tool with no entry (signup's own tool) contributes no scopes rather than throwing. */
@@ -134,6 +163,7 @@ const SERVER_SLUGS = {
134
163
  domains: 'motorical_domains',
135
164
  sandbox: 'motorical_sandbox',
136
165
  webhooks: 'motorical_webhooks',
166
+ motorBlocks: 'motorical_motor_blocks',
137
167
  signup: 'signup',
138
168
  };
139
169