@lightdash-tools/common 0.7.0 → 0.9.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.
Files changed (71) hide show
  1. package/dist/argument-validation.js +20 -2
  2. package/dist/argument-validation.test.js +22 -0
  3. package/dist/audit.d.ts +29 -9
  4. package/dist/audit.js +53 -9
  5. package/dist/audit.test.js +51 -24
  6. package/dist/env.d.ts +1 -1
  7. package/dist/env.js +2 -2
  8. package/dist/index.d.ts +1 -3
  9. package/dist/index.js +6 -8
  10. package/dist/operations/agent-safe.d.ts +1 -3
  11. package/dist/operations/agent-safe.js +2 -9
  12. package/dist/operations/ai-agents.js +118 -30
  13. package/dist/operations/cli-content.d.ts +5 -0
  14. package/dist/operations/cli-content.js +71 -0
  15. package/dist/operations/client-coverage.d.ts +119 -0
  16. package/dist/operations/client-coverage.js +137 -0
  17. package/dist/operations/client-coverage.test.d.ts +1 -0
  18. package/dist/operations/client-coverage.test.js +22 -0
  19. package/dist/operations/content-developer.d.ts +2 -0
  20. package/dist/operations/content-developer.js +471 -0
  21. package/dist/operations/content-governance.d.ts +7 -0
  22. package/dist/operations/content-governance.js +98 -0
  23. package/dist/operations/content-reader.d.ts +2 -0
  24. package/dist/operations/content-reader.js +197 -0
  25. package/dist/operations/index.d.ts +10 -3
  26. package/dist/operations/index.js +20 -2
  27. package/dist/operations/organization-audit.d.ts +2 -0
  28. package/dist/operations/organization-audit.js +273 -0
  29. package/dist/operations/parity.test.js +12 -11
  30. package/dist/operations/registry.d.ts +9 -1
  31. package/dist/operations/registry.js +77 -2
  32. package/dist/operations/registry.test.js +39 -11
  33. package/dist/operations/semantic-layer.d.ts +6 -0
  34. package/dist/operations/semantic-layer.js +154 -0
  35. package/dist/operations/types.d.ts +29 -12
  36. package/dist/operations/types.js +64 -29
  37. package/dist/operations/types.test.js +33 -45
  38. package/dist/operations/users.d.ts +2 -2
  39. package/dist/operations/users.js +8 -10
  40. package/dist/safety.d.ts +8 -2
  41. package/dist/safety.js +22 -4
  42. package/dist/safety.test.js +29 -6
  43. package/dist/types/index.d.ts +12 -0
  44. package/dist/types/index.js +29 -0
  45. package/package.json +2 -1
  46. package/src/argument-validation.test.ts +31 -0
  47. package/src/argument-validation.ts +20 -2
  48. package/src/audit.test.ts +70 -30
  49. package/src/audit.ts +88 -12
  50. package/src/env.ts +1 -1
  51. package/src/index.ts +5 -9
  52. package/src/operations/agent-safe.ts +2 -12
  53. package/src/operations/ai-agents.ts +123 -31
  54. package/src/operations/cli-content.ts +79 -0
  55. package/src/operations/client-coverage.test.ts +23 -0
  56. package/src/operations/client-coverage.ts +153 -0
  57. package/src/operations/content-developer.ts +501 -0
  58. package/src/operations/content-governance.ts +110 -0
  59. package/src/operations/content-reader.ts +212 -0
  60. package/src/operations/index.ts +25 -2
  61. package/src/operations/organization-audit.ts +293 -0
  62. package/src/operations/parity.test.ts +12 -14
  63. package/src/operations/registry.test.ts +41 -9
  64. package/src/operations/registry.ts +86 -2
  65. package/src/operations/semantic-layer.ts +166 -0
  66. package/src/operations/types.test.ts +38 -76
  67. package/src/operations/types.ts +112 -47
  68. package/src/operations/users.ts +9 -11
  69. package/src/safety.test.ts +32 -6
  70. package/src/safety.ts +26 -4
  71. package/src/types/index.ts +13 -0
@@ -14,6 +14,7 @@ const PROFILE_CORE_LIFECYCLE = 'core-lifecycle';
14
14
  const PROFILE_DISCOVERY = 'discovery-readonly';
15
15
  const PROFILE_CONVERSATIONS = 'conversations';
16
16
  const PROFILE_EVALUATIONS = 'evaluations';
17
+ const PROFILE_AI_AGENT_OPS = 'ai-agent-ops';
17
18
  const API_V1 = '/api/v1';
18
19
  const PROJECT_AGENTS_PATH = `${API_V1}/projects/{projectUuid}/aiAgents`;
19
20
  const PROJECT_AGENT_PATH = `${PROJECT_AGENTS_PATH}/{agentUuid}`;
