@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.
Files changed (66) hide show
  1. package/dist/agent-safe.d.ts +4 -0
  2. package/dist/agent-safe.js +13 -0
  3. package/dist/audit.d.ts +1 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +4 -2
  6. package/dist/profile-ids.d.ts +5 -0
  7. package/dist/profile-ids.js +15 -0
  8. package/package.json +1 -3
  9. package/src/agent-safe.ts +11 -0
  10. package/src/audit.ts +1 -1
  11. package/src/index.ts +5 -2
  12. package/src/profile-ids.ts +15 -0
  13. package/dist/operations/agent-safe.d.ts +0 -5
  14. package/dist/operations/agent-safe.js +0 -9
  15. package/dist/operations/ai-agents.d.ts +0 -6
  16. package/dist/operations/ai-agents.js +0 -495
  17. package/dist/operations/cli-content.d.ts +0 -5
  18. package/dist/operations/cli-content.js +0 -69
  19. package/dist/operations/client-coverage.d.ts +0 -120
  20. package/dist/operations/client-coverage.js +0 -139
  21. package/dist/operations/client-coverage.test.d.ts +0 -1
  22. package/dist/operations/client-coverage.test.js +0 -22
  23. package/dist/operations/content-developer.d.ts +0 -2
  24. package/dist/operations/content-developer.js +0 -471
  25. package/dist/operations/content-governance.d.ts +0 -7
  26. package/dist/operations/content-governance.js +0 -98
  27. package/dist/operations/content-reader.d.ts +0 -2
  28. package/dist/operations/content-reader.js +0 -198
  29. package/dist/operations/data-analyst.d.ts +0 -5
  30. package/dist/operations/data-analyst.js +0 -23
  31. package/dist/operations/index.d.ts +0 -13
  32. package/dist/operations/index.js +0 -37
  33. package/dist/operations/organization-audit.d.ts +0 -2
  34. package/dist/operations/organization-audit.js +0 -273
  35. package/dist/operations/parity.test.d.ts +0 -1
  36. package/dist/operations/parity.test.js +0 -29
  37. package/dist/operations/registry.d.ts +0 -18
  38. package/dist/operations/registry.js +0 -136
  39. package/dist/operations/registry.test.d.ts +0 -1
  40. package/dist/operations/registry.test.js +0 -201
  41. package/dist/operations/semantic-layer.d.ts +0 -6
  42. package/dist/operations/semantic-layer.js +0 -155
  43. package/dist/operations/types.d.ts +0 -90
  44. package/dist/operations/types.js +0 -113
  45. package/dist/operations/types.test.d.ts +0 -1
  46. package/dist/operations/types.test.js +0 -101
  47. package/dist/operations/users.d.ts +0 -6
  48. package/dist/operations/users.js +0 -56
  49. package/src/operations/agent-safe.ts +0 -8
  50. package/src/operations/ai-agents.ts +0 -539
  51. package/src/operations/cli-content.ts +0 -76
  52. package/src/operations/client-coverage.test.ts +0 -23
  53. package/src/operations/client-coverage.ts +0 -156
  54. package/src/operations/content-developer.ts +0 -501
  55. package/src/operations/content-governance.ts +0 -110
  56. package/src/operations/content-reader.ts +0 -213
  57. package/src/operations/data-analyst.ts +0 -27
  58. package/src/operations/index.ts +0 -44
  59. package/src/operations/organization-audit.ts +0 -293
  60. package/src/operations/parity.test.ts +0 -33
  61. package/src/operations/registry.test.ts +0 -229
  62. package/src/operations/registry.ts +0 -158
  63. package/src/operations/semantic-layer.ts +0 -167
  64. package/src/operations/types.test.ts +0 -138
  65. package/src/operations/types.ts +0 -241
  66. package/src/operations/users.ts +0 -62
