@lightdash-tools/common 0.12.0 → 0.13.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/dist/agent-safe.d.ts +4 -0
- package/dist/agent-safe.js +13 -0
- package/dist/audit.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/profile-ids.d.ts +5 -0
- package/dist/profile-ids.js +15 -0
- package/package.json +1 -3
- package/src/agent-safe.ts +11 -0
- package/src/audit.ts +1 -1
- package/src/index.ts +5 -2
- package/src/profile-ids.ts +15 -0
- package/dist/operations/agent-safe.d.ts +0 -5
- package/dist/operations/agent-safe.js +0 -9
- package/dist/operations/ai-agents.d.ts +0 -6
- package/dist/operations/ai-agents.js +0 -495
- package/dist/operations/cli-content.d.ts +0 -5
- package/dist/operations/cli-content.js +0 -69
- package/dist/operations/client-coverage.d.ts +0 -120
- package/dist/operations/client-coverage.js +0 -139
- package/dist/operations/client-coverage.test.d.ts +0 -1
- package/dist/operations/client-coverage.test.js +0 -22
- package/dist/operations/content-developer.d.ts +0 -2
- package/dist/operations/content-developer.js +0 -471
- package/dist/operations/content-governance.d.ts +0 -7
- package/dist/operations/content-governance.js +0 -98
- package/dist/operations/content-reader.d.ts +0 -2
- package/dist/operations/content-reader.js +0 -198
- package/dist/operations/data-analyst.d.ts +0 -5
- package/dist/operations/data-analyst.js +0 -23
- package/dist/operations/index.d.ts +0 -13
- package/dist/operations/index.js +0 -37
- package/dist/operations/organization-audit.d.ts +0 -2
- package/dist/operations/organization-audit.js +0 -273
- package/dist/operations/parity.test.d.ts +0 -1
- package/dist/operations/parity.test.js +0 -29
- package/dist/operations/registry.d.ts +0 -18
- package/dist/operations/registry.js +0 -136
- package/dist/operations/registry.test.d.ts +0 -1
- package/dist/operations/registry.test.js +0 -201
- package/dist/operations/semantic-layer.d.ts +0 -6
- package/dist/operations/semantic-layer.js +0 -155
- package/dist/operations/types.d.ts +0 -90
- package/dist/operations/types.js +0 -113
- package/dist/operations/types.test.d.ts +0 -1
- package/dist/operations/types.test.js +0 -101
- package/dist/operations/users.d.ts +0 -6
- package/dist/operations/users.js +0 -56
- package/src/operations/agent-safe.ts +0 -8
- package/src/operations/ai-agents.ts +0 -539
- package/src/operations/cli-content.ts +0 -76
- package/src/operations/client-coverage.test.ts +0 -23
- package/src/operations/client-coverage.ts +0 -156
- package/src/operations/content-developer.ts +0 -501
- package/src/operations/content-governance.ts +0 -110
- package/src/operations/content-reader.ts +0 -213
- package/src/operations/data-analyst.ts +0 -27
- package/src/operations/index.ts +0 -44
- package/src/operations/organization-audit.ts +0 -293
- package/src/operations/parity.test.ts +0 -33
- package/src/operations/registry.test.ts +0 -229
- package/src/operations/registry.ts +0 -158
- package/src/operations/semantic-layer.ts +0 -167
- package/src/operations/types.test.ts +0 -138
- package/src/operations/types.ts +0 -241
- package/src/operations/users.ts +0 -62
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTENT_READER_OPERATIONS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Content-reader operations in the shared operation catalog (ADR-0013).
|
|
6
|
-
*/
|
|
7
|
-
const safety_1 = require("../safety");
|
|
8
|
-
const types_1 = require("./types");
|
|
9
|
-
const PROFILE_CONTENT_READER = 'content-reader';
|
|
10
|
-
const PROFILE_CONTENT_DEVELOPER = 'content-developer';
|
|
11
|
-
const PROFILE_DATA_ANALYST = 'data-analyst';
|
|
12
|
-
const op_search_content = (0, types_1.defineOperation)({
|
|
13
|
-
id: 'content-reader.content.search',
|
|
14
|
-
summary: 'Search charts dashboards and spaces in a project',
|
|
15
|
-
http: { method: 'GET', path: '/api/v2/content' },
|
|
16
|
-
authorization: { safetyImpact: 'read' },
|
|
17
|
-
sensitivity: 'none',
|
|
18
|
-
mcp: {
|
|
19
|
-
toolName: 'search_content',
|
|
20
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
21
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
22
|
-
},
|
|
23
|
-
cli: { commandPath: 'content search' },
|
|
24
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_CONTENT_DEVELOPER],
|
|
25
|
-
});
|
|
26
|
-
const op_list_spaces = (0, types_1.defineOperation)({
|
|
27
|
-
id: 'content-reader.spaces.list',
|
|
28
|
-
summary: 'List project spaces',
|
|
29
|
-
http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/spaces' },
|
|
30
|
-
authorization: { safetyImpact: 'read' },
|
|
31
|
-
sensitivity: 'none',
|
|
32
|
-
mcp: {
|
|
33
|
-
toolName: 'list_spaces',
|
|
34
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
35
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
36
|
-
},
|
|
37
|
-
cli: { commandPath: 'projects spaces list' },
|
|
38
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_CONTENT_DEVELOPER],
|
|
39
|
-
});
|
|
40
|
-
const op_get_space = (0, types_1.defineOperation)({
|
|
41
|
-
id: 'content-reader.spaces.get',
|
|
42
|
-
summary: 'Get a space with breadcrumbs and content summaries',
|
|
43
|
-
http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/spaces/{spaceUuid}' },
|
|
44
|
-
authorization: { safetyImpact: 'read' },
|
|
45
|
-
sensitivity: 'none',
|
|
46
|
-
mcp: {
|
|
47
|
-
toolName: 'get_space',
|
|
48
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
49
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
50
|
-
},
|
|
51
|
-
cli: { commandPath: 'projects spaces get' },
|
|
52
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_CONTENT_DEVELOPER],
|
|
53
|
-
});
|
|
54
|
-
const op_get_dashboard = (0, types_1.defineOperation)({
|
|
55
|
-
id: 'content-reader.dashboards.get',
|
|
56
|
-
summary: 'Get dashboard structure before tile execution',
|
|
57
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}' },
|
|
58
|
-
authorization: { safetyImpact: 'read' },
|
|
59
|
-
sensitivity: 'none',
|
|
60
|
-
mcp: {
|
|
61
|
-
toolName: 'get_dashboard',
|
|
62
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
63
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
64
|
-
},
|
|
65
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_CONTENT_DEVELOPER],
|
|
66
|
-
});
|
|
67
|
-
const op_get_chart = (0, types_1.defineOperation)({
|
|
68
|
-
id: 'content-reader.charts.get',
|
|
69
|
-
summary: 'Get a saved chart definition',
|
|
70
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/saved/{chartUuidOrSlug}' },
|
|
71
|
-
authorization: { safetyImpact: 'read' },
|
|
72
|
-
sensitivity: 'none',
|
|
73
|
-
mcp: {
|
|
74
|
-
toolName: 'get_chart',
|
|
75
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
76
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
77
|
-
},
|
|
78
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_CONTENT_DEVELOPER],
|
|
79
|
-
});
|
|
80
|
-
const op_list_project_parameters = (0, types_1.defineOperation)({
|
|
81
|
-
id: 'content-reader.parameters.list',
|
|
82
|
-
summary: 'List project parameter definitions',
|
|
83
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/parameters/list' },
|
|
84
|
-
authorization: { safetyImpact: 'read' },
|
|
85
|
-
sensitivity: 'none',
|
|
86
|
-
mcp: {
|
|
87
|
-
toolName: 'list_project_parameters',
|
|
88
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
89
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
90
|
-
},
|
|
91
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
92
|
-
});
|
|
93
|
-
const op_get_project_parameters = (0, types_1.defineOperation)({
|
|
94
|
-
id: 'content-reader.parameters.get',
|
|
95
|
-
summary: 'Get project parameters by name',
|
|
96
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/parameters' },
|
|
97
|
-
authorization: { safetyImpact: 'read' },
|
|
98
|
-
sensitivity: 'none',
|
|
99
|
-
mcp: {
|
|
100
|
-
toolName: 'get_project_parameters',
|
|
101
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
102
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
103
|
-
},
|
|
104
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
105
|
-
});
|
|
106
|
-
const op_explain_content = (0, types_1.defineOperation)({
|
|
107
|
-
id: 'content-reader.content.explain',
|
|
108
|
-
summary: 'Explain saved content from metadata',
|
|
109
|
-
http: { method: 'GET', path: '/api/v2/content' },
|
|
110
|
-
authorization: { safetyImpact: 'read' },
|
|
111
|
-
sensitivity: 'none',
|
|
112
|
-
mcp: {
|
|
113
|
-
toolName: 'explain_content',
|
|
114
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
115
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
116
|
-
},
|
|
117
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
118
|
-
});
|
|
119
|
-
const op_run_chart = (0, types_1.defineOperation)({
|
|
120
|
-
id: 'content-reader.charts.run',
|
|
121
|
-
summary: 'Execute a saved semantic chart with bounded results',
|
|
122
|
-
http: { method: 'POST', path: '/api/v2/projects/{projectUuid}/query/chart' },
|
|
123
|
-
authorization: { safetyImpact: 'read' },
|
|
124
|
-
sensitivity: 'none',
|
|
125
|
-
mcp: {
|
|
126
|
-
toolName: 'run_chart',
|
|
127
|
-
annotations: safety_1.READ_ONLY_TRANSIENT,
|
|
128
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
129
|
-
},
|
|
130
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
131
|
-
});
|
|
132
|
-
const op_export_chart_image = (0, types_1.defineOperation)({
|
|
133
|
-
id: 'content-reader.charts.export-image',
|
|
134
|
-
summary: 'Export a saved chart as a PNG image snapshot',
|
|
135
|
-
http: { method: 'POST', path: '/api/v1/saved/{chartUuid}/export' },
|
|
136
|
-
authorization: { safetyImpact: 'read' },
|
|
137
|
-
sensitivity: 'none',
|
|
138
|
-
mcp: {
|
|
139
|
-
toolName: 'export_chart_image',
|
|
140
|
-
annotations: safety_1.READ_ONLY_TRANSIENT,
|
|
141
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
142
|
-
},
|
|
143
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
144
|
-
});
|
|
145
|
-
const op_run_dashboard_tile = (0, types_1.defineOperation)({
|
|
146
|
-
id: 'content-reader.dashboards.run-tile',
|
|
147
|
-
summary: 'Execute a dashboard tile with bounded results',
|
|
148
|
-
http: { method: 'POST', path: '/api/v2/projects/{projectUuid}/query/dashboard-chart' },
|
|
149
|
-
authorization: { safetyImpact: 'read' },
|
|
150
|
-
sensitivity: 'none',
|
|
151
|
-
mcp: {
|
|
152
|
-
toolName: 'run_dashboard_tile',
|
|
153
|
-
annotations: safety_1.READ_ONLY_TRANSIENT,
|
|
154
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
155
|
-
},
|
|
156
|
-
profiles: [PROFILE_CONTENT_READER],
|
|
157
|
-
});
|
|
158
|
-
const op_get_query_result = (0, types_1.defineOperation)({
|
|
159
|
-
id: 'content-reader.query.result.get',
|
|
160
|
-
summary: 'Get or poll a query result by queryUuid',
|
|
161
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/query/{queryUuid}' },
|
|
162
|
-
authorization: { safetyImpact: 'read' },
|
|
163
|
-
sensitivity: 'none',
|
|
164
|
-
mcp: {
|
|
165
|
-
toolName: 'get_query_result',
|
|
166
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
167
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
168
|
-
},
|
|
169
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_DATA_ANALYST],
|
|
170
|
-
});
|
|
171
|
-
const op_cancel_query = (0, types_1.defineOperation)({
|
|
172
|
-
id: 'content-reader.query.cancel',
|
|
173
|
-
summary: 'Cancel a running query by queryUuid',
|
|
174
|
-
http: { method: 'POST', path: '/api/v2/projects/{projectUuid}/query/{queryUuid}/cancel' },
|
|
175
|
-
authorization: { safetyImpact: 'read' },
|
|
176
|
-
sensitivity: 'none',
|
|
177
|
-
mcp: {
|
|
178
|
-
toolName: 'cancel_query',
|
|
179
|
-
annotations: safety_1.READ_ONLY_TRANSIENT,
|
|
180
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
181
|
-
},
|
|
182
|
-
profiles: [PROFILE_CONTENT_READER, PROFILE_DATA_ANALYST],
|
|
183
|
-
});
|
|
184
|
-
exports.CONTENT_READER_OPERATIONS = [
|
|
185
|
-
op_search_content,
|
|
186
|
-
op_list_spaces,
|
|
187
|
-
op_get_space,
|
|
188
|
-
op_get_dashboard,
|
|
189
|
-
op_get_chart,
|
|
190
|
-
op_list_project_parameters,
|
|
191
|
-
op_get_project_parameters,
|
|
192
|
-
op_explain_content,
|
|
193
|
-
op_run_chart,
|
|
194
|
-
op_export_chart_image,
|
|
195
|
-
op_run_dashboard_tile,
|
|
196
|
-
op_get_query_result,
|
|
197
|
-
op_cancel_query,
|
|
198
|
-
];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Data-analyst operations in the shared operation catalog (ADR-0020).
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DATA_ANALYST_OPERATIONS = void 0;
|
|
7
|
-
const safety_1 = require("../safety");
|
|
8
|
-
const types_1 = require("./types");
|
|
9
|
-
const PROFILE_DATA_ANALYST = 'data-analyst';
|
|
10
|
-
const op_run_metric_query = (0, types_1.defineOperation)({
|
|
11
|
-
id: 'data-analyst.query.metric-query.run',
|
|
12
|
-
summary: 'Execute an ad-hoc explore metric query with bounded async results',
|
|
13
|
-
http: { method: 'POST', path: '/api/v2/projects/{projectUuid}/query/metric-query' },
|
|
14
|
-
authorization: { safetyImpact: 'read' },
|
|
15
|
-
sensitivity: 'none',
|
|
16
|
-
mcp: {
|
|
17
|
-
toolName: 'run_metric_query',
|
|
18
|
-
annotations: safety_1.READ_ONLY_TRANSIENT,
|
|
19
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
20
|
-
},
|
|
21
|
-
profiles: [PROFILE_DATA_ANALYST],
|
|
22
|
-
});
|
|
23
|
-
exports.DATA_ANALYST_OPERATIONS = [op_run_metric_query];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { defineOperation, PROFILE_IDS, type AgentExposure, type ProfileId, type HttpMethod, type McpTaskSupport, type OperationAuthorization, type OperationCli, type OperationDefinitionInput, type OperationDescriptor, type OperationHttp, type OperationMcp, type SensitivityClass, } from './types';
|
|
2
|
-
export { IRRECOVERABLE_TOOL_DENYLIST } from './agent-safe';
|
|
3
|
-
export { AI_AGENT_OPERATIONS } from './ai-agents';
|
|
4
|
-
export { CLI_CONTENT_OPERATIONS } from './cli-content';
|
|
5
|
-
export { CONTENT_DEVELOPER_OPERATIONS } from './content-developer';
|
|
6
|
-
export { CONTENT_GOVERNANCE_OPERATIONS } from './content-governance';
|
|
7
|
-
export { CONTENT_READER_OPERATIONS } from './content-reader';
|
|
8
|
-
export { DATA_ANALYST_OPERATIONS } from './data-analyst';
|
|
9
|
-
export { ORGANIZATION_AUDIT_OPERATIONS } from './organization-audit';
|
|
10
|
-
export { SEMANTIC_LAYER_OPERATIONS } from './semantic-layer';
|
|
11
|
-
export { USER_OPERATIONS } from './users';
|
|
12
|
-
export { getOperation, getOperationByMcpToolName, getOperationsByProfile, listBannedMcpToolNames, listExposedMcpToolNames, listMcpToolNamesByProfile, listOperations, } from './registry';
|
|
13
|
-
export { OPERATION_CLIENT_METHOD_MAP, getClientMethodForOperation, type CataloguedOperationId, type ClientMethodRef, } from './client-coverage';
|
package/dist/operations/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getClientMethodForOperation = exports.OPERATION_CLIENT_METHOD_MAP = exports.listOperations = exports.listMcpToolNamesByProfile = exports.listExposedMcpToolNames = exports.listBannedMcpToolNames = exports.getOperationsByProfile = exports.getOperationByMcpToolName = exports.getOperation = exports.USER_OPERATIONS = exports.SEMANTIC_LAYER_OPERATIONS = exports.ORGANIZATION_AUDIT_OPERATIONS = exports.DATA_ANALYST_OPERATIONS = exports.CONTENT_READER_OPERATIONS = exports.CONTENT_GOVERNANCE_OPERATIONS = exports.CONTENT_DEVELOPER_OPERATIONS = exports.CLI_CONTENT_OPERATIONS = exports.AI_AGENT_OPERATIONS = exports.IRRECOVERABLE_TOOL_DENYLIST = exports.PROFILE_IDS = exports.defineOperation = void 0;
|
|
4
|
-
var types_1 = require("./types");
|
|
5
|
-
Object.defineProperty(exports, "defineOperation", { enumerable: true, get: function () { return types_1.defineOperation; } });
|
|
6
|
-
Object.defineProperty(exports, "PROFILE_IDS", { enumerable: true, get: function () { return types_1.PROFILE_IDS; } });
|
|
7
|
-
var agent_safe_1 = require("./agent-safe");
|
|
8
|
-
Object.defineProperty(exports, "IRRECOVERABLE_TOOL_DENYLIST", { enumerable: true, get: function () { return agent_safe_1.IRRECOVERABLE_TOOL_DENYLIST; } });
|
|
9
|
-
var ai_agents_1 = require("./ai-agents");
|
|
10
|
-
Object.defineProperty(exports, "AI_AGENT_OPERATIONS", { enumerable: true, get: function () { return ai_agents_1.AI_AGENT_OPERATIONS; } });
|
|
11
|
-
var cli_content_1 = require("./cli-content");
|
|
12
|
-
Object.defineProperty(exports, "CLI_CONTENT_OPERATIONS", { enumerable: true, get: function () { return cli_content_1.CLI_CONTENT_OPERATIONS; } });
|
|
13
|
-
var content_developer_1 = require("./content-developer");
|
|
14
|
-
Object.defineProperty(exports, "CONTENT_DEVELOPER_OPERATIONS", { enumerable: true, get: function () { return content_developer_1.CONTENT_DEVELOPER_OPERATIONS; } });
|
|
15
|
-
var content_governance_1 = require("./content-governance");
|
|
16
|
-
Object.defineProperty(exports, "CONTENT_GOVERNANCE_OPERATIONS", { enumerable: true, get: function () { return content_governance_1.CONTENT_GOVERNANCE_OPERATIONS; } });
|
|
17
|
-
var content_reader_1 = require("./content-reader");
|
|
18
|
-
Object.defineProperty(exports, "CONTENT_READER_OPERATIONS", { enumerable: true, get: function () { return content_reader_1.CONTENT_READER_OPERATIONS; } });
|
|
19
|
-
var data_analyst_1 = require("./data-analyst");
|
|
20
|
-
Object.defineProperty(exports, "DATA_ANALYST_OPERATIONS", { enumerable: true, get: function () { return data_analyst_1.DATA_ANALYST_OPERATIONS; } });
|
|
21
|
-
var organization_audit_1 = require("./organization-audit");
|
|
22
|
-
Object.defineProperty(exports, "ORGANIZATION_AUDIT_OPERATIONS", { enumerable: true, get: function () { return organization_audit_1.ORGANIZATION_AUDIT_OPERATIONS; } });
|
|
23
|
-
var semantic_layer_1 = require("./semantic-layer");
|
|
24
|
-
Object.defineProperty(exports, "SEMANTIC_LAYER_OPERATIONS", { enumerable: true, get: function () { return semantic_layer_1.SEMANTIC_LAYER_OPERATIONS; } });
|
|
25
|
-
var users_1 = require("./users");
|
|
26
|
-
Object.defineProperty(exports, "USER_OPERATIONS", { enumerable: true, get: function () { return users_1.USER_OPERATIONS; } });
|
|
27
|
-
var registry_1 = require("./registry");
|
|
28
|
-
Object.defineProperty(exports, "getOperation", { enumerable: true, get: function () { return registry_1.getOperation; } });
|
|
29
|
-
Object.defineProperty(exports, "getOperationByMcpToolName", { enumerable: true, get: function () { return registry_1.getOperationByMcpToolName; } });
|
|
30
|
-
Object.defineProperty(exports, "getOperationsByProfile", { enumerable: true, get: function () { return registry_1.getOperationsByProfile; } });
|
|
31
|
-
Object.defineProperty(exports, "listBannedMcpToolNames", { enumerable: true, get: function () { return registry_1.listBannedMcpToolNames; } });
|
|
32
|
-
Object.defineProperty(exports, "listExposedMcpToolNames", { enumerable: true, get: function () { return registry_1.listExposedMcpToolNames; } });
|
|
33
|
-
Object.defineProperty(exports, "listMcpToolNamesByProfile", { enumerable: true, get: function () { return registry_1.listMcpToolNamesByProfile; } });
|
|
34
|
-
Object.defineProperty(exports, "listOperations", { enumerable: true, get: function () { return registry_1.listOperations; } });
|
|
35
|
-
var client_coverage_1 = require("./client-coverage");
|
|
36
|
-
Object.defineProperty(exports, "OPERATION_CLIENT_METHOD_MAP", { enumerable: true, get: function () { return client_coverage_1.OPERATION_CLIENT_METHOD_MAP; } });
|
|
37
|
-
Object.defineProperty(exports, "getClientMethodForOperation", { enumerable: true, get: function () { return client_coverage_1.getClientMethodForOperation; } });
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ORGANIZATION_AUDIT_OPERATIONS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Organization-audit operations in the shared operation catalog (ADR-0013).
|
|
6
|
-
*/
|
|
7
|
-
const safety_1 = require("../safety");
|
|
8
|
-
const types_1 = require("./types");
|
|
9
|
-
const PROFILE_ORG_AUDIT = 'organization-audit';
|
|
10
|
-
const op_get_org_profile = (0, types_1.defineOperation)({
|
|
11
|
-
id: 'org-audit.org.profile.get',
|
|
12
|
-
summary: 'Get organization profile for the authenticated user',
|
|
13
|
-
http: { method: 'GET', path: '/api/v1/org' },
|
|
14
|
-
authorization: { safetyImpact: 'read' },
|
|
15
|
-
sensitivity: 'none',
|
|
16
|
-
mcp: {
|
|
17
|
-
toolName: 'get_org_profile',
|
|
18
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
19
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
20
|
-
},
|
|
21
|
-
cli: { commandPath: 'organization get' },
|
|
22
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
23
|
-
});
|
|
24
|
-
const op_list_org_members = (0, types_1.defineOperation)({
|
|
25
|
-
id: 'org-audit.members.list',
|
|
26
|
-
summary: 'List organization members',
|
|
27
|
-
http: { method: 'GET', path: '/api/v1/org/users' },
|
|
28
|
-
authorization: { safetyImpact: 'read' },
|
|
29
|
-
sensitivity: 'pii.email',
|
|
30
|
-
mcp: {
|
|
31
|
-
toolName: 'list_org_members',
|
|
32
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
33
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
34
|
-
},
|
|
35
|
-
cli: { commandPath: 'users list' },
|
|
36
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
37
|
-
});
|
|
38
|
-
const op_get_org_member = (0, types_1.defineOperation)({
|
|
39
|
-
id: 'org-audit.members.get',
|
|
40
|
-
summary: 'Get an organization member by UUID',
|
|
41
|
-
http: { method: 'GET', path: '/api/v1/org/users/{userUuid}' },
|
|
42
|
-
authorization: { safetyImpact: 'read' },
|
|
43
|
-
sensitivity: 'pii.email',
|
|
44
|
-
mcp: {
|
|
45
|
-
toolName: 'get_org_member',
|
|
46
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
47
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
48
|
-
},
|
|
49
|
-
cli: { commandPath: 'users get' },
|
|
50
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
51
|
-
});
|
|
52
|
-
const op_list_org_groups = (0, types_1.defineOperation)({
|
|
53
|
-
id: 'org-audit.groups.list',
|
|
54
|
-
summary: 'List organization groups',
|
|
55
|
-
http: { method: 'GET', path: '/api/v1/org/groups' },
|
|
56
|
-
authorization: { safetyImpact: 'read' },
|
|
57
|
-
sensitivity: 'pii.email',
|
|
58
|
-
mcp: {
|
|
59
|
-
toolName: 'list_org_groups',
|
|
60
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
61
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
62
|
-
},
|
|
63
|
-
cli: { commandPath: 'groups list' },
|
|
64
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
65
|
-
});
|
|
66
|
-
const op_list_org_projects = (0, types_1.defineOperation)({
|
|
67
|
-
id: 'org-audit.projects.list',
|
|
68
|
-
summary: 'List organization projects without connection secrets',
|
|
69
|
-
http: { method: 'GET', path: '/api/v1/org/projects' },
|
|
70
|
-
authorization: { safetyImpact: 'read' },
|
|
71
|
-
sensitivity: 'secret.connection',
|
|
72
|
-
mcp: {
|
|
73
|
-
toolName: 'list_org_projects',
|
|
74
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
75
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
76
|
-
},
|
|
77
|
-
cli: { commandPath: 'projects list' },
|
|
78
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
79
|
-
});
|
|
80
|
-
const op_list_org_role_assignments = (0, types_1.defineOperation)({
|
|
81
|
-
id: 'org-audit.roles.assignments.list',
|
|
82
|
-
summary: 'List organization role assignments',
|
|
83
|
-
http: { method: 'GET', path: '/api/v2/orgs/{orgUuid}/roles/assignments' },
|
|
84
|
-
authorization: { safetyImpact: 'read' },
|
|
85
|
-
sensitivity: 'none',
|
|
86
|
-
mcp: {
|
|
87
|
-
toolName: 'list_org_role_assignments',
|
|
88
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
89
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
90
|
-
},
|
|
91
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
92
|
-
});
|
|
93
|
-
const op_list_custom_roles = (0, types_1.defineOperation)({
|
|
94
|
-
id: 'org-audit.roles.list',
|
|
95
|
-
summary: 'List organization custom and system roles',
|
|
96
|
-
http: { method: 'GET', path: '/api/v2/orgs/{orgUuid}/roles' },
|
|
97
|
-
authorization: { safetyImpact: 'read' },
|
|
98
|
-
sensitivity: 'none',
|
|
99
|
-
mcp: {
|
|
100
|
-
toolName: 'list_custom_roles',
|
|
101
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
102
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
103
|
-
},
|
|
104
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
105
|
-
});
|
|
106
|
-
const op_get_custom_role = (0, types_1.defineOperation)({
|
|
107
|
-
id: 'org-audit.roles.get',
|
|
108
|
-
summary: 'Get a role including scopes',
|
|
109
|
-
http: { method: 'GET', path: '/api/v2/orgs/{orgUuid}/roles/{roleUuid}' },
|
|
110
|
-
authorization: { safetyImpact: 'read' },
|
|
111
|
-
sensitivity: 'none',
|
|
112
|
-
mcp: {
|
|
113
|
-
toolName: 'get_custom_role',
|
|
114
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
115
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
116
|
-
},
|
|
117
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
118
|
-
});
|
|
119
|
-
const op_list_project_roles = (0, types_1.defineOperation)({
|
|
120
|
-
id: 'org-audit.project.roles.list',
|
|
121
|
-
summary: 'List project role assignments',
|
|
122
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectId}/roles/assignments' },
|
|
123
|
-
authorization: { safetyImpact: 'read' },
|
|
124
|
-
sensitivity: 'none',
|
|
125
|
-
mcp: {
|
|
126
|
-
toolName: 'list_project_roles',
|
|
127
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
128
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
129
|
-
},
|
|
130
|
-
cli: { commandPath: 'projects roles list' },
|
|
131
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
132
|
-
});
|
|
133
|
-
const op_list_project_direct_access = (0, types_1.defineOperation)({
|
|
134
|
-
id: 'org-audit.project.access.list',
|
|
135
|
-
summary: 'List direct project user access grants',
|
|
136
|
-
http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/access' },
|
|
137
|
-
authorization: { safetyImpact: 'read' },
|
|
138
|
-
sensitivity: 'pii.email',
|
|
139
|
-
mcp: {
|
|
140
|
-
toolName: 'list_project_direct_access',
|
|
141
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
142
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
143
|
-
},
|
|
144
|
-
cli: { commandPath: 'projects access list' },
|
|
145
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
146
|
-
});
|
|
147
|
-
const op_list_space_access = (0, types_1.defineOperation)({
|
|
148
|
-
id: 'org-audit.space.access.list',
|
|
149
|
-
summary: 'Compose space ACL from space list/get',
|
|
150
|
-
http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/spaces' },
|
|
151
|
-
authorization: { safetyImpact: 'read' },
|
|
152
|
-
sensitivity: 'none',
|
|
153
|
-
mcp: {
|
|
154
|
-
toolName: 'list_space_access',
|
|
155
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
156
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
157
|
-
},
|
|
158
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
159
|
-
});
|
|
160
|
-
const op_resolve_effective_access = (0, types_1.defineOperation)({
|
|
161
|
-
id: 'org-audit.access.resolve',
|
|
162
|
-
summary: 'Best-effort effective access composition',
|
|
163
|
-
http: { method: 'GET', path: '/api/v2/orgs/{orgUuid}/roles/assignments' },
|
|
164
|
-
authorization: { safetyImpact: 'read' },
|
|
165
|
-
sensitivity: 'none',
|
|
166
|
-
mcp: {
|
|
167
|
-
toolName: 'resolve_effective_access',
|
|
168
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
169
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
170
|
-
},
|
|
171
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
172
|
-
});
|
|
173
|
-
const op_list_content = (0, types_1.defineOperation)({
|
|
174
|
-
id: 'org-audit.content.list',
|
|
175
|
-
summary: 'List charts dashboards and spaces',
|
|
176
|
-
http: { method: 'GET', path: '/api/v2/content' },
|
|
177
|
-
authorization: { safetyImpact: 'read' },
|
|
178
|
-
sensitivity: 'none',
|
|
179
|
-
mcp: {
|
|
180
|
-
toolName: 'list_content',
|
|
181
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
182
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
183
|
-
},
|
|
184
|
-
cli: { commandPath: 'content search' },
|
|
185
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
186
|
-
});
|
|
187
|
-
const op_get_dashboard_meta = (0, types_1.defineOperation)({
|
|
188
|
-
id: 'org-audit.dashboards.meta.get',
|
|
189
|
-
summary: 'Get dashboard metadata without executing queries',
|
|
190
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}' },
|
|
191
|
-
authorization: { safetyImpact: 'read' },
|
|
192
|
-
sensitivity: 'none',
|
|
193
|
-
mcp: {
|
|
194
|
-
toolName: 'get_dashboard_meta',
|
|
195
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
196
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
197
|
-
},
|
|
198
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
199
|
-
});
|
|
200
|
-
const op_list_validation_results = (0, types_1.defineOperation)({
|
|
201
|
-
id: 'org-audit.validation.list',
|
|
202
|
-
summary: 'List project validation failures',
|
|
203
|
-
http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/validate' },
|
|
204
|
-
authorization: { safetyImpact: 'read' },
|
|
205
|
-
sensitivity: 'none',
|
|
206
|
-
mcp: {
|
|
207
|
-
toolName: 'list_validation_results',
|
|
208
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
209
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
210
|
-
},
|
|
211
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
212
|
-
});
|
|
213
|
-
const op_get_project_user_activity = (0, types_1.defineOperation)({
|
|
214
|
-
id: 'org-audit.analytics.user-activity.get',
|
|
215
|
-
summary: 'Get project user activity analytics',
|
|
216
|
-
http: { method: 'GET', path: '/api/v1/analytics/user-activity/{projectUuid}' },
|
|
217
|
-
authorization: { safetyImpact: 'read' },
|
|
218
|
-
sensitivity: 'none',
|
|
219
|
-
mcp: {
|
|
220
|
-
toolName: 'get_project_user_activity',
|
|
221
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
222
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
223
|
-
},
|
|
224
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
225
|
-
});
|
|
226
|
-
const op_list_project_schedulers = (0, types_1.defineOperation)({
|
|
227
|
-
id: 'org-audit.schedulers.list',
|
|
228
|
-
summary: 'List project schedulers with destinations redacted by default',
|
|
229
|
-
http: { method: 'GET', path: '/api/v1/schedulers/{projectUuid}/list' },
|
|
230
|
-
authorization: { safetyImpact: 'read' },
|
|
231
|
-
sensitivity: 'secret.destination',
|
|
232
|
-
mcp: {
|
|
233
|
-
toolName: 'list_project_schedulers',
|
|
234
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
235
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
236
|
-
},
|
|
237
|
-
cli: { commandPath: 'schedulers list' },
|
|
238
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
239
|
-
});
|
|
240
|
-
const op_get_scheduler = (0, types_1.defineOperation)({
|
|
241
|
-
id: 'org-audit.schedulers.get',
|
|
242
|
-
summary: 'Get a scheduler by UUID with destinations redacted by default',
|
|
243
|
-
http: { method: 'GET', path: '/api/v1/schedulers/{schedulerUuid}' },
|
|
244
|
-
authorization: { safetyImpact: 'read' },
|
|
245
|
-
sensitivity: 'secret.destination',
|
|
246
|
-
mcp: {
|
|
247
|
-
toolName: 'get_scheduler',
|
|
248
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
249
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
250
|
-
},
|
|
251
|
-
cli: { commandPath: 'schedulers get' },
|
|
252
|
-
profiles: [PROFILE_ORG_AUDIT],
|
|
253
|
-
});
|
|
254
|
-
exports.ORGANIZATION_AUDIT_OPERATIONS = [
|
|
255
|
-
op_get_org_profile,
|
|
256
|
-
op_list_org_members,
|
|
257
|
-
op_get_org_member,
|
|
258
|
-
op_list_org_groups,
|
|
259
|
-
op_list_org_projects,
|
|
260
|
-
op_list_org_role_assignments,
|
|
261
|
-
op_list_custom_roles,
|
|
262
|
-
op_get_custom_role,
|
|
263
|
-
op_list_project_roles,
|
|
264
|
-
op_list_project_direct_access,
|
|
265
|
-
op_list_space_access,
|
|
266
|
-
op_resolve_effective_access,
|
|
267
|
-
op_list_content,
|
|
268
|
-
op_get_dashboard_meta,
|
|
269
|
-
op_list_validation_results,
|
|
270
|
-
op_get_project_user_activity,
|
|
271
|
-
op_list_project_schedulers,
|
|
272
|
-
op_get_scheduler,
|
|
273
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const vitest_1 = require("vitest");
|
|
4
|
-
const registry_1 = require("./registry");
|
|
5
|
-
(0, vitest_1.describe)('agent-safe surface parity', () => {
|
|
6
|
-
(0, vitest_1.it)('requires MCP tool name or CLI path for agent operations', () => {
|
|
7
|
-
const agentOps = (0, registry_1.listOperations)().filter((operation) => operation.agentExposure === 'agent');
|
|
8
|
-
(0, vitest_1.expect)(agentOps.length).toBeGreaterThan(0);
|
|
9
|
-
for (const operation of agentOps) {
|
|
10
|
-
const hasMcp = operation.mcp !== undefined && operation.mcp.toolName.trim().length > 0;
|
|
11
|
-
const hasCli = operation.cli !== undefined && operation.cli.commandPath.trim().length > 0;
|
|
12
|
-
(0, vitest_1.expect)(hasMcp || hasCli).toBe(true);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
(0, vitest_1.it)('keeps client-only banned MCP tool names off the agent surface', () => {
|
|
16
|
-
const banned = (0, registry_1.listBannedMcpToolNames)();
|
|
17
|
-
(0, vitest_1.expect)(banned).toContain('delete_member');
|
|
18
|
-
for (const operation of (0, registry_1.listOperations)()) {
|
|
19
|
-
if (operation.agentExposure !== 'client-only') {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
(0, vitest_1.expect)(operation.mcp).toBeUndefined();
|
|
23
|
-
(0, vitest_1.expect)(operation.cli).toBeUndefined();
|
|
24
|
-
if (operation.bannedMcpToolName) {
|
|
25
|
-
(0, vitest_1.expect)(banned).toContain(operation.bannedMcpToolName);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Central operation catalog — aggregates domain modules and exposes lookup helpers.
|
|
3
|
-
*/
|
|
4
|
-
import type { OperationDescriptor, ProfileId } from './types';
|
|
5
|
-
/** Returns a registered operation by id, or undefined when not found. */
|
|
6
|
-
export declare function getOperation(id: string): OperationDescriptor | undefined;
|
|
7
|
-
/** Returns the agent operation registered for an MCP tool name (sans prefix), if any. */
|
|
8
|
-
export declare function getOperationByMcpToolName(toolName: string): OperationDescriptor | undefined;
|
|
9
|
-
/** Returns every registered operation descriptor. */
|
|
10
|
-
export declare function listOperations(): readonly OperationDescriptor[];
|
|
11
|
-
/** Returns agent-surface operations that include the given MCP serving profile. */
|
|
12
|
-
export declare function getOperationsByProfile(profile: ProfileId): readonly OperationDescriptor[];
|
|
13
|
-
/** MCP tool names (sans prefix) with `mcp.taskSupport.exposed === true`. */
|
|
14
|
-
export declare function listExposedMcpToolNames(): readonly string[];
|
|
15
|
-
/** MCP tool names that must never be registered (client-only denylist). */
|
|
16
|
-
export declare function listBannedMcpToolNames(): readonly string[];
|
|
17
|
-
/** Exposed MCP tool names for a serving profile (registration source, ADR-0006). */
|
|
18
|
-
export declare function listMcpToolNamesByProfile(profile: ProfileId): readonly string[];
|