@@ -22,10 +23,11 @@ const adminListAgents = (0, types_1.defineOperation)({
22
23
  summary: 'List all AI agents across the organization (admin)',
23
24
  http: { method: 'GET', path: `${API_V1}/aiAgents/admin/agents` },
24
25
  authorization: { safetyImpact: IMPACT_READ },
26
+ sensitivity: 'none',
25
27
  mcp: {
26
28
  toolName: 'list_admin_agents',
27
29
  annotations: safety_1.READ_ONLY_DEFAULT,
28
- taskSupport: { exposed: true, taskEligible: false },
30
+ taskSupport: { exposed: false, taskEligible: false },
29
31
  },
30
32
  cli: { commandPath: 'ai-agents list' },
31
33
  profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
@@ -35,10 +37,11 @@ const adminListThreads = (0, types_1.defineOperation)({
35
37
  summary: 'List AI agent threads across the organization with optional filters (admin)',
36
38
  http: { method: 'GET', path: `${API_V1}/aiAgents/admin/threads` },
37
39
  authorization: { safetyImpact: IMPACT_READ },
40
+ sensitivity: 'none',
38
41
  mcp: {
39
42
  toolName: 'list_admin_agent_threads',
40
43
  annotations: safety_1.READ_ONLY_DEFAULT,
41
- taskSupport: { exposed: true, taskEligible: false },
44
+ taskSupport: { exposed: false, taskEligible: false },
42
45
  },
43
46
  cli: { commandPath: 'ai-agents threads' },
44
47
  profiles: [PROFILE_DISCOVERY],
@@ -48,29 +51,25 @@ const adminSettingsGet = (0, types_1.defineOperation)({
48
51
  summary: 'Get AI organization settings (admin)',
49
52
  http: { method: 'GET', path: `${API_V1}/aiAgents/admin/settings` },
50
53
  authorization: { safetyImpact: IMPACT_READ },
54
+ sensitivity: 'none',
51
55
  mcp: {
52
56
  toolName: 'get_ai_organization_settings',
53
57
  annotations: safety_1.READ_ONLY_DEFAULT,
54
- taskSupport: { exposed: true, taskEligible: false },
58
+ taskSupport: { exposed: false, taskEligible: false },
55
59
  },
56
60
  cli: { commandPath: 'ai-agents settings get' },
57
61
  profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
58
62
  });
59
- const WRITE_SETTINGS_UPDATE = {
60
- readOnlyHint: false,
61
- openWorldHint: false,
62
- destructiveHint: false,
63
- idempotentHint: true,
64
- };
65
63
  const adminSettingsUpdate = (0, types_1.defineOperation)({
66
64
  id: 'ai-agents.admin.settings.update',
67
65
  summary: 'Update AI organization settings (admin)',
68
66
  http: { method: 'PATCH', path: `${API_V1}/aiAgents/admin/settings` },
69
67
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
68
+ sensitivity: 'none',
70
69
  mcp: {
71
70
  toolName: 'update_ai_organization_settings',
72
- annotations: WRITE_SETTINGS_UPDATE,
73
- taskSupport: { exposed: true, taskEligible: false },
71
+ annotations: safety_1.WRITE_IDEMPOTENT,
72
+ taskSupport: { exposed: false, taskEligible: false },
74
73
  },
75
74
  cli: { commandPath: 'ai-agents settings update' },
76
75
  profiles: [PROFILE_CORE_LIFECYCLE],
@@ -80,36 +79,39 @@ const projectAgentsList = (0, types_1.defineOperation)({
80
79
  summary: 'List all AI agents in a project',
81
80
  http: { method: 'GET', path: PROJECT_AGENTS_PATH },
82
81
  authorization: { safetyImpact: IMPACT_READ },
82
+ sensitivity: 'none',
83
83
  mcp: {
84
84
  toolName: 'list_project_agents',
85
85
  annotations: safety_1.READ_ONLY_DEFAULT,
86
86
  taskSupport: { exposed: true, taskEligible: false },
87
87
  },
88
88
  cli: { commandPath: 'agents list' },
89
- profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
89
+ profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
90
90
  });
91
91
  const projectAgentsGet = (0, types_1.defineOperation)({
92
92
  id: 'ai-agents.project.agents.get',
93
93
  summary: 'Get a single AI agent in a project',
94
94
  http: { method: 'GET', path: PROJECT_AGENT_PATH },
95
95
  authorization: { safetyImpact: IMPACT_READ },
96
+ sensitivity: 'none',
96
97
  mcp: {
97
98
  toolName: 'get_project_agent',
98
99
  annotations: safety_1.READ_ONLY_DEFAULT,
99
100
  taskSupport: { exposed: true, taskEligible: false },
100
101
  },
101
102
  cli: { commandPath: 'agents get' },
102
- profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
103
+ profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
103
104
  });
104
105
  const projectAgentsCreate = (0, types_1.defineOperation)({
105
106
  id: 'ai-agents.project.agents.create',
106
107
  summary: 'Create a new AI agent in a project',
107
108
  http: { method: 'POST', path: PROJECT_AGENTS_PATH },
108
109
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
110
+ sensitivity: 'none',
109
111
  mcp: {
110
112
  toolName: 'create_project_agent',
111
113
  annotations: safety_1.WRITE_NONDESTRUCTIVE,
112
- taskSupport: { exposed: true, taskEligible: false },
114
+ taskSupport: { exposed: false, taskEligible: false },
113
115
  },
114
116
  cli: { commandPath: 'agents create' },
115
117
  profiles: [PROFILE_CORE_LIFECYCLE],
@@ -119,10 +121,11 @@ const projectAgentsUpdate = (0, types_1.defineOperation)({
119
121
  summary: 'Update an existing AI agent in a project',
120
122
  http: { method: 'PATCH', path: PROJECT_AGENT_PATH },
121
123
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
124
+ sensitivity: 'none',
122
125
  mcp: {
123
126
  toolName: 'update_project_agent',
124
127
  annotations: safety_1.WRITE_NONDESTRUCTIVE,
125
- taskSupport: { exposed: true, taskEligible: false },
128
+ taskSupport: { exposed: false, taskEligible: false },
126
129
  },
127
130
  cli: { commandPath: 'agents update' },
128
131
  profiles: [PROFILE_CORE_LIFECYCLE],
@@ -132,10 +135,11 @@ const projectAgentsDelete = (0, types_1.defineOperation)({
132
135
  summary: 'Delete an AI agent from a project',
133
136
  http: { method: 'DELETE', path: PROJECT_AGENT_PATH },
134
137
  authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
138
+ sensitivity: 'none',
135
139
  mcp: {
136
140
  toolName: 'delete_project_agent',
137
141
  annotations: safety_1.WRITE_DESTRUCTIVE,
138
- taskSupport: { exposed: true, taskEligible: false },
142
+ taskSupport: { exposed: false, taskEligible: false },
139
143
  },
140
144
  cli: { commandPath: 'agents delete' },
141
145
  profiles: [PROFILE_CORE_LIFECYCLE],
@@ -149,13 +153,14 @@ const threadsList = (0, types_1.defineOperation)({
149
153
  path: PROJECT_AGENT_THREADS_PATH,
150
154
  },
151
155
  authorization: { safetyImpact: IMPACT_READ },
156
+ sensitivity: 'none',
152
157
  mcp: {
153
158
  toolName: 'list_agent_threads',
154
159
  annotations: safety_1.READ_ONLY_DEFAULT,
155
160
  taskSupport: { exposed: true, taskEligible: false },
156
161
  },
157
162
  cli: { commandPath: 'agents threads list' },
158
- profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY],
163
+ profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
159
164
  });
160
165
  const PROJECT_AGENT_THREAD_PATH = `${PROJECT_AGENT_THREADS_PATH}/{threadUuid}`;
161
166
  const threadsGet = (0, types_1.defineOperation)({
@@ -166,13 +171,14 @@ const threadsGet = (0, types_1.defineOperation)({
166
171
  path: PROJECT_AGENT_THREAD_PATH,
167
172
  },
168
173
  authorization: { safetyImpact: IMPACT_READ },
174
+ sensitivity: 'none',
169
175
  mcp: {
170
176
  toolName: 'get_agent_thread',
171
177
  annotations: safety_1.READ_ONLY_DEFAULT,
172
178
  taskSupport: { exposed: true, taskEligible: false },
173
179
  },
174
180
  cli: { commandPath: 'agents threads get' },
175
- profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY],
181
+ profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
176
182
  });
177
183
  const PROJECT_AGENT_THREAD_MESSAGES_PATH = `${PROJECT_AGENT_THREAD_PATH}/messages`;
178
184
  const PROJECT_AGENT_THREAD_GENERATE_PATH = `${PROJECT_AGENT_THREAD_PATH}/generate`;
@@ -201,10 +207,11 @@ const threadsStart = (0, types_1.defineOperation)({
201
207
  },
202
208
  ],
203
209
  authorization: { safetyImpact: IMPACT_EXTERNAL },
210
+ sensitivity: 'none',
204
211
  mcp: {
205
212
  toolName: 'generate_agent_message',
206
213
  annotations: safety_1.WRITE_OPEN_WORLD,
207
- taskSupport: { exposed: true, taskEligible: true },
214
+ taskSupport: { exposed: false, taskEligible: true },
208
215
  },
209
216
  cli: { commandPath: 'agents threads start' },
210
217
  profiles: [PROFILE_CONVERSATIONS],
@@ -229,10 +236,11 @@ const threadsContinue = (0, types_1.defineOperation)({
229
236
  },
230
237
  ],
231
238
  authorization: { safetyImpact: IMPACT_EXTERNAL },
239
+ sensitivity: 'none',
232
240
  mcp: {
233
241
  toolName: 'continue_agent_thread',
234
242
  annotations: safety_1.WRITE_OPEN_WORLD,
235
- taskSupport: { exposed: true, taskEligible: true },
243
+ taskSupport: { exposed: false, taskEligible: true },
236
244
  },
237
245
  cli: { commandPath: 'agents threads continue' },
238
246
  profiles: [PROFILE_CONVERSATIONS],
@@ -246,13 +254,14 @@ const evaluationsList = (0, types_1.defineOperation)({
246
254
  path: PROJECT_AGENT_EVALUATIONS_PATH,
247
255
  },
248
256
  authorization: { safetyImpact: IMPACT_READ },
257
+ sensitivity: 'none',
249
258
  mcp: {
250
259
  toolName: 'list_agent_evaluations',
251
260
  annotations: safety_1.READ_ONLY_DEFAULT,
252
261
  taskSupport: { exposed: true, taskEligible: false },
253
262
  },
254
263
  cli: { commandPath: 'agents evals list' },
255
- profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
264
+ profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
256
265
  });
257
266
  const PROJECT_AGENT_EVALUATION_PATH = `${PROJECT_AGENT_EVALUATIONS_PATH}/{evalUuid}`;
258
267
  const evaluationsGet = (0, types_1.defineOperation)({
@@ -263,13 +272,14 @@ const evaluationsGet = (0, types_1.defineOperation)({
263
272
  path: PROJECT_AGENT_EVALUATION_PATH,
264
273
  },
265
274
  authorization: { safetyImpact: IMPACT_READ },
275
+ sensitivity: 'none',
266
276
  mcp: {
267
277
  toolName: 'get_agent_evaluation',
268
278
  annotations: safety_1.READ_ONLY_DEFAULT,
269
279
  taskSupport: { exposed: true, taskEligible: false },
270
280
  },
271
281
  cli: { commandPath: 'agents evals get' },
272
- profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
282
+ profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
273
283
  });
274
284
  const evaluationsCreate = (0, types_1.defineOperation)({
275
285
  id: 'ai-agents.project.evaluations.create',
@@ -279,13 +289,14 @@ const evaluationsCreate = (0, types_1.defineOperation)({
279
289
  path: PROJECT_AGENT_EVALUATIONS_PATH,
280
290
  },
281
291
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
292
+ sensitivity: 'none',
282
293
  mcp: {
283
294
  toolName: 'create_agent_evaluation',
284
295
  annotations: safety_1.WRITE_NONDESTRUCTIVE,
285
296
  taskSupport: { exposed: true, taskEligible: false },
286
297
  },
287
298
  cli: { commandPath: 'agents evals create' },
288
- profiles: [PROFILE_EVALUATIONS],
299
+ profiles: [PROFILE_EVALUATIONS, PROFILE_AI_AGENT_OPS],
289
300
  });
290
301
  const evaluationsUpdate = (0, types_1.defineOperation)({
291
302
  id: 'ai-agents.project.evaluations.update',
@@ -295,13 +306,14 @@ const evaluationsUpdate = (0, types_1.defineOperation)({
295
306
  path: PROJECT_AGENT_EVALUATION_PATH,
296
307
  },
297
308
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
309
+ sensitivity: 'none',
298
310
  mcp: {
299
311
  toolName: 'update_agent_evaluation',
300
312
  annotations: safety_1.WRITE_NONDESTRUCTIVE,
301
313
  taskSupport: { exposed: true, taskEligible: false },
302
314
  },
303
315
  cli: { commandPath: 'agents evals update' },
304
- profiles: [PROFILE_EVALUATIONS],
316
+ profiles: [PROFILE_EVALUATIONS, PROFILE_AI_AGENT_OPS],
305
317
  });
306
318
  const evaluationsAppend = (0, types_1.defineOperation)({
307
319
  id: 'ai-agents.project.evaluations.append',
@@ -311,13 +323,14 @@ const evaluationsAppend = (0, types_1.defineOperation)({
311
323
  path: `${PROJECT_AGENT_EVALUATION_PATH}/append`,
312
324
  },
313
325
  authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
326
+ sensitivity: 'none',
314
327
  mcp: {
315
328
  toolName: 'append_agent_evaluation_prompts',
316
329
  annotations: safety_1.WRITE_NONDESTRUCTIVE,
317
330
  taskSupport: { exposed: true, taskEligible: false },
318
331
  },
319
332
  cli: { commandPath: 'agents evals append' },
320
- profiles: [PROFILE_EVALUATIONS],
333
+ profiles: [PROFILE_EVALUATIONS, PROFILE_AI_AGENT_OPS],
321
334
  });
322
335
  const evaluationsDelete = (0, types_1.defineOperation)({
323
336
  id: 'ai-agents.project.evaluations.delete',
@@ -327,13 +340,14 @@ const evaluationsDelete = (0, types_1.defineOperation)({
327
340
  path: PROJECT_AGENT_EVALUATION_PATH,
328
341
  },
329
342
  authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
343
+ sensitivity: 'none',
330
344
  mcp: {
331
345
  toolName: 'delete_agent_evaluation',
332
346
  annotations: safety_1.WRITE_DESTRUCTIVE,
333
347
  taskSupport: { exposed: true, taskEligible: false },
334
348
  },
335
349
  cli: { commandPath: 'agents evals delete' },
336
- profiles: [PROFILE_EVALUATIONS],
350
+ profiles: [PROFILE_EVALUATIONS, PROFILE_AI_AGENT_OPS],
337
351
  });
338
352
  const evaluationsRun = (0, types_1.defineOperation)({
339
353
  id: 'ai-agents.project.evaluations.run',
@@ -343,13 +357,14 @@ const evaluationsRun = (0, types_1.defineOperation)({
343
357
  path: `${PROJECT_AGENT_EVALUATION_PATH}/run`,
344
358
  },
345
359
  authorization: { safetyImpact: IMPACT_EXTERNAL },
360
+ sensitivity: 'none',
346
361
  mcp: {
347
362
  toolName: 'run_agent_evaluation',
348
363
  annotations: safety_1.WRITE_OPEN_WORLD,
349
364
  taskSupport: { exposed: true, taskEligible: true },
350
365
  },
351
366
  cli: { commandPath: 'agents evals run' },
352
- profiles: [PROFILE_EVALUATIONS],
367
+ profiles: [PROFILE_EVALUATIONS, PROFILE_AI_AGENT_OPS],
353
368
  });
354
369
  const PROJECT_AGENT_EVALUATION_RUNS_PATH = `${PROJECT_AGENT_EVALUATION_PATH}/runs`;
355
370
  const evaluationsRunsList = (0, types_1.defineOperation)({
@@ -360,13 +375,14 @@ const evaluationsRunsList = (0, types_1.defineOperation)({
360
375
  path: PROJECT_AGENT_EVALUATION_RUNS_PATH,
361
376
  },
362
377
  authorization: { safetyImpact: IMPACT_READ },
378
+ sensitivity: 'none',
363
379
  mcp: {
364
380
  toolName: 'list_agent_evaluation_runs',
365
381
  annotations: safety_1.READ_ONLY_DEFAULT,
366
382
  taskSupport: { exposed: true, taskEligible: false },
367
383
  },
368
384
  cli: { commandPath: 'agents evals runs' },
369
- profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
385
+ profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
370
386
  });
371
387
  const evaluationsRunResultsGet = (0, types_1.defineOperation)({
372
388
  id: 'ai-agents.project.evaluations.runs.get',
@@ -376,13 +392,81 @@ const evaluationsRunResultsGet = (0, types_1.defineOperation)({
376
392
  path: `${PROJECT_AGENT_EVALUATION_RUNS_PATH}/{runUuid}`,
377
393
  },
378
394
  authorization: { safetyImpact: IMPACT_READ },
395
+ sensitivity: 'none',
379
396
  mcp: {
380
- toolName: 'get_agent_evaluation_run_results',
397
+ toolName: 'get_agent_eval_run_results',
381
398
  annotations: safety_1.READ_ONLY_DEFAULT,
382
399
  taskSupport: { exposed: true, taskEligible: false },
383
400
  },
384
401
  cli: { commandPath: 'agents evals run-results' },
385
- profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
402
+ profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
403
+ });
404
+ const evaluateAgentReadiness = (0, types_1.defineOperation)({
405
+ id: 'ai-agents.project.agents.evaluate-readiness',
406
+ summary: 'Evaluate release readiness score for an agent (not an evaluation-suite run)',
407
+ http: {
408
+ method: 'POST',
409
+ path: `${PROJECT_AGENT_PATH}/evaluateReadiness`,
410
+ },
411
+ authorization: { safetyImpact: IMPACT_READ },
412
+ sensitivity: 'none',
413
+ mcp: {
414
+ toolName: 'evaluate_agent_readiness',
415
+ annotations: safety_1.READ_ONLY_DEFAULT,
416
+ taskSupport: { exposed: true, taskEligible: false },
417
+ },
418
+ cli: { commandPath: 'agents readiness evaluate' },
419
+ profiles: [PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
420
+ });
421
+ const getAgentSuggestions = (0, types_1.defineOperation)({
422
+ id: 'ai-agents.project.agents.suggestions',
423
+ summary: 'List suggestion chips for an agent',
424
+ http: {
425
+ method: 'GET',
426
+ path: `${PROJECT_AGENT_PATH}/suggestions`,
427
+ },
428
+ authorization: { safetyImpact: IMPACT_READ },
429
+ sensitivity: 'none',
430
+ mcp: {
431
+ toolName: 'get_agent_suggestions',
432
+ annotations: safety_1.READ_ONLY_DEFAULT,
433
+ taskSupport: { exposed: true, taskEligible: false },
434
+ },
435
+ cli: { commandPath: 'agents suggestions' },
436
+ profiles: [PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
437
+ });
438
+ const getAgentModels = (0, types_1.defineOperation)({
439
+ id: 'ai-agents.project.agents.models',
440
+ summary: 'List available AI model options for an agent',
441
+ http: {
442
+ method: 'GET',
443
+ path: `${PROJECT_AGENT_PATH}/models`,
444
+ },
445
+ authorization: { safetyImpact: IMPACT_READ },
446
+ sensitivity: 'none',
447
+ mcp: {
448
+ toolName: 'get_agent_models',
449
+ annotations: safety_1.READ_ONLY_DEFAULT,
450
+ taskSupport: { exposed: true, taskEligible: false },
451
+ },
452
+ cli: { commandPath: 'agents models' },
453
+ profiles: [PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
454
+ });
455
+ const getExploreAccessSummary = (0, types_1.defineOperation)({
456
+ id: 'ai-agents.project.explore-access-summary',
457
+ summary: 'Summarize explore access for tag-filtered explores',
458
+ http: {
459
+ method: 'POST',
460
+ path: `${PROJECT_AGENTS_PATH}/explore-access-summary`,
461
+ },
462
+ authorization: { safetyImpact: IMPACT_READ },
463
+ sensitivity: 'none',
464
+ mcp: {
465
+ toolName: 'get_explore_access_summary',
466
+ annotations: safety_1.READ_ONLY_DEFAULT,
467
+ taskSupport: { exposed: true, taskEligible: false },
468
+ },
469
+ profiles: [PROFILE_DISCOVERY, PROFILE_AI_AGENT_OPS],
386
470
  });
387
471
  /** All registered P0 AI agent operations. */
388
472
  exports.AI_AGENT_OPERATIONS = [
@@ -395,6 +479,10 @@ exports.AI_AGENT_OPERATIONS = [
395
479
  projectAgentsCreate,
396
480
  projectAgentsUpdate,
397
481
  projectAgentsDelete,
482
+ evaluateAgentReadiness,
483
+ getAgentSuggestions,
484
+ getAgentModels,
485
+ getExploreAccessSummary,
398
486
  threadsList,
399
487
  threadsGet,
400
488
  threadsStart,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * CLI content/validation operations (ADR-0013). Catalog metadata only — not MCP tools.
3
+ */
4
+ import type { OperationDescriptor } from './types';
5
+ export declare const CLI_CONTENT_OPERATIONS: readonly OperationDescriptor[];
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * CLI content/validation operations (ADR-0013). Catalog metadata only — not MCP tools.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CLI_CONTENT_OPERATIONS = void 0;
7
+ const types_1 = require("./types");
8
+ const PROFILE_DISCOVERY = 'discovery-readonly';
9
+ const PROFILE_CORE = 'core-lifecycle';
10
+ const chartsList = (0, types_1.defineOperation)({
11
+ id: 'cli.charts.list',
12
+ summary: 'List charts in a project (Commander alias of charts-as-code list)',
13
+ http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/code/charts' },
14
+ authorization: { safetyImpact: 'read' },
15
+ sensitivity: 'none',
16
+ cli: { commandPath: 'projects charts list' },
17
+ profiles: [PROFILE_DISCOVERY],
18
+ });
19
+ const chartsCodeList = (0, types_1.defineOperation)({
20
+ id: 'cli.charts.code.list',
21
+ summary: 'Get charts in code representation',
22
+ http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/code/charts' },
23
+ authorization: { safetyImpact: 'read' },
24
+ sensitivity: 'none',
25
+ cli: { commandPath: 'projects charts code list' },
26
+ profiles: [PROFILE_DISCOVERY],
27
+ });
28
+ const chartsCodeUpsert = (0, types_1.defineOperation)({
29
+ id: 'cli.charts.code.upsert',
30
+ summary: 'Create or update chart by slug',
31
+ http: { method: 'POST', path: '/api/v1/projects/{projectUuid}/code/charts/{slug}' },
32
+ authorization: { safetyImpact: 'write-nondestructive' },
33
+ sensitivity: 'none',
34
+ cli: { commandPath: 'projects charts code upsert' },
35
+ profiles: [PROFILE_CORE],
36
+ });
37
+ const dashboardsList = (0, types_1.defineOperation)({
38
+ id: 'cli.dashboards.list',
39
+ summary: 'List dashboards in a project',
40
+ http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/dashboards' },
41
+ authorization: { safetyImpact: 'read' },
42
+ sensitivity: 'none',
43
+ cli: { commandPath: 'projects dashboards list' },
44
+ profiles: [PROFILE_DISCOVERY],
45
+ });
46
+ const validateRun = (0, types_1.defineOperation)({
47
+ id: 'cli.projects.validate.run',
48
+ summary: 'Start project validation job',
49
+ http: { method: 'POST', path: '/api/v1/projects/{projectUuid}/validate' },
50
+ authorization: { safetyImpact: 'write-nondestructive' },
51
+ sensitivity: 'none',
52
+ cli: { commandPath: 'projects validate run' },
53
+ profiles: [PROFILE_CORE],
54
+ });
55
+ const validateResults = (0, types_1.defineOperation)({
56
+ id: 'cli.projects.validate.results',
57
+ summary: 'List project validation results (v2, paginated)',
58
+ http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/validate' },
59
+ authorization: { safetyImpact: 'read' },
60
+ sensitivity: 'none',
61
+ cli: { commandPath: 'projects validate results' },
62
+ profiles: [PROFILE_DISCOVERY],
63
+ });
64
+ exports.CLI_CONTENT_OPERATIONS = [
65
+ chartsList,
66
+ chartsCodeList,
67
+ chartsCodeUpsert,
68
+ dashboardsList,
69
+ validateRun,
70
+ validateResults,
71
+ ];
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Catalog operation id → LightdashClient method path (ADR-0013 Phase 4).
3
+ * Composed MCP workflows use `composed:<primaryMethod>` when no single client method exists.
4
+ * Ledger-only MCP tools (no LightdashClient call) use `ledger:<token>`.
5
+ */
6
+ export type ClientMethodRef = string;
7
+ /**
8
+ * Hard coverage map: every catalog operation id must appear here.
9
+ * Values are `v1.*` / `v2.*` client method paths, `composed:…` for multi-call tools,
10
+ * or `ledger:…` for MCP-local ledger tools with no client method.
11
+ */
12
+ export declare const OPERATION_CLIENT_METHOD_MAP: {
13
+ readonly 'ai-agents.admin.agents.list': "v1.aiAgents.listAdminAgents";
14
+ readonly 'ai-agents.admin.threads.list': "v1.aiAgents.getAdminThreads";
15
+ readonly 'ai-agents.admin.settings.get': "v1.aiAgents.getAiOrganizationSettings";
16
+ readonly 'ai-agents.admin.settings.update': "v1.aiAgents.updateAiOrganizationSettings";
17
+ readonly 'ai-agents.project.agents.list': "v1.aiAgents.listAgents";
18
+ readonly 'ai-agents.project.agents.get': "v1.aiAgents.getAgent";
19
+ readonly 'ai-agents.project.agents.create': "v1.aiAgents.createAgent";
20
+ readonly 'ai-agents.project.agents.update': "v1.aiAgents.updateAgent";
21
+ readonly 'ai-agents.project.agents.delete': "v1.aiAgents.deleteAgent";
22
+ readonly 'ai-agents.project.agents.evaluate-readiness': "v1.aiAgents.evaluateAgentReadiness";
23
+ readonly 'ai-agents.project.agents.suggestions': "v1.aiAgents.getAgentSuggestions";
24
+ readonly 'ai-agents.project.agents.models': "v1.aiAgents.getAgentModelOptions";
25
+ readonly 'ai-agents.project.explore-access-summary': "v1.aiAgents.getExploreAccessSummary";
26
+ readonly 'ai-agents.project.threads.list': "v1.aiAgents.listAgentThreads";
27
+ readonly 'ai-agents.project.threads.get': "v1.aiAgents.getAgentThread";
28
+ readonly 'ai-agents.project.threads.start': "v1.aiAgents.startConversation";
29
+ readonly 'ai-agents.project.threads.continue': "v1.aiAgents.continueConversation";
30
+ readonly 'ai-agents.project.evaluations.list': "v1.aiAgents.listEvaluations";
31
+ readonly 'ai-agents.project.evaluations.get': "v1.aiAgents.getEvaluation";
32
+ readonly 'ai-agents.project.evaluations.create': "v1.aiAgents.createEvaluation";
33
+ readonly 'ai-agents.project.evaluations.update': "v1.aiAgents.updateEvaluation";
34
+ readonly 'ai-agents.project.evaluations.append': "v1.aiAgents.appendToEvaluation";
35
+ readonly 'ai-agents.project.evaluations.delete': "v1.aiAgents.deleteEvaluation";
36
+ readonly 'ai-agents.project.evaluations.run': "v1.aiAgents.runEvaluation";
37
+ readonly 'ai-agents.project.evaluations.runs.list': "v1.aiAgents.listEvaluationRuns";
38
+ readonly 'ai-agents.project.evaluations.runs.get': "v1.aiAgents.getEvaluationRunResults";
39
+ readonly 'users.members.list': "v1.users.listMembers";
40
+ readonly 'users.members.get': "v1.users.getMemberByUuid";
41
+ readonly 'users.members.delete': "v1.users.deleteMember";
42
+ readonly 'semantic.projects.list': "v1.projects.listProjects";
43
+ readonly 'semantic.projects.get': "v1.projects.getProject";
44
+ readonly 'semantic.explores.list': "v1.explores.listExplores";
45
+ readonly 'semantic.explores.get': "v1.explores.getExplore";
46
+ readonly 'semantic.explores.list_dimensions': "v1.explores.listDimensions";
47
+ readonly 'semantic.explores.get_field_lineage': "v1.explores.getFieldLineage";
48
+ readonly 'semantic.metrics.list': "v1.metrics.listMetrics";
49
+ readonly 'semantic.metrics.get': "v1.metrics.getMetric";
50
+ readonly 'semantic.query.compile': "v1.query.compileQuery";
51
+ readonly 'org-audit.org.profile.get': "v1.organizations.getCurrentOrganization";
52
+ readonly 'org-audit.members.list': "v1.users.listMembers";
53
+ readonly 'org-audit.members.get': "v1.users.getMemberByUuid";
54
+ readonly 'org-audit.groups.list': "v1.groups.listGroups";
55
+ readonly 'org-audit.projects.list': "v1.projects.listProjects";
56
+ readonly 'org-audit.roles.assignments.list': "v2.organizationRoles.listRoleAssignments";
57
+ readonly 'org-audit.roles.list': "v2.organizationRoles.getRoles";
58
+ readonly 'org-audit.roles.get': "v2.organizationRoles.getRole";
59
+ readonly 'org-audit.project.roles.list': "v2.projectRoleAssignments.listAssignments";
60
+ readonly 'org-audit.project.access.list': "v1.projectAccess.listProjectAccess";
61
+ readonly 'org-audit.space.access.list': "composed:v1.spaces.listSpacesInProject+v1.spaces.getSpace";
62
+ readonly 'org-audit.access.resolve': "composed:v2.organizationRoles.listRoleAssignments+v2.projectRoleAssignments.listAssignments";
63
+ readonly 'org-audit.content.list': "v2.content.searchContent";
64
+ readonly 'org-audit.dashboards.meta.get': "v2.dashboards.getDashboard";
65
+ readonly 'org-audit.validation.list': "v2.validation.listValidationResults";
66
+ readonly 'org-audit.analytics.user-activity.get': "v1.analytics.getUserActivity";
67
+ readonly 'org-audit.schedulers.list': "v1.schedulers.listSchedulers";
68
+ readonly 'org-audit.schedulers.get': "v1.schedulers.getScheduler";
69
+ readonly 'content-reader.content.search': "v2.content.searchContent";
70
+ readonly 'content-reader.spaces.list': "v1.spaces.listSpacesInProject";
71
+ readonly 'content-reader.spaces.get': "v1.spaces.getSpace";
72
+ readonly 'content-reader.dashboards.get': "v2.dashboards.getDashboard";
73
+ readonly 'content-reader.charts.get': "v2.charts.getSavedChart";
74
+ readonly 'content-reader.parameters.list': "v2.parameters.listParameters";
75
+ readonly 'content-reader.parameters.get': "v2.parameters.getParameters";
76
+ readonly 'content-reader.content.explain': "composed:v2.charts.getSavedChart+v2.dashboards.getDashboard";
77
+ readonly 'content-reader.charts.run': "v2.query.runChartQuery";
78
+ readonly 'content-reader.charts.export-image': "composed:v1.charts.exportChartImagePng";
79
+ readonly 'content-reader.dashboards.run-tile': "v2.query.runDashboardChartQuery";
80
+ readonly 'content-reader.query.result.get': "v2.query.getAsyncQueryResults";
81
+ readonly 'content-reader.query.cancel': "v2.query.cancelAsyncQuery";
82
+ readonly 'content-developer.preview.chart': "composed:v2.charts.getSavedChart";
83
+ readonly 'content-developer.preview.dashboard': "composed:v2.dashboards.getDashboard";
84
+ readonly 'content-developer.preview.content-move': "ledger:preview";
85
+ readonly 'content-developer.charts.get-as-code': "v1.charts.getChartsAsCode";
86
+ readonly 'content-developer.charts.validate': "v1.validation.validateChart";
87
+ readonly 'content-developer.dashboards.validate': "v1.validation.validateDashboard";
88
+ readonly 'content-developer.preview.confirm': "ledger:preview";
89
+ readonly 'content-developer.charts.compare-versions': "composed:v2.charts.getSavedChart+v1.charts.getChartHistory+v1.charts.getChartVersion";
90
+ readonly 'content-developer.dashboards.compare-versions': "composed:v2.dashboards.getDashboard+v1.dashboards.getDashboardHistory+v1.dashboards.getDashboardVersion";
91
+ readonly 'content-developer.charts.create': "v1.charts.upsertChartAsCode";
92
+ readonly 'content-developer.charts.update': "v1.charts.upsertChartAsCode";
93
+ readonly 'content-developer.charts.duplicate': "composed:v1.charts.getChartsAsCode+v1.charts.upsertChartAsCode";
94
+ readonly 'content-developer.dashboards.create': "v1.dashboards.createDashboard";
95
+ readonly 'content-developer.dashboards.update': "v2.dashboards.updateDashboard";
96
+ readonly 'content-developer.dashboards.duplicate': "v1.dashboards.createDashboard";
97
+ readonly 'content-developer.dashboards.tiles.add': "v2.dashboards.updateDashboard";
98
+ readonly 'content-developer.dashboards.tiles.move': "v2.dashboards.updateDashboard";
99
+ readonly 'content-developer.dashboards.tiles.remove': "v2.dashboards.updateDashboard";
100
+ readonly 'content-developer.dashboards.tiles.resize': "v2.dashboards.updateDashboard";
101
+ readonly 'content-developer.spaces.create': "v1.spaces.createSpace";
102
+ readonly 'content-developer.spaces.update': "v1.spaces.updateSpace";
103
+ readonly 'content-developer.content.move': "v2.content.bulkMoveContent";
104
+ readonly 'content-governance.charts.delete': "v2.charts.deleteSavedChart";
105
+ readonly 'content-governance.dashboards.delete': "v2.dashboards.deleteDashboard";
106
+ readonly 'content-governance.dashboards.promote-diff': "v1.dashboards.getDashboardPromoteDiff";
107
+ readonly 'content-governance.dashboards.promote': "v1.dashboards.promoteDashboard";
108
+ readonly 'content-governance.content.permanent-delete': "v2.content.permanentlyDeleteContent";
109
+ readonly 'cli.charts.list': "v1.charts.getChartsAsCode";
110
+ readonly 'cli.charts.code.list': "v1.charts.getChartsAsCode";
111
+ readonly 'cli.charts.code.upsert': "v1.charts.upsertChartAsCode";
112
+ readonly 'cli.dashboards.list': "v1.dashboards.listDashboards";
113
+ readonly 'cli.projects.validate.run': "v1.validation.validateProject";
114
+ readonly 'cli.projects.validate.results': "v2.validation.listValidationResults";
115
+ };
116
+ export type CataloguedOperationId = keyof typeof OPERATION_CLIENT_METHOD_MAP;
117
+ /** Returns the client method ref for a catalogued operation id. */
118
+ export declare function getClientMethodForOperation(operationId: CataloguedOperationId): ClientMethodRef;
119
+ export declare function getClientMethodForOperation(operationId: string): ClientMethodRef | undefined;