@@ -1,539 +0,0 @@
1
- /**
2
- * P0 AI agent operations registered in the shared operation registry.
3
- */
4
-
5
- import {
6
- READ_ONLY_DEFAULT,
7
- WRITE_DESTRUCTIVE,
8
- WRITE_IDEMPOTENT,
9
- WRITE_NONDESTRUCTIVE,
10
- WRITE_OPEN_WORLD,
11
- } from '../safety';
12
-
13
- import { defineOperation } from './types';
14
-
15
- import type { OperationDescriptor, ProfileId, SafetyImpact } from './types';
16
-
17
- const IMPACT_READ: SafetyImpact = 'read';
18
- const IMPACT_WRITE_NONDESTRUCTIVE: SafetyImpact = 'write-nondestructive';
19
- const IMPACT_WRITE_DESTRUCTIVE: SafetyImpact = 'write-destructive';
20
- const IMPACT_EXTERNAL: SafetyImpact = 'external-side-effect';
21
-
22
- const PROFILE_AI_AGENT_OPS: ProfileId = 'ai-agent-ops';
23
-
24
- const API_V1 = '/api/v1';
25
- const PROJECT_AGENTS_PATH = `${API_V1}/projects/{projectUuid}/aiAgents`;
26
- const PROJECT_AGENT_PATH = `${PROJECT_AGENTS_PATH}/{agentUuid}`;
27
-
28
- const adminListAgents = defineOperation({
29
- id: 'ai-agents.admin.agents.list',
30
- summary: 'List all AI agents across the organization (admin)',
31
- http: { method: 'GET', path: `${API_V1}/aiAgents/admin/agents` },
32
- authorization: { safetyImpact: IMPACT_READ },
33
- sensitivity: 'none',
34
- mcp: {
35
- toolName: 'list_admin_agents',
36
- annotations: READ_ONLY_DEFAULT,
37
- taskSupport: { exposed: false, taskEligible: false },
38
- },
39
- cli: { commandPath: 'ai-agents list' },
40
- profiles: [],
41
- });
42
-
43
- const adminListThreads = defineOperation({
44
- id: 'ai-agents.admin.threads.list',
45
- summary: 'List AI agent threads across the organization with optional filters (admin)',
46
- http: { method: 'GET', path: `${API_V1}/aiAgents/admin/threads` },
47
- authorization: { safetyImpact: IMPACT_READ },
48
- sensitivity: 'none',
49
- mcp: {
50
- toolName: 'list_admin_agent_threads',
51
- annotations: READ_ONLY_DEFAULT,
52
- taskSupport: { exposed: false, taskEligible: false },
53
- },
54
- cli: { commandPath: 'ai-agents threads' },
55
- profiles: [],
56
- });
57
-
58
- const adminSettingsGet = defineOperation({
59
- id: 'ai-agents.admin.settings.get',
60
- summary: 'Get AI organization settings (admin)',
61
- http: { method: 'GET', path: `${API_V1}/aiAgents/admin/settings` },
62
- authorization: { safetyImpact: IMPACT_READ },
63
- sensitivity: 'none',
64
- mcp: {
65
- toolName: 'get_ai_organization_settings',
66
- annotations: READ_ONLY_DEFAULT,
67
- taskSupport: { exposed: false, taskEligible: false },
68
- },
69
- cli: { commandPath: 'ai-agents settings get' },
70
- profiles: [],
71
- });
72
-
73
- const adminSettingsUpdate = defineOperation({
74
- id: 'ai-agents.admin.settings.update',
75
- summary: 'Update AI organization settings (admin)',
76
- http: { method: 'PATCH', path: `${API_V1}/aiAgents/admin/settings` },
77
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
78
- sensitivity: 'none',
79
- mcp: {
80
- toolName: 'update_ai_organization_settings',
81
- annotations: WRITE_IDEMPOTENT,
82
- taskSupport: { exposed: false, taskEligible: false },
83
- },
84
- cli: { commandPath: 'ai-agents settings update' },
85
- profiles: [],
86
- });
87
-
88
- const projectAgentsList = defineOperation({
89
- id: 'ai-agents.project.agents.list',
90
- summary: 'List all AI agents in a project',
91
- http: { method: 'GET', path: PROJECT_AGENTS_PATH },
92
- authorization: { safetyImpact: IMPACT_READ },
93
- sensitivity: 'none',
94
- mcp: {
95
- toolName: 'list_project_agents',
96
- annotations: READ_ONLY_DEFAULT,
97
- taskSupport: { exposed: true, taskEligible: false },
98
- },
99
- cli: { commandPath: 'agents list' },
100
- profiles: [PROFILE_AI_AGENT_OPS],
101
- });
102
-
103
- const projectAgentsGet = defineOperation({
104
- id: 'ai-agents.project.agents.get',
105
- summary: 'Get a single AI agent in a project',
106
- http: { method: 'GET', path: PROJECT_AGENT_PATH },
107
- authorization: { safetyImpact: IMPACT_READ },
108
- sensitivity: 'none',
109
- mcp: {
110
- toolName: 'get_project_agent',
111
- annotations: READ_ONLY_DEFAULT,
112
- taskSupport: { exposed: true, taskEligible: false },
113
- },
114
- cli: { commandPath: 'agents get' },
115
- profiles: [PROFILE_AI_AGENT_OPS],
116
- });
117
-
118
- const projectAgentsCreate = defineOperation({
119
- id: 'ai-agents.project.agents.create',
120
- summary: 'Create a new AI agent in a project',
121
- http: { method: 'POST', path: PROJECT_AGENTS_PATH },
122
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
123
- sensitivity: 'none',
124
- mcp: {
125
- toolName: 'create_project_agent',
126
- annotations: WRITE_NONDESTRUCTIVE,
127
- taskSupport: { exposed: false, taskEligible: false },
128
- },
129
- cli: { commandPath: 'agents create' },
130
- profiles: [],
131
- });
132
-
133
- const projectAgentsUpdate = defineOperation({
134
- id: 'ai-agents.project.agents.update',
135
- summary: 'Update an existing AI agent in a project',
136
- http: { method: 'PATCH', path: PROJECT_AGENT_PATH },
137
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
138
- sensitivity: 'none',
139
- mcp: {
140
- toolName: 'update_project_agent',
141
- annotations: WRITE_NONDESTRUCTIVE,
142
- taskSupport: { exposed: false, taskEligible: false },
143
- },
144
- cli: { commandPath: 'agents update' },
145
- profiles: [],
146
- });
147
-
148
- const projectAgentsDelete = defineOperation({
149
- id: 'ai-agents.project.agents.delete',
150
- summary: 'Delete an AI agent from a project',
151
- http: { method: 'DELETE', path: PROJECT_AGENT_PATH },
152
- authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
153
- sensitivity: 'none',
154
- mcp: {
155
- toolName: 'delete_project_agent',
156
- annotations: WRITE_DESTRUCTIVE,
157
- taskSupport: { exposed: false, taskEligible: false },
158
- },
159
- cli: { commandPath: 'agents delete' },
160
- profiles: [],
161
- });
162
-
163
- const PROJECT_AGENT_THREADS_PATH = `${PROJECT_AGENT_PATH}/threads`;
164
-
165
- const threadsList = defineOperation({
166
- id: 'ai-agents.project.threads.list',
167
- summary: 'List conversation threads for an agent',
168
- http: {
169
- method: 'GET',
170
- path: PROJECT_AGENT_THREADS_PATH,
171
- },
172
- authorization: { safetyImpact: IMPACT_READ },
173
- sensitivity: 'none',
174
- mcp: {
175
- toolName: 'list_agent_threads',
176
- annotations: READ_ONLY_DEFAULT,
177
- taskSupport: { exposed: true, taskEligible: false },
178
- },
179
- cli: { commandPath: 'agents threads list' },
180
- profiles: [PROFILE_AI_AGENT_OPS],
181
- });
182
-
183
- const PROJECT_AGENT_THREAD_PATH = `${PROJECT_AGENT_THREADS_PATH}/{threadUuid}`;
184
-
185
- const threadsGet = defineOperation({
186
- id: 'ai-agents.project.threads.get',
187
- summary: 'Get a conversation thread with all messages',
188
- http: {
189
- method: 'GET',
190
- path: PROJECT_AGENT_THREAD_PATH,
191
- },
192
- authorization: { safetyImpact: IMPACT_READ },
193
- sensitivity: 'none',
194
- mcp: {
195
- toolName: 'get_agent_thread',
196
- annotations: READ_ONLY_DEFAULT,
197
- taskSupport: { exposed: true, taskEligible: false },
198
- },
199
- cli: { commandPath: 'agents threads get' },
200
- profiles: [PROFILE_AI_AGENT_OPS],
201
- });
202
-
203
- const PROJECT_AGENT_THREAD_MESSAGES_PATH = `${PROJECT_AGENT_THREAD_PATH}/messages`;
204
- const PROJECT_AGENT_THREAD_GENERATE_PATH = `${PROJECT_AGENT_THREAD_PATH}/generate`;
205
-
206
- const threadsStart = defineOperation({
207
- id: 'ai-agents.project.threads.start',
208
- summary:
209
- 'Start a new conversation (client workflow: create thread, add message, generate response)',
210
- http: {
211
- method: 'POST',
212
- path: PROJECT_AGENT_THREADS_PATH,
213
- },
214
- workflow: [
215
- {
216
- method: 'POST',
217
- path: PROJECT_AGENT_THREADS_PATH,
218
- summary: 'Create thread',
219
- },
220
- {
221
- method: 'POST',
222
- path: PROJECT_AGENT_THREAD_MESSAGES_PATH,
223
- summary: 'Add user message',
224
- },
225
- {
226
- method: 'POST',
227
- path: PROJECT_AGENT_THREAD_GENERATE_PATH,
228
- summary: 'Generate agent response',
229
- },
230
- ],
231
- authorization: { safetyImpact: IMPACT_EXTERNAL },
232
- sensitivity: 'none',
233
- mcp: {
234
- toolName: 'generate_agent_message',
235
- annotations: WRITE_OPEN_WORLD,
236
- taskSupport: { exposed: false, taskEligible: true },
237
- },
238
- cli: { commandPath: 'agents threads start' },
239
- profiles: [],
240
- });
241
-
242
- const threadsContinue = defineOperation({
243
- id: 'ai-agents.project.threads.continue',
244
- summary: 'Continue an existing conversation (client workflow: add message, generate response)',
245
- http: {
246
- method: 'POST',
247
- path: PROJECT_AGENT_THREAD_GENERATE_PATH,
248
- },
249
- workflow: [
250
- {
251
- method: 'POST',
252
- path: PROJECT_AGENT_THREAD_MESSAGES_PATH,
253
- summary: 'Add user message',
254
- },
255
- {
256
- method: 'POST',
257
- path: PROJECT_AGENT_THREAD_GENERATE_PATH,
258
- summary: 'Generate agent response',
259
- },
260
- ],
261
- authorization: { safetyImpact: IMPACT_EXTERNAL },
262
- sensitivity: 'none',
263
- mcp: {
264
- toolName: 'continue_agent_thread',
265
- annotations: WRITE_OPEN_WORLD,
266
- taskSupport: { exposed: false, taskEligible: true },
267
- },
268
- cli: { commandPath: 'agents threads continue' },
269
- profiles: [],
270
- });
271
-
272
- const PROJECT_AGENT_EVALUATIONS_PATH = `${PROJECT_AGENT_PATH}/evaluations`;
273
-
274
- const evaluationsList = defineOperation({
275
- id: 'ai-agents.project.evaluations.list',
276
- summary: 'List all evaluations for an agent',
277
- http: {
278
- method: 'GET',
279
- path: PROJECT_AGENT_EVALUATIONS_PATH,
280
- },
281
- authorization: { safetyImpact: IMPACT_READ },
282
- sensitivity: 'none',
283
- mcp: {
284
- toolName: 'list_agent_evaluations',
285
- annotations: READ_ONLY_DEFAULT,
286
- taskSupport: { exposed: true, taskEligible: false },
287
- },
288
- cli: { commandPath: 'agents evals list' },
289
- profiles: [PROFILE_AI_AGENT_OPS],
290
- });
291
-
292
- const PROJECT_AGENT_EVALUATION_PATH = `${PROJECT_AGENT_EVALUATIONS_PATH}/{evalUuid}`;
293
-
294
- const evaluationsGet = defineOperation({
295
- id: 'ai-agents.project.evaluations.get',
296
- summary: 'Get a full evaluation including test prompts',
297
- http: {
298
- method: 'GET',
299
- path: PROJECT_AGENT_EVALUATION_PATH,
300
- },
301
- authorization: { safetyImpact: IMPACT_READ },
302
- sensitivity: 'none',
303
- mcp: {
304
- toolName: 'get_agent_evaluation',
305
- annotations: READ_ONLY_DEFAULT,
306
- taskSupport: { exposed: true, taskEligible: false },
307
- },
308
- cli: { commandPath: 'agents evals get' },
309
- profiles: [PROFILE_AI_AGENT_OPS],
310
- });
311
-
312
- const evaluationsCreate = defineOperation({
313
- id: 'ai-agents.project.evaluations.create',
314
- summary: 'Create a new evaluation test suite for an agent',
315
- http: {
316
- method: 'POST',
317
- path: PROJECT_AGENT_EVALUATIONS_PATH,
318
- },
319
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
320
- sensitivity: 'none',
321
- mcp: {
322
- toolName: 'create_agent_evaluation',
323
- annotations: WRITE_NONDESTRUCTIVE,
324
- taskSupport: { exposed: true, taskEligible: false },
325
- },
326
- cli: { commandPath: 'agents evals create' },
327
- profiles: [PROFILE_AI_AGENT_OPS],
328
- });
329
-
330
- const evaluationsUpdate = defineOperation({
331
- id: 'ai-agents.project.evaluations.update',
332
- summary: 'Update an evaluation title, description, or prompts',
333
- http: {
334
- method: 'PATCH',
335
- path: PROJECT_AGENT_EVALUATION_PATH,
336
- },
337
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
338
- sensitivity: 'none',
339
- mcp: {
340
- toolName: 'update_agent_evaluation',
341
- annotations: WRITE_NONDESTRUCTIVE,
342
- taskSupport: { exposed: true, taskEligible: false },
343
- },
344
- cli: { commandPath: 'agents evals update' },
345
- profiles: [PROFILE_AI_AGENT_OPS],
346
- });
347
-
348
- const evaluationsAppend = defineOperation({
349
- id: 'ai-agents.project.evaluations.append',
350
- summary: 'Append additional prompts to an existing evaluation',
351
- http: {
352
- method: 'POST',
353
- path: `${PROJECT_AGENT_EVALUATION_PATH}/append`,
354
- },
355
- authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
356
- sensitivity: 'none',
357
- mcp: {
358
- toolName: 'append_agent_evaluation_prompts',
359
- annotations: WRITE_NONDESTRUCTIVE,
360
- taskSupport: { exposed: true, taskEligible: false },
361
- },
362
- cli: { commandPath: 'agents evals append' },
363
- profiles: [PROFILE_AI_AGENT_OPS],
364
- });
365
-
366
- const evaluationsDelete = defineOperation({
367
- id: 'ai-agents.project.evaluations.delete',
368
- summary: 'Delete an evaluation and all its runs',
369
- http: {
370
- method: 'DELETE',
371
- path: PROJECT_AGENT_EVALUATION_PATH,
372
- },
373
- authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
374
- sensitivity: 'none',
375
- mcp: {
376
- toolName: 'delete_agent_evaluation',
377
- annotations: WRITE_DESTRUCTIVE,
378
- taskSupport: { exposed: true, taskEligible: false },
379
- },
380
- cli: { commandPath: 'agents evals delete' },
381
- profiles: [PROFILE_AI_AGENT_OPS],
382
- });
383
-
384
- const evaluationsRun = defineOperation({
385
- id: 'ai-agents.project.evaluations.run',
386
- summary: 'Trigger a new evaluation run for an agent',
387
- http: {
388
- method: 'POST',
389
- path: `${PROJECT_AGENT_EVALUATION_PATH}/run`,
390
- },
391
- authorization: { safetyImpact: IMPACT_EXTERNAL },
392
- sensitivity: 'none',
393
- mcp: {
394
- toolName: 'run_agent_evaluation',
395
- annotations: WRITE_OPEN_WORLD,
396
- taskSupport: { exposed: true, taskEligible: true },
397
- },
398
- cli: { commandPath: 'agents evals run' },
399
- profiles: [PROFILE_AI_AGENT_OPS],
400
- });
401
-
402
- const PROJECT_AGENT_EVALUATION_RUNS_PATH = `${PROJECT_AGENT_EVALUATION_PATH}/runs`;
403
-
404
- const evaluationsRunsList = defineOperation({
405
- id: 'ai-agents.project.evaluations.runs.list',
406
- summary: 'List all runs for an evaluation with status and pass/fail counts',
407
- http: {
408
- method: 'GET',
409
- path: PROJECT_AGENT_EVALUATION_RUNS_PATH,
410
- },
411
- authorization: { safetyImpact: IMPACT_READ },
412
- sensitivity: 'none',
413
- mcp: {
414
- toolName: 'list_agent_evaluation_runs',
415
- annotations: READ_ONLY_DEFAULT,
416
- taskSupport: { exposed: true, taskEligible: false },
417
- },
418
- cli: { commandPath: 'agents evals runs' },
419
- profiles: [PROFILE_AI_AGENT_OPS],
420
- });
421
-
422
- const evaluationsRunResultsGet = defineOperation({
423
- id: 'ai-agents.project.evaluations.runs.get',
424
- summary: 'Get detailed per-prompt results for a specific evaluation run',
425
- http: {
426
- method: 'GET',
427
- path: `${PROJECT_AGENT_EVALUATION_RUNS_PATH}/{runUuid}`,
428
- },
429
- authorization: { safetyImpact: IMPACT_READ },
430
- sensitivity: 'none',
431
- mcp: {
432
- toolName: 'get_agent_eval_run_results',
433
- annotations: READ_ONLY_DEFAULT,
434
- taskSupport: { exposed: true, taskEligible: false },
435
- },
436
- cli: { commandPath: 'agents evals run-results' },
437
- profiles: [PROFILE_AI_AGENT_OPS],
438
- });
439
-
440
- const evaluateAgentReadiness = defineOperation({
441
- id: 'ai-agents.project.agents.evaluate-readiness',
442
- summary: 'Evaluate release readiness score for an agent (not an evaluation-suite run)',
443
- http: {
444
- method: 'POST',
445
- path: `${PROJECT_AGENT_PATH}/evaluateReadiness`,
446
- },
447
- authorization: { safetyImpact: IMPACT_READ },
448
- sensitivity: 'none',
449
- mcp: {
450
- toolName: 'evaluate_agent_readiness',
451
- annotations: READ_ONLY_DEFAULT,
452
- taskSupport: { exposed: true, taskEligible: false },
453
- },
454
- cli: { commandPath: 'agents readiness evaluate' },
455
- profiles: [PROFILE_AI_AGENT_OPS],
456
- });
457
-
458
- const getAgentSuggestions = defineOperation({
459
- id: 'ai-agents.project.agents.suggestions',
460
- summary: 'List suggestion chips for an agent',
461
- http: {
462
- method: 'GET',
463
- path: `${PROJECT_AGENT_PATH}/suggestions`,
464
- },
465
- authorization: { safetyImpact: IMPACT_READ },
466
- sensitivity: 'none',
467
- mcp: {
468
- toolName: 'get_agent_suggestions',
469
- annotations: READ_ONLY_DEFAULT,
470
- taskSupport: { exposed: true, taskEligible: false },
471
- },
472
- cli: { commandPath: 'agents suggestions' },
473
- profiles: [PROFILE_AI_AGENT_OPS],
474
- });
475
-
476
- const getAgentModels = defineOperation({
477
- id: 'ai-agents.project.agents.models',
478
- summary: 'List available AI model options for an agent',
479
- http: {
480
- method: 'GET',
481
- path: `${PROJECT_AGENT_PATH}/models`,
482
- },
483
- authorization: { safetyImpact: IMPACT_READ },
484
- sensitivity: 'none',
485
- mcp: {
486
- toolName: 'get_agent_models',
487
- annotations: READ_ONLY_DEFAULT,
488
- taskSupport: { exposed: true, taskEligible: false },
489
- },
490
- cli: { commandPath: 'agents models' },
491
- profiles: [PROFILE_AI_AGENT_OPS],
492
- });
493
-
494
- const getExploreAccessSummary = defineOperation({
495
- id: 'ai-agents.project.explore-access-summary',
496
- summary: 'Summarize explore access for tag-filtered explores',
497
- http: {
498
- method: 'POST',
499
- path: `${PROJECT_AGENTS_PATH}/explore-access-summary`,
500
- },
501
- authorization: { safetyImpact: IMPACT_READ },
502
- sensitivity: 'none',
503
- mcp: {
504
- toolName: 'get_explore_access_summary',
505
- annotations: READ_ONLY_DEFAULT,
506
- taskSupport: { exposed: true, taskEligible: false },
507
- },
508
- profiles: [PROFILE_AI_AGENT_OPS],
509
- });
510
-
511
- /** All registered P0 AI agent operations. */
512
- export const AI_AGENT_OPERATIONS: readonly OperationDescriptor[] = [
513
- adminListAgents,
514
- adminListThreads,
515
- adminSettingsGet,
516
- adminSettingsUpdate,
517
- projectAgentsList,
518
- projectAgentsGet,
519
- projectAgentsCreate,
520
- projectAgentsUpdate,
521
- projectAgentsDelete,
522
- evaluateAgentReadiness,
523
- getAgentSuggestions,
524
- getAgentModels,
525
- getExploreAccessSummary,
526
- threadsList,
527
- threadsGet,
528
- threadsStart,
529
- threadsContinue,
530
- evaluationsList,
531
- evaluationsGet,
532
- evaluationsCreate,
533
- evaluationsUpdate,
534
- evaluationsAppend,
535
- evaluationsDelete,
536
- evaluationsRun,
537
- evaluationsRunsList,
538
- evaluationsRunResultsGet,
539
- ];
@@ -1,76 +0,0 @@
1
- /**
2
- * CLI content/validation operations (ADR-0013). Catalog metadata only — not MCP tools.
3
- */
4
-
5
- import { defineOperation } from './types';
6
-
7
- import type { OperationDescriptor } from './types';
8
-
9
- const chartsList = defineOperation({
10
- id: 'cli.charts.list',
11
- summary: 'List charts in a project (Commander alias of charts-as-code list)',
12
- http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/code/charts' },
13
- authorization: { safetyImpact: 'read' },
14
- sensitivity: 'none',
15
- cli: { commandPath: 'projects charts list' },
16
- profiles: [],
17
- });
18
-
19
- const chartsCodeList = 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: [],
27
- });
28
-
29
- const chartsCodeUpsert = defineOperation({
30
- id: 'cli.charts.code.upsert',
31
- summary: 'Create or update chart by slug',
32
- http: { method: 'POST', path: '/api/v1/projects/{projectUuid}/code/charts/{slug}' },
33
- authorization: { safetyImpact: 'write-nondestructive' },
34
- sensitivity: 'none',
35
- cli: { commandPath: 'projects charts code upsert' },
36
- profiles: [],
37
- });
38
-
39
- const dashboardsList = defineOperation({
40
- id: 'cli.dashboards.list',
41
- summary: 'List dashboards in a project',
42
- http: { method: 'GET', path: '/api/v1/projects/{projectUuid}/dashboards' },
43
- authorization: { safetyImpact: 'read' },
44
- sensitivity: 'none',
45
- cli: { commandPath: 'projects dashboards list' },
46
- profiles: [],
47
- });
48
-
49
- const validateRun = defineOperation({
50
- id: 'cli.projects.validate.run',
51
- summary: 'Start project validation job',
52
- http: { method: 'POST', path: '/api/v1/projects/{projectUuid}/validate' },
53
- authorization: { safetyImpact: 'write-nondestructive' },
54
- sensitivity: 'none',
55
- cli: { commandPath: 'projects validate run' },
56
- profiles: [],
57
- });
58
-
59
- const validateResults = defineOperation({
60
- id: 'cli.projects.validate.results',
61
- summary: 'List project validation results (v2, paginated)',
62
- http: { method: 'GET', path: '/api/v2/projects/{projectUuid}/validate' },
63
- authorization: { safetyImpact: 'read' },
64
- sensitivity: 'none',
65
- cli: { commandPath: 'projects validate results' },
66
- profiles: [],
67
- });
68
-
69
- export const CLI_CONTENT_OPERATIONS: readonly OperationDescriptor[] = [
70
- chartsList,
71
- chartsCodeList,
72
- chartsCodeUpsert,
73
- dashboardsList,
74
- validateRun,
75
- validateResults,
76
- ];
@@ -1,23 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
-
3
- import { OPERATION_CLIENT_METHOD_MAP, getClientMethodForOperation } from './client-coverage';
4
- import { listOperations } from './registry';
5
-
6
- describe('operation client coverage', () => {
7
- it('maps every catalogued operation to a client method or composed ref', () => {
8
- const missing: string[] = [];
9
- for (const operation of listOperations()) {
10
- const method = getClientMethodForOperation(operation.id);
11
- if (method === undefined || method.trim().length === 0) {
12
- missing.push(operation.id);
13
- }
14
- }
15
- expect(missing).toEqual([]);
16
- });
17
-
18
- it('does not leave stale coverage entries for removed operations', () => {
19
- const catalogIds = new Set(listOperations().map((operation) => operation.id));
20
- const stale = Object.keys(OPERATION_CLIENT_METHOD_MAP).filter((id) => !catalogIds.has(id));
21
- expect(stale).toEqual([]);
22
- });
23
- });