@lightdash-tools/common 0.7.0 → 0.8.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/argument-validation.js +20 -2
- package/dist/argument-validation.test.js +22 -0
- package/dist/audit.d.ts +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +6 -8
- package/dist/operations/agent-safe.d.ts +1 -3
- package/dist/operations/agent-safe.js +2 -9
- package/dist/operations/ai-agents.js +45 -29
- package/dist/operations/cli-content.d.ts +5 -0
- package/dist/operations/cli-content.js +71 -0
- package/dist/operations/client-coverage.d.ts +113 -0
- package/dist/operations/client-coverage.js +130 -0
- package/dist/operations/client-coverage.test.d.ts +1 -0
- package/dist/operations/client-coverage.test.js +22 -0
- package/dist/operations/content-developer.d.ts +2 -0
- package/dist/operations/content-developer.js +457 -0
- package/dist/operations/content-governance.d.ts +7 -0
- package/dist/operations/content-governance.js +98 -0
- package/dist/operations/content-reader.d.ts +2 -0
- package/dist/operations/content-reader.js +183 -0
- package/dist/operations/index.d.ts +10 -3
- package/dist/operations/index.js +20 -2
- package/dist/operations/organization-audit.d.ts +2 -0
- package/dist/operations/organization-audit.js +273 -0
- package/dist/operations/parity.test.js +12 -11
- package/dist/operations/registry.d.ts +9 -1
- package/dist/operations/registry.js +77 -2
- package/dist/operations/registry.test.js +38 -11
- package/dist/operations/semantic-layer.d.ts +6 -0
- package/dist/operations/semantic-layer.js +154 -0
- package/dist/operations/types.d.ts +29 -12
- package/dist/operations/types.js +63 -29
- package/dist/operations/types.test.js +33 -45
- package/dist/operations/users.d.ts +2 -2
- package/dist/operations/users.js +8 -10
- package/dist/safety.d.ts +5 -0
- package/dist/safety.js +11 -1
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +29 -0
- package/package.json +2 -1
- package/src/argument-validation.test.ts +31 -0
- package/src/argument-validation.ts +20 -2
- package/src/audit.ts +12 -1
- package/src/index.ts +5 -9
- package/src/operations/agent-safe.ts +2 -12
- package/src/operations/ai-agents.ts +46 -30
- package/src/operations/cli-content.ts +79 -0
- package/src/operations/client-coverage.test.ts +23 -0
- package/src/operations/client-coverage.ts +147 -0
- package/src/operations/content-developer.ts +485 -0
- package/src/operations/content-governance.ts +110 -0
- package/src/operations/content-reader.ts +197 -0
- package/src/operations/index.ts +25 -2
- package/src/operations/organization-audit.ts +293 -0
- package/src/operations/parity.test.ts +12 -14
- package/src/operations/registry.test.ts +40 -9
- package/src/operations/registry.ts +86 -2
- package/src/operations/semantic-layer.ts +166 -0
- package/src/operations/types.test.ts +38 -76
- package/src/operations/types.ts +110 -47
- package/src/operations/users.ts +9 -11
- package/src/safety.ts +11 -0
- package/src/types/index.ts +13 -0
|
@@ -22,6 +22,8 @@ exports.RESOURCE_ID_KEYS = new Set([
|
|
|
22
22
|
'runUuid',
|
|
23
23
|
'artifactUuid',
|
|
24
24
|
'versionUuid',
|
|
25
|
+
'versionUuidA',
|
|
26
|
+
'versionUuidB',
|
|
25
27
|
'mcpServerUuid',
|
|
26
28
|
'toolCallId',
|
|
27
29
|
'fingerprint',
|
|
@@ -32,14 +34,30 @@ exports.RESOURCE_ID_KEYS = new Set([
|
|
|
32
34
|
'spaceUuid',
|
|
33
35
|
'spaceUuids',
|
|
34
36
|
'parentSpaceUuid',
|
|
37
|
+
'targetSpaceUuid',
|
|
38
|
+
'itemUuids',
|
|
35
39
|
'roleUuid',
|
|
36
40
|
'dashboardUuid',
|
|
41
|
+
'dashboardUuidOrSlug',
|
|
42
|
+
'sourceDashboardUuid',
|
|
37
43
|
'schedulerUuid',
|
|
38
44
|
'organizationUuid',
|
|
39
45
|
'chartUuid',
|
|
46
|
+
'chartUuidOrSlug',
|
|
47
|
+
'sourceChartUuidOrSlug',
|
|
48
|
+
'contentUuidOrSlug',
|
|
49
|
+
'tileUuid',
|
|
50
|
+
'newSlug',
|
|
40
51
|
]);
|
|
41
52
|
/** Keys that accept OpenAPI UuidOrSlug (UUID or slug), not UUID-only. */
|
|
42
|
-
const UUID_OR_SLUG_KEYS = new Set([
|
|
53
|
+
const UUID_OR_SLUG_KEYS = new Set([
|
|
54
|
+
'dashboardUuid',
|
|
55
|
+
'dashboardUuidOrSlug',
|
|
56
|
+
'chartUuid',
|
|
57
|
+
'chartUuidOrSlug',
|
|
58
|
+
'sourceChartUuidOrSlug',
|
|
59
|
+
'contentUuidOrSlug',
|
|
60
|
+
]);
|
|
43
61
|
function isMissing(value) {
|
|
44
62
|
return value === undefined || value === null;
|
|
45
63
|
}
|
|
@@ -121,7 +139,7 @@ function validateBySemanticType(value, semanticType, name) {
|
|
|
121
139
|
}
|
|
122
140
|
}
|
|
123
141
|
function validateResourceIdValue(key, value) {
|
|
124
|
-
if (key === 'slug') {
|
|
142
|
+
if (key === 'slug' || key === 'newSlug') {
|
|
125
143
|
(0, input_validation_1.validateSlug)(value);
|
|
126
144
|
return;
|
|
127
145
|
}
|
|
@@ -10,12 +10,17 @@ const VALID_UUID = '550e8400-e29b-41d4-a716-446655440000';
|
|
|
10
10
|
'agentUuid',
|
|
11
11
|
'artifactUuid',
|
|
12
12
|
'chartUuid',
|
|
13
|
+
'chartUuidOrSlug',
|
|
14
|
+
'contentUuidOrSlug',
|
|
13
15
|
'dashboardUuid',
|
|
16
|
+
'dashboardUuidOrSlug',
|
|
14
17
|
'evalUuid',
|
|
15
18
|
'fingerprint',
|
|
16
19
|
'groupUuid',
|
|
20
|
+
'itemUuids',
|
|
17
21
|
'mcpServerUuid',
|
|
18
22
|
'messageUuid',
|
|
23
|
+
'newSlug',
|
|
19
24
|
'organizationUuid',
|
|
20
25
|
'parentSpaceUuid',
|
|
21
26
|
'project',
|
|
@@ -28,12 +33,18 @@ const VALID_UUID = '550e8400-e29b-41d4-a716-446655440000';
|
|
|
28
33
|
'savedQueryUuid',
|
|
29
34
|
'schedulerUuid',
|
|
30
35
|
'slug',
|
|
36
|
+
'sourceChartUuidOrSlug',
|
|
37
|
+
'sourceDashboardUuid',
|
|
31
38
|
'spaceUuid',
|
|
32
39
|
'spaceUuids',
|
|
40
|
+
'targetSpaceUuid',
|
|
33
41
|
'threadUuid',
|
|
42
|
+
'tileUuid',
|
|
34
43
|
'toolCallId',
|
|
35
44
|
'userUuid',
|
|
36
45
|
'versionUuid',
|
|
46
|
+
'versionUuidA',
|
|
47
|
+
'versionUuidB',
|
|
37
48
|
].sort());
|
|
38
49
|
});
|
|
39
50
|
});
|
|
@@ -145,6 +156,17 @@ const VALID_UUID = '550e8400-e29b-41d4-a716-446655440000';
|
|
|
145
156
|
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({ dashboardUuid: 'bad?' })).toThrow('Slug must contain only alphanumeric characters');
|
|
146
157
|
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({ dashboardUuid: '..' })).toThrow('Slug must not contain path traversal segments');
|
|
147
158
|
});
|
|
159
|
+
(0, vitest_1.it)('validates chartUuidOrSlug/dashboardUuidOrSlug and itemUuids/targetSpaceUuid', () => {
|
|
160
|
+
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({
|
|
161
|
+
chartUuidOrSlug: 'my-chart',
|
|
162
|
+
dashboardUuidOrSlug: VALID_UUID,
|
|
163
|
+
itemUuids: [VALID_UUID],
|
|
164
|
+
targetSpaceUuid: VALID_UUID,
|
|
165
|
+
})).not.toThrow();
|
|
166
|
+
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({ itemUuids: [VALID_UUID, 'bad-uuid'] })).toThrow('Invalid UUID format');
|
|
167
|
+
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({ targetSpaceUuid: 'bad?' })).toThrow('Invalid UUID format');
|
|
168
|
+
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({ chartUuidOrSlug: 'bad?' })).toThrow('Slug must contain only alphanumeric characters');
|
|
169
|
+
});
|
|
148
170
|
(0, vitest_1.it)('validates spaceUuids and parentSpaceUuid as UUIDs', () => {
|
|
149
171
|
(0, vitest_1.expect)(() => (0, argument_validation_1.validateResourceIdsInObject)({
|
|
150
172
|
spaceUuids: [VALID_UUID],
|
package/dist/audit.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - If LIGHTDASH_TOOLS_AUDIT_LOG is set to a file path, entries are appended to that file.
|
|
10
10
|
* - Otherwise entries are written to stderr with an "[audit]" prefix.
|
|
11
11
|
*/
|
|
12
|
-
export type AuditStatus = 'blocked' | 'error' | 'success';
|
|
12
|
+
export type AuditStatus = 'blocked' | 'confirmation_cancelled' | 'confirmation_declined' | 'confirmation_requested' | 'deletion_failed' | 'deletion_succeeded' | 'error' | 'promotion_failed' | 'promotion_succeeded' | 'resource_changed' | 'success';
|
|
13
13
|
export type AuditLogEntry = {
|
|
14
14
|
timestamp: string;
|
|
15
15
|
sessionId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,4 @@ export * from './agentops/snapshots';
|
|
|
9
9
|
export * from './agentops/formatters';
|
|
10
10
|
export { extractProjectUuidsFromToolArgs, hasYamlProjectDocumentArgs, } from './agentops/extract-yaml-project';
|
|
11
11
|
export * from './audit';
|
|
12
|
-
export * from './types
|
|
13
|
-
export { CONTENT_SORT_BY_COLUMNS } from './types/v2/content';
|
|
14
|
-
export type { paths, components, operations } from './types/generated/openapi-types';
|
|
12
|
+
export * from './types';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.hasYamlProjectDocumentArgs = exports.extractProjectUuidsFromToolArgs = void 0;
|
|
18
18
|
exports.greet = greet;
|
|
19
19
|
function greet(name) {
|
|
20
20
|
return `Hello, ${name}!`;
|
|
@@ -25,11 +25,11 @@ __exportStar(require("./env"), exports);
|
|
|
25
25
|
__exportStar(require("./safety"), exports);
|
|
26
26
|
// Export input validation
|
|
27
27
|
__exportStar(require("./input-validation"), exports);
|
|
28
|
-
// Export argument / descriptor validation
|
|
28
|
+
// Export argument / descriptor validation
|
|
29
29
|
__exportStar(require("./argument-validation"), exports);
|
|
30
|
-
// Export shared typed operation
|
|
30
|
+
// Export shared typed operation catalog (ADR-0013)
|
|
31
31
|
__exportStar(require("./operations"), exports);
|
|
32
|
-
// Export AgentOps bundle and gate types
|
|
32
|
+
// Export AgentOps bundle and gate types
|
|
33
33
|
__exportStar(require("./agentops/types"), exports);
|
|
34
34
|
__exportStar(require("./agentops/snapshots"), exports);
|
|
35
35
|
__exportStar(require("./agentops/formatters"), exports);
|
|
@@ -38,7 +38,5 @@ Object.defineProperty(exports, "extractProjectUuidsFromToolArgs", { enumerable:
|
|
|
38
38
|
Object.defineProperty(exports, "hasYamlProjectDocumentArgs", { enumerable: true, get: function () { return extract_yaml_project_1.hasYamlProjectDocumentArgs; } });
|
|
39
39
|
// Export audit logger (shared by MCP and CLI)
|
|
40
40
|
__exportStar(require("./audit"), exports);
|
|
41
|
-
//
|
|
42
|
-
__exportStar(require("./types
|
|
43
|
-
var content_1 = require("./types/v2/content");
|
|
44
|
-
Object.defineProperty(exports, "CONTENT_SORT_BY_COLUMNS", { enumerable: true, get: function () { return content_1.CONTENT_SORT_BY_COLUMNS; } });
|
|
41
|
+
// Curated Lightdash API types + generated OpenAPI shapes (single public path)
|
|
42
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent-safe surface policy helpers (ADR-0004).
|
|
2
|
+
* Agent-safe surface policy helpers (ADR-0004 / ADR-0013).
|
|
3
3
|
*/
|
|
4
|
-
/** MCP tool names that must never be registered, derived from client-only registry entries. */
|
|
5
|
-
export declare function listBannedMcpToolNames(): readonly string[];
|
|
6
4
|
/** Banned MCP tool names (without `lightdash_` prefix) for regression tests. */
|
|
7
5
|
export declare const IRRECOVERABLE_TOOL_DENYLIST: readonly string[];
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Agent-safe surface policy helpers (ADR-0004).
|
|
3
|
+
* Agent-safe surface policy helpers (ADR-0004 / ADR-0013).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IRRECOVERABLE_TOOL_DENYLIST = void 0;
|
|
7
|
-
exports.listBannedMcpToolNames = listBannedMcpToolNames;
|
|
8
7
|
const registry_1 = require("./registry");
|
|
9
|
-
/** MCP tool names that must never be registered, derived from client-only registry entries. */
|
|
10
|
-
function listBannedMcpToolNames() {
|
|
11
|
-
return (0, registry_1.listOperations)()
|
|
12
|
-
.filter((operation) => operation.agentExposure === 'client-only' && operation.mcp.toolName.trim().length > 0)
|
|
13
|
-
.map((operation) => operation.mcp.toolName);
|
|
14
|
-
}
|
|
15
8
|
/** Banned MCP tool names (without `lightdash_` prefix) for regression tests. */
|
|
16
|
-
exports.IRRECOVERABLE_TOOL_DENYLIST = listBannedMcpToolNames();
|
|
9
|
+
exports.IRRECOVERABLE_TOOL_DENYLIST = (0, registry_1.listBannedMcpToolNames)();
|
|
@@ -22,10 +22,11 @@ const adminListAgents = (0, types_1.defineOperation)({
|
|
|
22
22
|
summary: 'List all AI agents across the organization (admin)',
|
|
23
23
|
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/agents` },
|
|
24
24
|
authorization: { safetyImpact: IMPACT_READ },
|
|
25
|
+
sensitivity: 'none',
|
|
25
26
|
mcp: {
|
|
26
27
|
toolName: 'list_admin_agents',
|
|
27
28
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
28
|
-
taskSupport: { exposed:
|
|
29
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
29
30
|
},
|
|
30
31
|
cli: { commandPath: 'ai-agents list' },
|
|
31
32
|
profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
|
|
@@ -35,10 +36,11 @@ const adminListThreads = (0, types_1.defineOperation)({
|
|
|
35
36
|
summary: 'List AI agent threads across the organization with optional filters (admin)',
|
|
36
37
|
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/threads` },
|
|
37
38
|
authorization: { safetyImpact: IMPACT_READ },
|
|
39
|
+
sensitivity: 'none',
|
|
38
40
|
mcp: {
|
|
39
41
|
toolName: 'list_admin_agent_threads',
|
|
40
42
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
41
|
-
taskSupport: { exposed:
|
|
43
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
42
44
|
},
|
|
43
45
|
cli: { commandPath: 'ai-agents threads' },
|
|
44
46
|
profiles: [PROFILE_DISCOVERY],
|
|
@@ -48,29 +50,25 @@ const adminSettingsGet = (0, types_1.defineOperation)({
|
|
|
48
50
|
summary: 'Get AI organization settings (admin)',
|
|
49
51
|
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/settings` },
|
|
50
52
|
authorization: { safetyImpact: IMPACT_READ },
|
|
53
|
+
sensitivity: 'none',
|
|
51
54
|
mcp: {
|
|
52
55
|
toolName: 'get_ai_organization_settings',
|
|
53
56
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
54
|
-
taskSupport: { exposed:
|
|
57
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
55
58
|
},
|
|
56
59
|
cli: { commandPath: 'ai-agents settings get' },
|
|
57
60
|
profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
|
|
58
61
|
});
|
|
59
|
-
const WRITE_SETTINGS_UPDATE = {
|
|
60
|
-
readOnlyHint: false,
|
|
61
|
-
openWorldHint: false,
|
|
62
|
-
destructiveHint: false,
|
|
63
|
-
idempotentHint: true,
|
|
64
|
-
};
|
|
65
62
|
const adminSettingsUpdate = (0, types_1.defineOperation)({
|
|
66
63
|
id: 'ai-agents.admin.settings.update',
|
|
67
64
|
summary: 'Update AI organization settings (admin)',
|
|
68
65
|
http: { method: 'PATCH', path: `${API_V1}/aiAgents/admin/settings` },
|
|
69
66
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
67
|
+
sensitivity: 'none',
|
|
70
68
|
mcp: {
|
|
71
69
|
toolName: 'update_ai_organization_settings',
|
|
72
|
-
annotations:
|
|
73
|
-
taskSupport: { exposed:
|
|
70
|
+
annotations: safety_1.WRITE_IDEMPOTENT,
|
|
71
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
74
72
|
},
|
|
75
73
|
cli: { commandPath: 'ai-agents settings update' },
|
|
76
74
|
profiles: [PROFILE_CORE_LIFECYCLE],
|
|
@@ -80,10 +78,11 @@ const projectAgentsList = (0, types_1.defineOperation)({
|
|
|
80
78
|
summary: 'List all AI agents in a project',
|
|
81
79
|
http: { method: 'GET', path: PROJECT_AGENTS_PATH },
|
|
82
80
|
authorization: { safetyImpact: IMPACT_READ },
|
|
81
|
+
sensitivity: 'none',
|
|
83
82
|
mcp: {
|
|
84
83
|
toolName: 'list_project_agents',
|
|
85
84
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
86
|
-
taskSupport: { exposed:
|
|
85
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
87
86
|
},
|
|
88
87
|
cli: { commandPath: 'agents list' },
|
|
89
88
|
profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
|
|
@@ -93,10 +92,11 @@ const projectAgentsGet = (0, types_1.defineOperation)({
|
|
|
93
92
|
summary: 'Get a single AI agent in a project',
|
|
94
93
|
http: { method: 'GET', path: PROJECT_AGENT_PATH },
|
|
95
94
|
authorization: { safetyImpact: IMPACT_READ },
|
|
95
|
+
sensitivity: 'none',
|
|
96
96
|
mcp: {
|
|
97
97
|
toolName: 'get_project_agent',
|
|
98
98
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
99
|
-
taskSupport: { exposed:
|
|
99
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
100
100
|
},
|
|
101
101
|
cli: { commandPath: 'agents get' },
|
|
102
102
|
profiles: [PROFILE_CORE_LIFECYCLE, PROFILE_DISCOVERY],
|
|
@@ -106,10 +106,11 @@ const projectAgentsCreate = (0, types_1.defineOperation)({
|
|
|
106
106
|
summary: 'Create a new AI agent in a project',
|
|
107
107
|
http: { method: 'POST', path: PROJECT_AGENTS_PATH },
|
|
108
108
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
109
|
+
sensitivity: 'none',
|
|
109
110
|
mcp: {
|
|
110
111
|
toolName: 'create_project_agent',
|
|
111
112
|
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
112
|
-
taskSupport: { exposed:
|
|
113
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
113
114
|
},
|
|
114
115
|
cli: { commandPath: 'agents create' },
|
|
115
116
|
profiles: [PROFILE_CORE_LIFECYCLE],
|
|
@@ -119,10 +120,11 @@ const projectAgentsUpdate = (0, types_1.defineOperation)({
|
|
|
119
120
|
summary: 'Update an existing AI agent in a project',
|
|
120
121
|
http: { method: 'PATCH', path: PROJECT_AGENT_PATH },
|
|
121
122
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
123
|
+
sensitivity: 'none',
|
|
122
124
|
mcp: {
|
|
123
125
|
toolName: 'update_project_agent',
|
|
124
126
|
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
125
|
-
taskSupport: { exposed:
|
|
127
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
126
128
|
},
|
|
127
129
|
cli: { commandPath: 'agents update' },
|
|
128
130
|
profiles: [PROFILE_CORE_LIFECYCLE],
|
|
@@ -132,10 +134,11 @@ const projectAgentsDelete = (0, types_1.defineOperation)({
|
|
|
132
134
|
summary: 'Delete an AI agent from a project',
|
|
133
135
|
http: { method: 'DELETE', path: PROJECT_AGENT_PATH },
|
|
134
136
|
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
137
|
+
sensitivity: 'none',
|
|
135
138
|
mcp: {
|
|
136
139
|
toolName: 'delete_project_agent',
|
|
137
140
|
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
138
|
-
taskSupport: { exposed:
|
|
141
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
139
142
|
},
|
|
140
143
|
cli: { commandPath: 'agents delete' },
|
|
141
144
|
profiles: [PROFILE_CORE_LIFECYCLE],
|
|
@@ -149,10 +152,11 @@ const threadsList = (0, types_1.defineOperation)({
|
|
|
149
152
|
path: PROJECT_AGENT_THREADS_PATH,
|
|
150
153
|
},
|
|
151
154
|
authorization: { safetyImpact: IMPACT_READ },
|
|
155
|
+
sensitivity: 'none',
|
|
152
156
|
mcp: {
|
|
153
157
|
toolName: 'list_agent_threads',
|
|
154
158
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
155
|
-
taskSupport: { exposed:
|
|
159
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
156
160
|
},
|
|
157
161
|
cli: { commandPath: 'agents threads list' },
|
|
158
162
|
profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY],
|
|
@@ -166,10 +170,11 @@ const threadsGet = (0, types_1.defineOperation)({
|
|
|
166
170
|
path: PROJECT_AGENT_THREAD_PATH,
|
|
167
171
|
},
|
|
168
172
|
authorization: { safetyImpact: IMPACT_READ },
|
|
173
|
+
sensitivity: 'none',
|
|
169
174
|
mcp: {
|
|
170
175
|
toolName: 'get_agent_thread',
|
|
171
176
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
172
|
-
taskSupport: { exposed:
|
|
177
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
173
178
|
},
|
|
174
179
|
cli: { commandPath: 'agents threads get' },
|
|
175
180
|
profiles: [PROFILE_CONVERSATIONS, PROFILE_DISCOVERY],
|
|
@@ -201,10 +206,11 @@ const threadsStart = (0, types_1.defineOperation)({
|
|
|
201
206
|
},
|
|
202
207
|
],
|
|
203
208
|
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
209
|
+
sensitivity: 'none',
|
|
204
210
|
mcp: {
|
|
205
211
|
toolName: 'generate_agent_message',
|
|
206
212
|
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
207
|
-
taskSupport: { exposed:
|
|
213
|
+
taskSupport: { exposed: false, taskEligible: true },
|
|
208
214
|
},
|
|
209
215
|
cli: { commandPath: 'agents threads start' },
|
|
210
216
|
profiles: [PROFILE_CONVERSATIONS],
|
|
@@ -229,10 +235,11 @@ const threadsContinue = (0, types_1.defineOperation)({
|
|
|
229
235
|
},
|
|
230
236
|
],
|
|
231
237
|
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
238
|
+
sensitivity: 'none',
|
|
232
239
|
mcp: {
|
|
233
240
|
toolName: 'continue_agent_thread',
|
|
234
241
|
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
235
|
-
taskSupport: { exposed:
|
|
242
|
+
taskSupport: { exposed: false, taskEligible: true },
|
|
236
243
|
},
|
|
237
244
|
cli: { commandPath: 'agents threads continue' },
|
|
238
245
|
profiles: [PROFILE_CONVERSATIONS],
|
|
@@ -246,10 +253,11 @@ const evaluationsList = (0, types_1.defineOperation)({
|
|
|
246
253
|
path: PROJECT_AGENT_EVALUATIONS_PATH,
|
|
247
254
|
},
|
|
248
255
|
authorization: { safetyImpact: IMPACT_READ },
|
|
256
|
+
sensitivity: 'none',
|
|
249
257
|
mcp: {
|
|
250
258
|
toolName: 'list_agent_evaluations',
|
|
251
259
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
252
|
-
taskSupport: { exposed:
|
|
260
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
253
261
|
},
|
|
254
262
|
cli: { commandPath: 'agents evals list' },
|
|
255
263
|
profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
|
|
@@ -263,10 +271,11 @@ const evaluationsGet = (0, types_1.defineOperation)({
|
|
|
263
271
|
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
264
272
|
},
|
|
265
273
|
authorization: { safetyImpact: IMPACT_READ },
|
|
274
|
+
sensitivity: 'none',
|
|
266
275
|
mcp: {
|
|
267
276
|
toolName: 'get_agent_evaluation',
|
|
268
277
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
269
|
-
taskSupport: { exposed:
|
|
278
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
270
279
|
},
|
|
271
280
|
cli: { commandPath: 'agents evals get' },
|
|
272
281
|
profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
|
|
@@ -279,10 +288,11 @@ const evaluationsCreate = (0, types_1.defineOperation)({
|
|
|
279
288
|
path: PROJECT_AGENT_EVALUATIONS_PATH,
|
|
280
289
|
},
|
|
281
290
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
291
|
+
sensitivity: 'none',
|
|
282
292
|
mcp: {
|
|
283
293
|
toolName: 'create_agent_evaluation',
|
|
284
294
|
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
285
|
-
taskSupport: { exposed:
|
|
295
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
286
296
|
},
|
|
287
297
|
cli: { commandPath: 'agents evals create' },
|
|
288
298
|
profiles: [PROFILE_EVALUATIONS],
|
|
@@ -295,10 +305,11 @@ const evaluationsUpdate = (0, types_1.defineOperation)({
|
|
|
295
305
|
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
296
306
|
},
|
|
297
307
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
308
|
+
sensitivity: 'none',
|
|
298
309
|
mcp: {
|
|
299
310
|
toolName: 'update_agent_evaluation',
|
|
300
311
|
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
301
|
-
taskSupport: { exposed:
|
|
312
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
302
313
|
},
|
|
303
314
|
cli: { commandPath: 'agents evals update' },
|
|
304
315
|
profiles: [PROFILE_EVALUATIONS],
|
|
@@ -311,10 +322,11 @@ const evaluationsAppend = (0, types_1.defineOperation)({
|
|
|
311
322
|
path: `${PROJECT_AGENT_EVALUATION_PATH}/append`,
|
|
312
323
|
},
|
|
313
324
|
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
325
|
+
sensitivity: 'none',
|
|
314
326
|
mcp: {
|
|
315
327
|
toolName: 'append_agent_evaluation_prompts',
|
|
316
328
|
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
317
|
-
taskSupport: { exposed:
|
|
329
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
318
330
|
},
|
|
319
331
|
cli: { commandPath: 'agents evals append' },
|
|
320
332
|
profiles: [PROFILE_EVALUATIONS],
|
|
@@ -327,10 +339,11 @@ const evaluationsDelete = (0, types_1.defineOperation)({
|
|
|
327
339
|
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
328
340
|
},
|
|
329
341
|
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
342
|
+
sensitivity: 'none',
|
|
330
343
|
mcp: {
|
|
331
344
|
toolName: 'delete_agent_evaluation',
|
|
332
345
|
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
333
|
-
taskSupport: { exposed:
|
|
346
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
334
347
|
},
|
|
335
348
|
cli: { commandPath: 'agents evals delete' },
|
|
336
349
|
profiles: [PROFILE_EVALUATIONS],
|
|
@@ -343,10 +356,11 @@ const evaluationsRun = (0, types_1.defineOperation)({
|
|
|
343
356
|
path: `${PROJECT_AGENT_EVALUATION_PATH}/run`,
|
|
344
357
|
},
|
|
345
358
|
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
359
|
+
sensitivity: 'none',
|
|
346
360
|
mcp: {
|
|
347
361
|
toolName: 'run_agent_evaluation',
|
|
348
362
|
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
349
|
-
taskSupport: { exposed:
|
|
363
|
+
taskSupport: { exposed: false, taskEligible: true },
|
|
350
364
|
},
|
|
351
365
|
cli: { commandPath: 'agents evals run' },
|
|
352
366
|
profiles: [PROFILE_EVALUATIONS],
|
|
@@ -360,10 +374,11 @@ const evaluationsRunsList = (0, types_1.defineOperation)({
|
|
|
360
374
|
path: PROJECT_AGENT_EVALUATION_RUNS_PATH,
|
|
361
375
|
},
|
|
362
376
|
authorization: { safetyImpact: IMPACT_READ },
|
|
377
|
+
sensitivity: 'none',
|
|
363
378
|
mcp: {
|
|
364
379
|
toolName: 'list_agent_evaluation_runs',
|
|
365
380
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
366
|
-
taskSupport: { exposed:
|
|
381
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
367
382
|
},
|
|
368
383
|
cli: { commandPath: 'agents evals runs' },
|
|
369
384
|
profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
|
|
@@ -376,10 +391,11 @@ const evaluationsRunResultsGet = (0, types_1.defineOperation)({
|
|
|
376
391
|
path: `${PROJECT_AGENT_EVALUATION_RUNS_PATH}/{runUuid}`,
|
|
377
392
|
},
|
|
378
393
|
authorization: { safetyImpact: IMPACT_READ },
|
|
394
|
+
sensitivity: 'none',
|
|
379
395
|
mcp: {
|
|
380
396
|
toolName: 'get_agent_evaluation_run_results',
|
|
381
397
|
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
382
|
-
taskSupport: { exposed:
|
|
398
|
+
taskSupport: { exposed: false, taskEligible: false },
|
|
383
399
|
},
|
|
384
400
|
cli: { commandPath: 'agents evals run-results' },
|
|
385
401
|
profiles: [PROFILE_EVALUATIONS, PROFILE_DISCOVERY],
|
|
@@ -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
|
+
];
|