@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,471 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTENT_DEVELOPER_OPERATIONS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Content-developer operations in the shared operation catalog (ADR-0014).
|
|
6
|
-
* Hybrid authoring surface: chart as-code upsert, dashboard REST create/update,
|
|
7
|
-
* MCP-composed tile layout, and bulk content move into existing spaces.
|
|
8
|
-
* Space create/update are client-only (spaces managed out-of-band, e.g. Terraform).
|
|
9
|
-
* Preview -> validate -> apply is enforced by the profile policy layer, not here.
|
|
10
|
-
*/
|
|
11
|
-
const safety_1 = require("../safety");
|
|
12
|
-
const types_1 = require("./types");
|
|
13
|
-
const PROFILE_CONTENT_DEVELOPER = 'content-developer';
|
|
14
|
-
const API_V1 = '/api/v1';
|
|
15
|
-
const API_V2 = '/api/v2';
|
|
16
|
-
const WRITE_NONDESTRUCTIVE_IMPACT = 'write-nondestructive';
|
|
17
|
-
const PREVIEW_DIFF_SUMMARY = 'Compute an in-memory diff and issue an HMAC-signed previewToken (no upstream preview API)';
|
|
18
|
-
const TILE_READ_SUMMARY = 'Read the current tile array (no per-tile REST route exists)';
|
|
19
|
-
const op_preview_chart_changes = (0, types_1.defineOperation)({
|
|
20
|
-
id: 'content-developer.preview.chart',
|
|
21
|
-
summary: 'Preview unsaved chart edits by diffing against the current saved definition',
|
|
22
|
-
http: { method: 'GET', path: `${API_V2}/projects/{projectUuid}/saved/{chartUuidOrSlug}` },
|
|
23
|
-
authorization: { safetyImpact: 'read' },
|
|
24
|
-
sensitivity: 'none',
|
|
25
|
-
mcp: {
|
|
26
|
-
toolName: 'preview_chart_changes',
|
|
27
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
28
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
29
|
-
},
|
|
30
|
-
workflow: [
|
|
31
|
-
{
|
|
32
|
-
method: 'GET',
|
|
33
|
-
path: `${API_V2}/projects/{projectUuid}/saved/{chartUuidOrSlug}`,
|
|
34
|
-
summary: 'Read the current saved chart definition',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
method: 'GET',
|
|
38
|
-
path: `${API_V2}/projects/{projectUuid}/saved/{chartUuidOrSlug}`,
|
|
39
|
-
summary: PREVIEW_DIFF_SUMMARY,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
43
|
-
});
|
|
44
|
-
const op_preview_dashboard_changes = (0, types_1.defineOperation)({
|
|
45
|
-
id: 'content-developer.preview.dashboard',
|
|
46
|
-
summary: 'Preview unsaved dashboard edits by diffing against the current saved definition',
|
|
47
|
-
http: {
|
|
48
|
-
method: 'GET',
|
|
49
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
50
|
-
},
|
|
51
|
-
authorization: { safetyImpact: 'read' },
|
|
52
|
-
sensitivity: 'none',
|
|
53
|
-
mcp: {
|
|
54
|
-
toolName: 'preview_dashboard_changes',
|
|
55
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
56
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
57
|
-
},
|
|
58
|
-
workflow: [
|
|
59
|
-
{
|
|
60
|
-
method: 'GET',
|
|
61
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
62
|
-
summary: 'Read the current saved dashboard definition',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
method: 'GET',
|
|
66
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
67
|
-
summary: PREVIEW_DIFF_SUMMARY,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
71
|
-
});
|
|
72
|
-
const op_preview_content_move = (0, types_1.defineOperation)({
|
|
73
|
-
id: 'content-developer.preview.content-move',
|
|
74
|
-
summary: 'Preview a bulk content move into an existing space (issues an HMAC-signed previewToken)',
|
|
75
|
-
http: { method: 'GET', path: `${API_V2}/content` },
|
|
76
|
-
authorization: { safetyImpact: 'read' },
|
|
77
|
-
sensitivity: 'none',
|
|
78
|
-
mcp: {
|
|
79
|
-
toolName: 'preview_content_move',
|
|
80
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
81
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
82
|
-
},
|
|
83
|
-
workflow: [
|
|
84
|
-
{
|
|
85
|
-
method: 'GET',
|
|
86
|
-
path: `${API_V2}/content`,
|
|
87
|
-
summary: PREVIEW_DIFF_SUMMARY,
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
91
|
-
});
|
|
92
|
-
const op_get_chart_as_code = (0, types_1.defineOperation)({
|
|
93
|
-
id: 'content-developer.charts.get-as-code',
|
|
94
|
-
summary: 'Get a chart in as-code (upsert) shape for cloning chartConfig/metricQuery before dashboard-scoped create',
|
|
95
|
-
http: { method: 'GET', path: `${API_V1}/projects/{projectUuid}/code/charts` },
|
|
96
|
-
authorization: { safetyImpact: 'read' },
|
|
97
|
-
sensitivity: 'none',
|
|
98
|
-
mcp: {
|
|
99
|
-
toolName: 'get_chart_as_code',
|
|
100
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
101
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
102
|
-
},
|
|
103
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
104
|
-
});
|
|
105
|
-
const op_validate_chart = (0, types_1.defineOperation)({
|
|
106
|
-
id: 'content-developer.charts.validate',
|
|
107
|
-
summary: "Validate a saved chart's fields against its underlying explore",
|
|
108
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/validate/chart/{chartUuid}` },
|
|
109
|
-
authorization: { safetyImpact: 'read' },
|
|
110
|
-
sensitivity: 'none',
|
|
111
|
-
mcp: {
|
|
112
|
-
toolName: 'validate_chart',
|
|
113
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
114
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
115
|
-
},
|
|
116
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
117
|
-
});
|
|
118
|
-
const op_validate_dashboard = (0, types_1.defineOperation)({
|
|
119
|
-
id: 'content-developer.dashboards.validate',
|
|
120
|
-
summary: "Validate a saved dashboard's fields against its underlying explores",
|
|
121
|
-
http: {
|
|
122
|
-
method: 'POST',
|
|
123
|
-
path: `${API_V1}/projects/{projectUuid}/validate/dashboard/{dashboardUuid}`,
|
|
124
|
-
},
|
|
125
|
-
authorization: { safetyImpact: 'read' },
|
|
126
|
-
sensitivity: 'none',
|
|
127
|
-
mcp: {
|
|
128
|
-
toolName: 'validate_dashboard',
|
|
129
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
130
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
131
|
-
},
|
|
132
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
133
|
-
});
|
|
134
|
-
const op_compare_chart_versions = (0, types_1.defineOperation)({
|
|
135
|
-
id: 'content-developer.charts.compare-versions',
|
|
136
|
-
summary: 'Compare two chart version-history entries within the resolved project scope',
|
|
137
|
-
http: { method: 'GET', path: `${API_V1}/saved/{chartUuid}/history` },
|
|
138
|
-
authorization: { safetyImpact: 'read' },
|
|
139
|
-
sensitivity: 'none',
|
|
140
|
-
mcp: {
|
|
141
|
-
toolName: 'compare_chart_versions',
|
|
142
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
143
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
144
|
-
},
|
|
145
|
-
workflow: [
|
|
146
|
-
{
|
|
147
|
-
method: 'GET',
|
|
148
|
-
path: `${API_V2}/projects/{projectUuid}/saved/{chartUuid}`,
|
|
149
|
-
summary: 'Verify the chart belongs to the resolved project scope',
|
|
150
|
-
},
|
|
151
|
-
{ method: 'GET', path: `${API_V1}/saved/{chartUuid}/history`, summary: 'List chart versions' },
|
|
152
|
-
{
|
|
153
|
-
method: 'GET',
|
|
154
|
-
path: `${API_V1}/saved/{chartUuid}/version/{versionUuid}`,
|
|
155
|
-
summary: 'Fetch each compared version',
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
159
|
-
});
|
|
160
|
-
const op_compare_dashboard_versions = (0, types_1.defineOperation)({
|
|
161
|
-
id: 'content-developer.dashboards.compare-versions',
|
|
162
|
-
summary: 'Compare two dashboard version-history entries within the resolved project scope',
|
|
163
|
-
http: { method: 'GET', path: `${API_V1}/dashboards/{dashboardUuidOrSlug}/history` },
|
|
164
|
-
authorization: { safetyImpact: 'read' },
|
|
165
|
-
sensitivity: 'none',
|
|
166
|
-
mcp: {
|
|
167
|
-
toolName: 'compare_dashboard_versions',
|
|
168
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
169
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
170
|
-
},
|
|
171
|
-
workflow: [
|
|
172
|
-
{
|
|
173
|
-
method: 'GET',
|
|
174
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
175
|
-
summary: 'Verify the dashboard belongs to the resolved project scope',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
method: 'GET',
|
|
179
|
-
path: `${API_V1}/dashboards/{dashboardUuidOrSlug}/history`,
|
|
180
|
-
summary: 'List dashboard versions',
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
method: 'GET',
|
|
184
|
-
path: `${API_V1}/dashboards/{dashboardUuidOrSlug}/version/{versionUuid}`,
|
|
185
|
-
summary: 'Fetch each compared version',
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
189
|
-
});
|
|
190
|
-
const op_confirm_preview = (0, types_1.defineOperation)({
|
|
191
|
-
id: 'content-developer.preview.confirm',
|
|
192
|
-
summary: 'Confirm a bound preview for create/duplicate/tile/content-move flows that have no upstream validate API',
|
|
193
|
-
http: { method: 'GET', path: `${API_V2}/content` },
|
|
194
|
-
authorization: { safetyImpact: 'read' },
|
|
195
|
-
sensitivity: 'none',
|
|
196
|
-
mcp: {
|
|
197
|
-
toolName: 'confirm_preview',
|
|
198
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
199
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
200
|
-
},
|
|
201
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
202
|
-
});
|
|
203
|
-
const op_create_chart = (0, types_1.defineOperation)({
|
|
204
|
-
id: 'content-developer.charts.create',
|
|
205
|
-
summary: 'Create a chart from code representation (as-code upsert by slug)',
|
|
206
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/code/charts/{slug}` },
|
|
207
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
208
|
-
sensitivity: 'none',
|
|
209
|
-
mcp: {
|
|
210
|
-
toolName: 'create_chart',
|
|
211
|
-
annotations: safety_1.WRITE_IDEMPOTENT,
|
|
212
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
213
|
-
},
|
|
214
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
215
|
-
});
|
|
216
|
-
const op_update_chart = (0, types_1.defineOperation)({
|
|
217
|
-
id: 'content-developer.charts.update',
|
|
218
|
-
summary: 'Update a chart from code representation (as-code upsert by slug)',
|
|
219
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/code/charts/{slug}` },
|
|
220
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
221
|
-
sensitivity: 'none',
|
|
222
|
-
mcp: {
|
|
223
|
-
toolName: 'update_chart',
|
|
224
|
-
annotations: safety_1.WRITE_IDEMPOTENT,
|
|
225
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
226
|
-
},
|
|
227
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
228
|
-
});
|
|
229
|
-
const op_duplicate_chart = (0, types_1.defineOperation)({
|
|
230
|
-
id: 'content-developer.charts.duplicate',
|
|
231
|
-
summary: 'Duplicate a chart by reading its as-code representation and upserting a new slug',
|
|
232
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/code/charts/{slug}` },
|
|
233
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
234
|
-
sensitivity: 'none',
|
|
235
|
-
mcp: {
|
|
236
|
-
toolName: 'duplicate_chart',
|
|
237
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
238
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
239
|
-
},
|
|
240
|
-
workflow: [
|
|
241
|
-
{
|
|
242
|
-
method: 'GET',
|
|
243
|
-
path: `${API_V1}/projects/{projectUuid}/code/charts`,
|
|
244
|
-
summary: 'Read the source chart as-code representation',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
method: 'POST',
|
|
248
|
-
path: `${API_V1}/projects/{projectUuid}/code/charts/{newSlug}`,
|
|
249
|
-
summary: 'Upsert the duplicate under a new slug',
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
253
|
-
});
|
|
254
|
-
const op_create_dashboard = (0, types_1.defineOperation)({
|
|
255
|
-
id: 'content-developer.dashboards.create',
|
|
256
|
-
summary: 'Create a new dashboard in a project',
|
|
257
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/dashboards` },
|
|
258
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
259
|
-
sensitivity: 'none',
|
|
260
|
-
mcp: {
|
|
261
|
-
toolName: 'create_dashboard',
|
|
262
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
263
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
264
|
-
},
|
|
265
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
266
|
-
});
|
|
267
|
-
const op_update_dashboard = (0, types_1.defineOperation)({
|
|
268
|
-
id: 'content-developer.dashboards.update',
|
|
269
|
-
summary: 'Update a dashboard by UUID or slug',
|
|
270
|
-
http: {
|
|
271
|
-
method: 'PATCH',
|
|
272
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
273
|
-
},
|
|
274
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
275
|
-
sensitivity: 'none',
|
|
276
|
-
mcp: {
|
|
277
|
-
toolName: 'update_dashboard',
|
|
278
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
279
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
280
|
-
},
|
|
281
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
282
|
-
});
|
|
283
|
-
const op_duplicate_dashboard = (0, types_1.defineOperation)({
|
|
284
|
-
id: 'content-developer.dashboards.duplicate',
|
|
285
|
-
summary: 'Duplicate a dashboard via the duplicateFrom create parameter',
|
|
286
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/dashboards` },
|
|
287
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
288
|
-
sensitivity: 'none',
|
|
289
|
-
mcp: {
|
|
290
|
-
toolName: 'duplicate_dashboard',
|
|
291
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
292
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
293
|
-
},
|
|
294
|
-
workflow: [
|
|
295
|
-
{
|
|
296
|
-
method: 'POST',
|
|
297
|
-
path: `${API_V1}/projects/{projectUuid}/dashboards?duplicateFrom={dashboardUuid}`,
|
|
298
|
-
summary: 'Create a dashboard duplicated from an existing one',
|
|
299
|
-
},
|
|
300
|
-
],
|
|
301
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
302
|
-
});
|
|
303
|
-
const op_add_dashboard_tile = (0, types_1.defineOperation)({
|
|
304
|
-
id: 'content-developer.dashboards.tiles.add',
|
|
305
|
-
summary: 'Add a tile to a dashboard by composing the full tile array and updating the dashboard',
|
|
306
|
-
http: {
|
|
307
|
-
method: 'PATCH',
|
|
308
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
309
|
-
},
|
|
310
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
311
|
-
sensitivity: 'none',
|
|
312
|
-
mcp: {
|
|
313
|
-
toolName: 'add_dashboard_tile',
|
|
314
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
315
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
316
|
-
},
|
|
317
|
-
workflow: [
|
|
318
|
-
{
|
|
319
|
-
method: 'GET',
|
|
320
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
321
|
-
summary: TILE_READ_SUMMARY,
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
method: 'PATCH',
|
|
325
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
326
|
-
summary: 'Write the full tile array back with the new tile appended',
|
|
327
|
-
},
|
|
328
|
-
],
|
|
329
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
330
|
-
});
|
|
331
|
-
const op_move_dashboard_tile = (0, types_1.defineOperation)({
|
|
332
|
-
id: 'content-developer.dashboards.tiles.move',
|
|
333
|
-
summary: 'Move a dashboard tile by composing the full tile array and updating the dashboard',
|
|
334
|
-
http: {
|
|
335
|
-
method: 'PATCH',
|
|
336
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
337
|
-
},
|
|
338
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
339
|
-
sensitivity: 'none',
|
|
340
|
-
mcp: {
|
|
341
|
-
toolName: 'move_dashboard_tile',
|
|
342
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
343
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
344
|
-
},
|
|
345
|
-
workflow: [
|
|
346
|
-
{
|
|
347
|
-
method: 'GET',
|
|
348
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
349
|
-
summary: TILE_READ_SUMMARY,
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
method: 'PATCH',
|
|
353
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
354
|
-
summary: 'Write the full tile array back with updated tile position',
|
|
355
|
-
},
|
|
356
|
-
],
|
|
357
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
358
|
-
});
|
|
359
|
-
const op_remove_dashboard_tile = (0, types_1.defineOperation)({
|
|
360
|
-
id: 'content-developer.dashboards.tiles.remove',
|
|
361
|
-
summary: 'Remove a dashboard tile by composing the full tile array and updating the dashboard',
|
|
362
|
-
http: {
|
|
363
|
-
method: 'PATCH',
|
|
364
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
365
|
-
},
|
|
366
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
367
|
-
sensitivity: 'none',
|
|
368
|
-
mcp: {
|
|
369
|
-
toolName: 'remove_dashboard_tile',
|
|
370
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
371
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
372
|
-
},
|
|
373
|
-
workflow: [
|
|
374
|
-
{
|
|
375
|
-
method: 'GET',
|
|
376
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
377
|
-
summary: TILE_READ_SUMMARY,
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
method: 'PATCH',
|
|
381
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
382
|
-
summary: 'Write the full tile array back with the tile removed',
|
|
383
|
-
},
|
|
384
|
-
],
|
|
385
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
386
|
-
});
|
|
387
|
-
const op_resize_dashboard_tile = (0, types_1.defineOperation)({
|
|
388
|
-
id: 'content-developer.dashboards.tiles.resize',
|
|
389
|
-
summary: 'Resize a dashboard tile by composing the full tile array and updating the dashboard',
|
|
390
|
-
http: {
|
|
391
|
-
method: 'PATCH',
|
|
392
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
393
|
-
},
|
|
394
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
395
|
-
sensitivity: 'none',
|
|
396
|
-
mcp: {
|
|
397
|
-
toolName: 'resize_dashboard_tile',
|
|
398
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
399
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
400
|
-
},
|
|
401
|
-
workflow: [
|
|
402
|
-
{
|
|
403
|
-
method: 'GET',
|
|
404
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
405
|
-
summary: TILE_READ_SUMMARY,
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
method: 'PATCH',
|
|
409
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
410
|
-
summary: 'Write the full tile array back with the updated tile size',
|
|
411
|
-
},
|
|
412
|
-
],
|
|
413
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
414
|
-
});
|
|
415
|
-
const op_create_space = (0, types_1.defineOperation)({
|
|
416
|
-
id: 'content-developer.spaces.create',
|
|
417
|
-
summary: 'Create a space in a project (client-only; spaces are managed out-of-band, e.g. Terraform)',
|
|
418
|
-
http: { method: 'POST', path: `${API_V1}/projects/{projectUuid}/spaces` },
|
|
419
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
420
|
-
sensitivity: 'none',
|
|
421
|
-
agentExposure: 'client-only',
|
|
422
|
-
bannedMcpToolName: 'create_space',
|
|
423
|
-
profiles: [],
|
|
424
|
-
});
|
|
425
|
-
const op_update_space = (0, types_1.defineOperation)({
|
|
426
|
-
id: 'content-developer.spaces.update',
|
|
427
|
-
summary: 'Update a space in a project (client-only; spaces are managed out-of-band, e.g. Terraform)',
|
|
428
|
-
http: { method: 'PATCH', path: `${API_V1}/projects/{projectUuid}/spaces/{spaceUuid}` },
|
|
429
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
430
|
-
sensitivity: 'none',
|
|
431
|
-
agentExposure: 'client-only',
|
|
432
|
-
bannedMcpToolName: 'update_space',
|
|
433
|
-
profiles: [],
|
|
434
|
-
});
|
|
435
|
-
const op_move_content = (0, types_1.defineOperation)({
|
|
436
|
-
id: 'content-developer.content.move',
|
|
437
|
-
summary: 'Move one or more charts or dashboards to another space in one call',
|
|
438
|
-
http: { method: 'POST', path: `${API_V2}/content/bulk-action/{projectUuid}/move` },
|
|
439
|
-
authorization: { safetyImpact: WRITE_NONDESTRUCTIVE_IMPACT },
|
|
440
|
-
sensitivity: 'none',
|
|
441
|
-
mcp: {
|
|
442
|
-
toolName: 'move_content',
|
|
443
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
444
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
445
|
-
},
|
|
446
|
-
profiles: [PROFILE_CONTENT_DEVELOPER],
|
|
447
|
-
});
|
|
448
|
-
exports.CONTENT_DEVELOPER_OPERATIONS = [
|
|
449
|
-
op_preview_chart_changes,
|
|
450
|
-
op_preview_dashboard_changes,
|
|
451
|
-
op_preview_content_move,
|
|
452
|
-
op_get_chart_as_code,
|
|
453
|
-
op_validate_chart,
|
|
454
|
-
op_validate_dashboard,
|
|
455
|
-
op_confirm_preview,
|
|
456
|
-
op_compare_chart_versions,
|
|
457
|
-
op_compare_dashboard_versions,
|
|
458
|
-
op_create_chart,
|
|
459
|
-
op_update_chart,
|
|
460
|
-
op_duplicate_chart,
|
|
461
|
-
op_create_dashboard,
|
|
462
|
-
op_update_dashboard,
|
|
463
|
-
op_duplicate_dashboard,
|
|
464
|
-
op_add_dashboard_tile,
|
|
465
|
-
op_move_dashboard_tile,
|
|
466
|
-
op_remove_dashboard_tile,
|
|
467
|
-
op_resize_dashboard_tile,
|
|
468
|
-
op_create_space,
|
|
469
|
-
op_update_space,
|
|
470
|
-
op_move_content,
|
|
471
|
-
];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content-governance operations (ADR-0015 / ADR-0017).
|
|
3
|
-
* Soft-delete charts/dashboards and dashboard promote via elicitation-required MCP tools.
|
|
4
|
-
* Permanent purge stays client-only. Chart/SQL-chart promote stay off MCP in v1.
|
|
5
|
-
*/
|
|
6
|
-
import type { OperationDescriptor } from './types';
|
|
7
|
-
export declare const CONTENT_GOVERNANCE_OPERATIONS: readonly OperationDescriptor[];
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Content-governance operations (ADR-0015 / ADR-0017).
|
|
4
|
-
* Soft-delete charts/dashboards and dashboard promote via elicitation-required MCP tools.
|
|
5
|
-
* Permanent purge stays client-only. Chart/SQL-chart promote stay off MCP in v1.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.CONTENT_GOVERNANCE_OPERATIONS = void 0;
|
|
9
|
-
const safety_1 = require("../safety");
|
|
10
|
-
const types_1 = require("./types");
|
|
11
|
-
const IMPACT_READ = 'read';
|
|
12
|
-
const IMPACT_WRITE_DESTRUCTIVE = 'write-destructive';
|
|
13
|
-
const PROFILE_CONTENT_GOVERNANCE = 'content-governance';
|
|
14
|
-
const API_V1 = '/api/v1';
|
|
15
|
-
const API_V2 = '/api/v2';
|
|
16
|
-
const op_delete_chart = (0, types_1.defineOperation)({
|
|
17
|
-
id: 'content-governance.charts.delete',
|
|
18
|
-
summary: 'Soft-delete a saved chart (MCP requires form elicitation; restorable until permanently purged)',
|
|
19
|
-
http: {
|
|
20
|
-
method: 'DELETE',
|
|
21
|
-
path: `${API_V2}/projects/{projectUuid}/saved/{chartUuidOrSlug}`,
|
|
22
|
-
},
|
|
23
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
24
|
-
sensitivity: 'none',
|
|
25
|
-
mcp: {
|
|
26
|
-
toolName: 'delete_chart',
|
|
27
|
-
// Catalog keeps WRITE_DESTRUCTIVE defaults (idempotentHint: false). Soft-delete
|
|
28
|
-
// retries are marked idempotent at MCP registration time (registerDestructiveDeleteTool).
|
|
29
|
-
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
30
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
31
|
-
},
|
|
32
|
-
profiles: [PROFILE_CONTENT_GOVERNANCE],
|
|
33
|
-
});
|
|
34
|
-
const op_delete_dashboard = (0, types_1.defineOperation)({
|
|
35
|
-
id: 'content-governance.dashboards.delete',
|
|
36
|
-
summary: 'Soft-delete a dashboard (MCP requires form elicitation; restorable until permanently purged)',
|
|
37
|
-
http: {
|
|
38
|
-
method: 'DELETE',
|
|
39
|
-
path: `${API_V2}/projects/{projectUuid}/dashboards/{dashboardUuidOrSlug}`,
|
|
40
|
-
},
|
|
41
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
42
|
-
sensitivity: 'none',
|
|
43
|
-
mcp: {
|
|
44
|
-
toolName: 'delete_dashboard',
|
|
45
|
-
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
46
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
47
|
-
},
|
|
48
|
-
profiles: [PROFILE_CONTENT_GOVERNANCE],
|
|
49
|
-
});
|
|
50
|
-
const op_get_dashboard_promote_diff = (0, types_1.defineOperation)({
|
|
51
|
-
id: 'content-governance.dashboards.promote-diff',
|
|
52
|
-
summary: 'Get promotion diff for a dashboard against its configured upstream project (read-only)',
|
|
53
|
-
http: {
|
|
54
|
-
method: 'GET',
|
|
55
|
-
path: `${API_V1}/dashboards/{dashboardUuidOrSlug}/promoteDiff`,
|
|
56
|
-
},
|
|
57
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
58
|
-
sensitivity: 'none',
|
|
59
|
-
mcp: {
|
|
60
|
-
toolName: 'get_dashboard_promote_diff',
|
|
61
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
62
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
63
|
-
},
|
|
64
|
-
profiles: [PROFILE_CONTENT_GOVERNANCE],
|
|
65
|
-
});
|
|
66
|
-
const op_promote_dashboard = (0, types_1.defineOperation)({
|
|
67
|
-
id: 'content-governance.dashboards.promote',
|
|
68
|
-
summary: 'Promote a dashboard to its configured upstream project (MCP requires form elicitation)',
|
|
69
|
-
http: {
|
|
70
|
-
method: 'POST',
|
|
71
|
-
path: `${API_V1}/dashboards/{dashboardUuidOrSlug}/promote`,
|
|
72
|
-
},
|
|
73
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
74
|
-
sensitivity: 'none',
|
|
75
|
-
mcp: {
|
|
76
|
-
toolName: 'promote_dashboard',
|
|
77
|
-
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
78
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
79
|
-
},
|
|
80
|
-
profiles: [PROFILE_CONTENT_GOVERNANCE],
|
|
81
|
-
});
|
|
82
|
-
const op_permanent_purge = (0, types_1.defineOperation)({
|
|
83
|
-
id: 'content-governance.content.permanent-delete',
|
|
84
|
-
summary: 'Permanently delete soft-deleted content (client-only; irrecoverable — not exposed on MCP)',
|
|
85
|
-
http: { method: 'DELETE', path: `${API_V2}/content/{projectUuid}/permanent` },
|
|
86
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
87
|
-
sensitivity: 'none',
|
|
88
|
-
agentExposure: 'client-only',
|
|
89
|
-
bannedMcpToolName: 'permanent_delete_content',
|
|
90
|
-
profiles: [],
|
|
91
|
-
});
|
|
92
|
-
exports.CONTENT_GOVERNANCE_OPERATIONS = [
|
|
93
|
-
op_delete_chart,
|
|
94
|
-
op_delete_dashboard,
|
|
95
|
-
op_get_dashboard_promote_diff,
|
|
96
|
-
op_promote_dashboard,
|
|
97
|
-
op_permanent_purge,
|
|
98
|
-
];
|