@lightdash-tools/common 0.11.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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Irrecoverable MCP tool names that must never be registered (sans `lightdash_` prefix).
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IRRECOVERABLE_TOOL_DENYLIST = void 0;
|
|
7
|
+
exports.IRRECOVERABLE_TOOL_DENYLIST = [
|
|
8
|
+
'delete_member',
|
|
9
|
+
'permanent_delete_content',
|
|
10
|
+
'create_space',
|
|
11
|
+
'update_space',
|
|
12
|
+
'delete_space',
|
|
13
|
+
];
|
package/dist/audit.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* If LIGHTDASH_TOOLS_AUDIT_LOG is a file path, entries are appended there; otherwise stderr.
|
|
8
8
|
*/
|
|
9
|
-
import type { ProfileId } from './
|
|
9
|
+
import type { ProfileId } from './profile-ids';
|
|
10
10
|
export type AuditStatus = 'blocked' | 'confirmation_cancelled' | 'confirmation_declined' | 'confirmation_requested' | 'deletion_failed' | 'deletion_succeeded' | 'error' | 'promotion_failed' | 'promotion_succeeded' | 'resource_changed' | 'success';
|
|
11
11
|
/** Cloud Logging LogSeverity-compatible strings for structured stderr JSON. */
|
|
12
12
|
export type AuditSeverity = 'ERROR' | 'INFO' | 'NOTICE' | 'WARNING';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export * from './env';
|
|
|
3
3
|
export * from './safety';
|
|
4
4
|
export * from './input-validation';
|
|
5
5
|
export * from './argument-validation';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './profile-ids';
|
|
7
|
+
export * from './agent-safe';
|
|
7
8
|
export * from './agentops/types';
|
|
8
9
|
export * from './agentops/snapshots';
|
|
9
10
|
export * from './agentops/formatters';
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,10 @@ __exportStar(require("./safety"), exports);
|
|
|
27
27
|
__exportStar(require("./input-validation"), exports);
|
|
28
28
|
// Export argument / descriptor validation
|
|
29
29
|
__exportStar(require("./argument-validation"), exports);
|
|
30
|
-
//
|
|
31
|
-
__exportStar(require("./
|
|
30
|
+
// MCP serving profile ids (shared with audit typing)
|
|
31
|
+
__exportStar(require("./profile-ids"), exports);
|
|
32
|
+
// Irrecoverable MCP tool denylist
|
|
33
|
+
__exportStar(require("./agent-safe"), exports);
|
|
32
34
|
// Export AgentOps bundle and gate types
|
|
33
35
|
__exportStar(require("./agentops/types"), exports);
|
|
34
36
|
__exportStar(require("./agentops/snapshots"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP serving profile ids (fixed HTTP mounts / stdio subcommands).
|
|
3
|
+
*/
|
|
4
|
+
export declare const PROFILE_IDS: readonly ["ai-agent-ops", "content-developer", "content-governance", "content-reader", "data-analyst", "organization-audit", "semantic-layer"];
|
|
5
|
+
export type ProfileId = (typeof PROFILE_IDS)[number];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP serving profile ids (fixed HTTP mounts / stdio subcommands).
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PROFILE_IDS = void 0;
|
|
7
|
+
exports.PROFILE_IDS = [
|
|
8
|
+
'ai-agent-ops',
|
|
9
|
+
'content-developer',
|
|
10
|
+
'content-governance',
|
|
11
|
+
'content-reader',
|
|
12
|
+
'data-analyst',
|
|
13
|
+
'organization-audit',
|
|
14
|
+
'semantic-layer',
|
|
15
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash-tools/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Shared utilities and types for Lightdash AI.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc",
|
|
28
|
-
"check:client-coverage": "node ../../scripts/check-client-operation-coverage.mjs",
|
|
29
|
-
"generate:operation-registry": "node ../../scripts/generate-operation-registry.mjs",
|
|
30
28
|
"generate:types": "node ../../scripts/openapi-types-url.mjs | xargs -I{} openapi-typescript {} -o src/types/generated/openapi-types.ts && node ../../scripts/fix-openapi-duplicate-operations.mjs && prettier --write src/types/generated/openapi-types.ts"
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Irrecoverable MCP tool names that must never be registered (sans `lightdash_` prefix).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const IRRECOVERABLE_TOOL_DENYLIST = [
|
|
6
|
+
'delete_member',
|
|
7
|
+
'permanent_delete_content',
|
|
8
|
+
'create_space',
|
|
9
|
+
'update_space',
|
|
10
|
+
'delete_space',
|
|
11
|
+
] as const;
|
package/src/audit.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { randomUUID } from 'node:crypto';
|
|
11
11
|
import { createWriteStream, type WriteStream } from 'node:fs';
|
|
12
12
|
|
|
13
|
-
import type { ProfileId } from './
|
|
13
|
+
import type { ProfileId } from './profile-ids';
|
|
14
14
|
|
|
15
15
|
export type AuditStatus =
|
|
16
16
|
| 'blocked'
|
package/src/index.ts
CHANGED
|
@@ -14,8 +14,11 @@ export * from './input-validation';
|
|
|
14
14
|
// Export argument / descriptor validation
|
|
15
15
|
export * from './argument-validation';
|
|
16
16
|
|
|
17
|
-
//
|
|
18
|
-
export * from './
|
|
17
|
+
// MCP serving profile ids (shared with audit typing)
|
|
18
|
+
export * from './profile-ids';
|
|
19
|
+
|
|
20
|
+
// Irrecoverable MCP tool denylist
|
|
21
|
+
export * from './agent-safe';
|
|
19
22
|
|
|
20
23
|
// Export AgentOps bundle and gate types
|
|
21
24
|
export * from './agentops/types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP serving profile ids (fixed HTTP mounts / stdio subcommands).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const PROFILE_IDS = [
|
|
6
|
+
'ai-agent-ops',
|
|
7
|
+
'content-developer',
|
|
8
|
+
'content-governance',
|
|
9
|
+
'content-reader',
|
|
10
|
+
'data-analyst',
|
|
11
|
+
'organization-audit',
|
|
12
|
+
'semantic-layer',
|
|
13
|
+
] as const;
|
|
14
|
+
|
|
15
|
+
export type ProfileId = (typeof PROFILE_IDS)[number];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Agent-safe surface policy helpers (ADR-0004 / ADR-0013).
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.IRRECOVERABLE_TOOL_DENYLIST = void 0;
|
|
7
|
-
const registry_1 = require("./registry");
|
|
8
|
-
/** Banned MCP tool names (without `lightdash_` prefix) for regression tests. */
|
|
9
|
-
exports.IRRECOVERABLE_TOOL_DENYLIST = (0, registry_1.listBannedMcpToolNames)();
|
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* P0 AI agent operations registered in the shared operation registry.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AI_AGENT_OPERATIONS = void 0;
|
|
7
|
-
const safety_1 = require("../safety");
|
|
8
|
-
const types_1 = require("./types");
|
|
9
|
-
const IMPACT_READ = 'read';
|
|
10
|
-
const IMPACT_WRITE_NONDESTRUCTIVE = 'write-nondestructive';
|
|
11
|
-
const IMPACT_WRITE_DESTRUCTIVE = 'write-destructive';
|
|
12
|
-
const IMPACT_EXTERNAL = 'external-side-effect';
|
|
13
|
-
const PROFILE_AI_AGENT_OPS = 'ai-agent-ops';
|
|
14
|
-
const API_V1 = '/api/v1';
|
|
15
|
-
const PROJECT_AGENTS_PATH = `${API_V1}/projects/{projectUuid}/aiAgents`;
|
|
16
|
-
const PROJECT_AGENT_PATH = `${PROJECT_AGENTS_PATH}/{agentUuid}`;
|
|
17
|
-
const adminListAgents = (0, types_1.defineOperation)({
|
|
18
|
-
id: 'ai-agents.admin.agents.list',
|
|
19
|
-
summary: 'List all AI agents across the organization (admin)',
|
|
20
|
-
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/agents` },
|
|
21
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
22
|
-
sensitivity: 'none',
|
|
23
|
-
mcp: {
|
|
24
|
-
toolName: 'list_admin_agents',
|
|
25
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
26
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
27
|
-
},
|
|
28
|
-
cli: { commandPath: 'ai-agents list' },
|
|
29
|
-
profiles: [],
|
|
30
|
-
});
|
|
31
|
-
const adminListThreads = (0, types_1.defineOperation)({
|
|
32
|
-
id: 'ai-agents.admin.threads.list',
|
|
33
|
-
summary: 'List AI agent threads across the organization with optional filters (admin)',
|
|
34
|
-
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/threads` },
|
|
35
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
36
|
-
sensitivity: 'none',
|
|
37
|
-
mcp: {
|
|
38
|
-
toolName: 'list_admin_agent_threads',
|
|
39
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
40
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
41
|
-
},
|
|
42
|
-
cli: { commandPath: 'ai-agents threads' },
|
|
43
|
-
profiles: [],
|
|
44
|
-
});
|
|
45
|
-
const adminSettingsGet = (0, types_1.defineOperation)({
|
|
46
|
-
id: 'ai-agents.admin.settings.get',
|
|
47
|
-
summary: 'Get AI organization settings (admin)',
|
|
48
|
-
http: { method: 'GET', path: `${API_V1}/aiAgents/admin/settings` },
|
|
49
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
50
|
-
sensitivity: 'none',
|
|
51
|
-
mcp: {
|
|
52
|
-
toolName: 'get_ai_organization_settings',
|
|
53
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
54
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
55
|
-
},
|
|
56
|
-
cli: { commandPath: 'ai-agents settings get' },
|
|
57
|
-
profiles: [],
|
|
58
|
-
});
|
|
59
|
-
const adminSettingsUpdate = (0, types_1.defineOperation)({
|
|
60
|
-
id: 'ai-agents.admin.settings.update',
|
|
61
|
-
summary: 'Update AI organization settings (admin)',
|
|
62
|
-
http: { method: 'PATCH', path: `${API_V1}/aiAgents/admin/settings` },
|
|
63
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
64
|
-
sensitivity: 'none',
|
|
65
|
-
mcp: {
|
|
66
|
-
toolName: 'update_ai_organization_settings',
|
|
67
|
-
annotations: safety_1.WRITE_IDEMPOTENT,
|
|
68
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
69
|
-
},
|
|
70
|
-
cli: { commandPath: 'ai-agents settings update' },
|
|
71
|
-
profiles: [],
|
|
72
|
-
});
|
|
73
|
-
const projectAgentsList = (0, types_1.defineOperation)({
|
|
74
|
-
id: 'ai-agents.project.agents.list',
|
|
75
|
-
summary: 'List all AI agents in a project',
|
|
76
|
-
http: { method: 'GET', path: PROJECT_AGENTS_PATH },
|
|
77
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
78
|
-
sensitivity: 'none',
|
|
79
|
-
mcp: {
|
|
80
|
-
toolName: 'list_project_agents',
|
|
81
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
82
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
83
|
-
},
|
|
84
|
-
cli: { commandPath: 'agents list' },
|
|
85
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
86
|
-
});
|
|
87
|
-
const projectAgentsGet = (0, types_1.defineOperation)({
|
|
88
|
-
id: 'ai-agents.project.agents.get',
|
|
89
|
-
summary: 'Get a single AI agent in a project',
|
|
90
|
-
http: { method: 'GET', path: PROJECT_AGENT_PATH },
|
|
91
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
92
|
-
sensitivity: 'none',
|
|
93
|
-
mcp: {
|
|
94
|
-
toolName: 'get_project_agent',
|
|
95
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
96
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
97
|
-
},
|
|
98
|
-
cli: { commandPath: 'agents get' },
|
|
99
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
100
|
-
});
|
|
101
|
-
const projectAgentsCreate = (0, types_1.defineOperation)({
|
|
102
|
-
id: 'ai-agents.project.agents.create',
|
|
103
|
-
summary: 'Create a new AI agent in a project',
|
|
104
|
-
http: { method: 'POST', path: PROJECT_AGENTS_PATH },
|
|
105
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
106
|
-
sensitivity: 'none',
|
|
107
|
-
mcp: {
|
|
108
|
-
toolName: 'create_project_agent',
|
|
109
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
110
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
111
|
-
},
|
|
112
|
-
cli: { commandPath: 'agents create' },
|
|
113
|
-
profiles: [],
|
|
114
|
-
});
|
|
115
|
-
const projectAgentsUpdate = (0, types_1.defineOperation)({
|
|
116
|
-
id: 'ai-agents.project.agents.update',
|
|
117
|
-
summary: 'Update an existing AI agent in a project',
|
|
118
|
-
http: { method: 'PATCH', path: PROJECT_AGENT_PATH },
|
|
119
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
120
|
-
sensitivity: 'none',
|
|
121
|
-
mcp: {
|
|
122
|
-
toolName: 'update_project_agent',
|
|
123
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
124
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
125
|
-
},
|
|
126
|
-
cli: { commandPath: 'agents update' },
|
|
127
|
-
profiles: [],
|
|
128
|
-
});
|
|
129
|
-
const projectAgentsDelete = (0, types_1.defineOperation)({
|
|
130
|
-
id: 'ai-agents.project.agents.delete',
|
|
131
|
-
summary: 'Delete an AI agent from a project',
|
|
132
|
-
http: { method: 'DELETE', path: PROJECT_AGENT_PATH },
|
|
133
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
134
|
-
sensitivity: 'none',
|
|
135
|
-
mcp: {
|
|
136
|
-
toolName: 'delete_project_agent',
|
|
137
|
-
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
138
|
-
taskSupport: { exposed: false, taskEligible: false },
|
|
139
|
-
},
|
|
140
|
-
cli: { commandPath: 'agents delete' },
|
|
141
|
-
profiles: [],
|
|
142
|
-
});
|
|
143
|
-
const PROJECT_AGENT_THREADS_PATH = `${PROJECT_AGENT_PATH}/threads`;
|
|
144
|
-
const threadsList = (0, types_1.defineOperation)({
|
|
145
|
-
id: 'ai-agents.project.threads.list',
|
|
146
|
-
summary: 'List conversation threads for an agent',
|
|
147
|
-
http: {
|
|
148
|
-
method: 'GET',
|
|
149
|
-
path: PROJECT_AGENT_THREADS_PATH,
|
|
150
|
-
},
|
|
151
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
152
|
-
sensitivity: 'none',
|
|
153
|
-
mcp: {
|
|
154
|
-
toolName: 'list_agent_threads',
|
|
155
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
156
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
157
|
-
},
|
|
158
|
-
cli: { commandPath: 'agents threads list' },
|
|
159
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
160
|
-
});
|
|
161
|
-
const PROJECT_AGENT_THREAD_PATH = `${PROJECT_AGENT_THREADS_PATH}/{threadUuid}`;
|
|
162
|
-
const threadsGet = (0, types_1.defineOperation)({
|
|
163
|
-
id: 'ai-agents.project.threads.get',
|
|
164
|
-
summary: 'Get a conversation thread with all messages',
|
|
165
|
-
http: {
|
|
166
|
-
method: 'GET',
|
|
167
|
-
path: PROJECT_AGENT_THREAD_PATH,
|
|
168
|
-
},
|
|
169
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
170
|
-
sensitivity: 'none',
|
|
171
|
-
mcp: {
|
|
172
|
-
toolName: 'get_agent_thread',
|
|
173
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
174
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
175
|
-
},
|
|
176
|
-
cli: { commandPath: 'agents threads get' },
|
|
177
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
178
|
-
});
|
|
179
|
-
const PROJECT_AGENT_THREAD_MESSAGES_PATH = `${PROJECT_AGENT_THREAD_PATH}/messages`;
|
|
180
|
-
const PROJECT_AGENT_THREAD_GENERATE_PATH = `${PROJECT_AGENT_THREAD_PATH}/generate`;
|
|
181
|
-
const threadsStart = (0, types_1.defineOperation)({
|
|
182
|
-
id: 'ai-agents.project.threads.start',
|
|
183
|
-
summary: 'Start a new conversation (client workflow: create thread, add message, generate response)',
|
|
184
|
-
http: {
|
|
185
|
-
method: 'POST',
|
|
186
|
-
path: PROJECT_AGENT_THREADS_PATH,
|
|
187
|
-
},
|
|
188
|
-
workflow: [
|
|
189
|
-
{
|
|
190
|
-
method: 'POST',
|
|
191
|
-
path: PROJECT_AGENT_THREADS_PATH,
|
|
192
|
-
summary: 'Create thread',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
method: 'POST',
|
|
196
|
-
path: PROJECT_AGENT_THREAD_MESSAGES_PATH,
|
|
197
|
-
summary: 'Add user message',
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
method: 'POST',
|
|
201
|
-
path: PROJECT_AGENT_THREAD_GENERATE_PATH,
|
|
202
|
-
summary: 'Generate agent response',
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
206
|
-
sensitivity: 'none',
|
|
207
|
-
mcp: {
|
|
208
|
-
toolName: 'generate_agent_message',
|
|
209
|
-
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
210
|
-
taskSupport: { exposed: false, taskEligible: true },
|
|
211
|
-
},
|
|
212
|
-
cli: { commandPath: 'agents threads start' },
|
|
213
|
-
profiles: [],
|
|
214
|
-
});
|
|
215
|
-
const threadsContinue = (0, types_1.defineOperation)({
|
|
216
|
-
id: 'ai-agents.project.threads.continue',
|
|
217
|
-
summary: 'Continue an existing conversation (client workflow: add message, generate response)',
|
|
218
|
-
http: {
|
|
219
|
-
method: 'POST',
|
|
220
|
-
path: PROJECT_AGENT_THREAD_GENERATE_PATH,
|
|
221
|
-
},
|
|
222
|
-
workflow: [
|
|
223
|
-
{
|
|
224
|
-
method: 'POST',
|
|
225
|
-
path: PROJECT_AGENT_THREAD_MESSAGES_PATH,
|
|
226
|
-
summary: 'Add user message',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
method: 'POST',
|
|
230
|
-
path: PROJECT_AGENT_THREAD_GENERATE_PATH,
|
|
231
|
-
summary: 'Generate agent response',
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
235
|
-
sensitivity: 'none',
|
|
236
|
-
mcp: {
|
|
237
|
-
toolName: 'continue_agent_thread',
|
|
238
|
-
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
239
|
-
taskSupport: { exposed: false, taskEligible: true },
|
|
240
|
-
},
|
|
241
|
-
cli: { commandPath: 'agents threads continue' },
|
|
242
|
-
profiles: [],
|
|
243
|
-
});
|
|
244
|
-
const PROJECT_AGENT_EVALUATIONS_PATH = `${PROJECT_AGENT_PATH}/evaluations`;
|
|
245
|
-
const evaluationsList = (0, types_1.defineOperation)({
|
|
246
|
-
id: 'ai-agents.project.evaluations.list',
|
|
247
|
-
summary: 'List all evaluations for an agent',
|
|
248
|
-
http: {
|
|
249
|
-
method: 'GET',
|
|
250
|
-
path: PROJECT_AGENT_EVALUATIONS_PATH,
|
|
251
|
-
},
|
|
252
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
253
|
-
sensitivity: 'none',
|
|
254
|
-
mcp: {
|
|
255
|
-
toolName: 'list_agent_evaluations',
|
|
256
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
257
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
258
|
-
},
|
|
259
|
-
cli: { commandPath: 'agents evals list' },
|
|
260
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
261
|
-
});
|
|
262
|
-
const PROJECT_AGENT_EVALUATION_PATH = `${PROJECT_AGENT_EVALUATIONS_PATH}/{evalUuid}`;
|
|
263
|
-
const evaluationsGet = (0, types_1.defineOperation)({
|
|
264
|
-
id: 'ai-agents.project.evaluations.get',
|
|
265
|
-
summary: 'Get a full evaluation including test prompts',
|
|
266
|
-
http: {
|
|
267
|
-
method: 'GET',
|
|
268
|
-
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
269
|
-
},
|
|
270
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
271
|
-
sensitivity: 'none',
|
|
272
|
-
mcp: {
|
|
273
|
-
toolName: 'get_agent_evaluation',
|
|
274
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
275
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
276
|
-
},
|
|
277
|
-
cli: { commandPath: 'agents evals get' },
|
|
278
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
279
|
-
});
|
|
280
|
-
const evaluationsCreate = (0, types_1.defineOperation)({
|
|
281
|
-
id: 'ai-agents.project.evaluations.create',
|
|
282
|
-
summary: 'Create a new evaluation test suite for an agent',
|
|
283
|
-
http: {
|
|
284
|
-
method: 'POST',
|
|
285
|
-
path: PROJECT_AGENT_EVALUATIONS_PATH,
|
|
286
|
-
},
|
|
287
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
288
|
-
sensitivity: 'none',
|
|
289
|
-
mcp: {
|
|
290
|
-
toolName: 'create_agent_evaluation',
|
|
291
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
292
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
293
|
-
},
|
|
294
|
-
cli: { commandPath: 'agents evals create' },
|
|
295
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
296
|
-
});
|
|
297
|
-
const evaluationsUpdate = (0, types_1.defineOperation)({
|
|
298
|
-
id: 'ai-agents.project.evaluations.update',
|
|
299
|
-
summary: 'Update an evaluation title, description, or prompts',
|
|
300
|
-
http: {
|
|
301
|
-
method: 'PATCH',
|
|
302
|
-
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
303
|
-
},
|
|
304
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
305
|
-
sensitivity: 'none',
|
|
306
|
-
mcp: {
|
|
307
|
-
toolName: 'update_agent_evaluation',
|
|
308
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
309
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
310
|
-
},
|
|
311
|
-
cli: { commandPath: 'agents evals update' },
|
|
312
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
313
|
-
});
|
|
314
|
-
const evaluationsAppend = (0, types_1.defineOperation)({
|
|
315
|
-
id: 'ai-agents.project.evaluations.append',
|
|
316
|
-
summary: 'Append additional prompts to an existing evaluation',
|
|
317
|
-
http: {
|
|
318
|
-
method: 'POST',
|
|
319
|
-
path: `${PROJECT_AGENT_EVALUATION_PATH}/append`,
|
|
320
|
-
},
|
|
321
|
-
authorization: { safetyImpact: IMPACT_WRITE_NONDESTRUCTIVE },
|
|
322
|
-
sensitivity: 'none',
|
|
323
|
-
mcp: {
|
|
324
|
-
toolName: 'append_agent_evaluation_prompts',
|
|
325
|
-
annotations: safety_1.WRITE_NONDESTRUCTIVE,
|
|
326
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
327
|
-
},
|
|
328
|
-
cli: { commandPath: 'agents evals append' },
|
|
329
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
330
|
-
});
|
|
331
|
-
const evaluationsDelete = (0, types_1.defineOperation)({
|
|
332
|
-
id: 'ai-agents.project.evaluations.delete',
|
|
333
|
-
summary: 'Delete an evaluation and all its runs',
|
|
334
|
-
http: {
|
|
335
|
-
method: 'DELETE',
|
|
336
|
-
path: PROJECT_AGENT_EVALUATION_PATH,
|
|
337
|
-
},
|
|
338
|
-
authorization: { safetyImpact: IMPACT_WRITE_DESTRUCTIVE },
|
|
339
|
-
sensitivity: 'none',
|
|
340
|
-
mcp: {
|
|
341
|
-
toolName: 'delete_agent_evaluation',
|
|
342
|
-
annotations: safety_1.WRITE_DESTRUCTIVE,
|
|
343
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
344
|
-
},
|
|
345
|
-
cli: { commandPath: 'agents evals delete' },
|
|
346
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
347
|
-
});
|
|
348
|
-
const evaluationsRun = (0, types_1.defineOperation)({
|
|
349
|
-
id: 'ai-agents.project.evaluations.run',
|
|
350
|
-
summary: 'Trigger a new evaluation run for an agent',
|
|
351
|
-
http: {
|
|
352
|
-
method: 'POST',
|
|
353
|
-
path: `${PROJECT_AGENT_EVALUATION_PATH}/run`,
|
|
354
|
-
},
|
|
355
|
-
authorization: { safetyImpact: IMPACT_EXTERNAL },
|
|
356
|
-
sensitivity: 'none',
|
|
357
|
-
mcp: {
|
|
358
|
-
toolName: 'run_agent_evaluation',
|
|
359
|
-
annotations: safety_1.WRITE_OPEN_WORLD,
|
|
360
|
-
taskSupport: { exposed: true, taskEligible: true },
|
|
361
|
-
},
|
|
362
|
-
cli: { commandPath: 'agents evals run' },
|
|
363
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
364
|
-
});
|
|
365
|
-
const PROJECT_AGENT_EVALUATION_RUNS_PATH = `${PROJECT_AGENT_EVALUATION_PATH}/runs`;
|
|
366
|
-
const evaluationsRunsList = (0, types_1.defineOperation)({
|
|
367
|
-
id: 'ai-agents.project.evaluations.runs.list',
|
|
368
|
-
summary: 'List all runs for an evaluation with status and pass/fail counts',
|
|
369
|
-
http: {
|
|
370
|
-
method: 'GET',
|
|
371
|
-
path: PROJECT_AGENT_EVALUATION_RUNS_PATH,
|
|
372
|
-
},
|
|
373
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
374
|
-
sensitivity: 'none',
|
|
375
|
-
mcp: {
|
|
376
|
-
toolName: 'list_agent_evaluation_runs',
|
|
377
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
378
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
379
|
-
},
|
|
380
|
-
cli: { commandPath: 'agents evals runs' },
|
|
381
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
382
|
-
});
|
|
383
|
-
const evaluationsRunResultsGet = (0, types_1.defineOperation)({
|
|
384
|
-
id: 'ai-agents.project.evaluations.runs.get',
|
|
385
|
-
summary: 'Get detailed per-prompt results for a specific evaluation run',
|
|
386
|
-
http: {
|
|
387
|
-
method: 'GET',
|
|
388
|
-
path: `${PROJECT_AGENT_EVALUATION_RUNS_PATH}/{runUuid}`,
|
|
389
|
-
},
|
|
390
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
391
|
-
sensitivity: 'none',
|
|
392
|
-
mcp: {
|
|
393
|
-
toolName: 'get_agent_eval_run_results',
|
|
394
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
395
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
396
|
-
},
|
|
397
|
-
cli: { commandPath: 'agents evals run-results' },
|
|
398
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
399
|
-
});
|
|
400
|
-
const evaluateAgentReadiness = (0, types_1.defineOperation)({
|
|
401
|
-
id: 'ai-agents.project.agents.evaluate-readiness',
|
|
402
|
-
summary: 'Evaluate release readiness score for an agent (not an evaluation-suite run)',
|
|
403
|
-
http: {
|
|
404
|
-
method: 'POST',
|
|
405
|
-
path: `${PROJECT_AGENT_PATH}/evaluateReadiness`,
|
|
406
|
-
},
|
|
407
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
408
|
-
sensitivity: 'none',
|
|
409
|
-
mcp: {
|
|
410
|
-
toolName: 'evaluate_agent_readiness',
|
|
411
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
412
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
413
|
-
},
|
|
414
|
-
cli: { commandPath: 'agents readiness evaluate' },
|
|
415
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
416
|
-
});
|
|
417
|
-
const getAgentSuggestions = (0, types_1.defineOperation)({
|
|
418
|
-
id: 'ai-agents.project.agents.suggestions',
|
|
419
|
-
summary: 'List suggestion chips for an agent',
|
|
420
|
-
http: {
|
|
421
|
-
method: 'GET',
|
|
422
|
-
path: `${PROJECT_AGENT_PATH}/suggestions`,
|
|
423
|
-
},
|
|
424
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
425
|
-
sensitivity: 'none',
|
|
426
|
-
mcp: {
|
|
427
|
-
toolName: 'get_agent_suggestions',
|
|
428
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
429
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
430
|
-
},
|
|
431
|
-
cli: { commandPath: 'agents suggestions' },
|
|
432
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
433
|
-
});
|
|
434
|
-
const getAgentModels = (0, types_1.defineOperation)({
|
|
435
|
-
id: 'ai-agents.project.agents.models',
|
|
436
|
-
summary: 'List available AI model options for an agent',
|
|
437
|
-
http: {
|
|
438
|
-
method: 'GET',
|
|
439
|
-
path: `${PROJECT_AGENT_PATH}/models`,
|
|
440
|
-
},
|
|
441
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
442
|
-
sensitivity: 'none',
|
|
443
|
-
mcp: {
|
|
444
|
-
toolName: 'get_agent_models',
|
|
445
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
446
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
447
|
-
},
|
|
448
|
-
cli: { commandPath: 'agents models' },
|
|
449
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
450
|
-
});
|
|
451
|
-
const getExploreAccessSummary = (0, types_1.defineOperation)({
|
|
452
|
-
id: 'ai-agents.project.explore-access-summary',
|
|
453
|
-
summary: 'Summarize explore access for tag-filtered explores',
|
|
454
|
-
http: {
|
|
455
|
-
method: 'POST',
|
|
456
|
-
path: `${PROJECT_AGENTS_PATH}/explore-access-summary`,
|
|
457
|
-
},
|
|
458
|
-
authorization: { safetyImpact: IMPACT_READ },
|
|
459
|
-
sensitivity: 'none',
|
|
460
|
-
mcp: {
|
|
461
|
-
toolName: 'get_explore_access_summary',
|
|
462
|
-
annotations: safety_1.READ_ONLY_DEFAULT,
|
|
463
|
-
taskSupport: { exposed: true, taskEligible: false },
|
|
464
|
-
},
|
|
465
|
-
profiles: [PROFILE_AI_AGENT_OPS],
|
|
466
|
-
});
|
|
467
|
-
/** All registered P0 AI agent operations. */
|
|
468
|
-
exports.AI_AGENT_OPERATIONS = [
|
|
469
|
-
adminListAgents,
|
|
470
|
-
adminListThreads,
|
|
471
|
-
adminSettingsGet,
|
|
472
|
-
adminSettingsUpdate,
|
|
473
|
-
projectAgentsList,
|
|
474
|
-
projectAgentsGet,
|
|
475
|
-
projectAgentsCreate,
|
|
476
|
-
projectAgentsUpdate,
|
|
477
|
-
projectAgentsDelete,
|
|
478
|
-
evaluateAgentReadiness,
|
|
479
|
-
getAgentSuggestions,
|
|
480
|
-
getAgentModels,
|
|
481
|
-
getExploreAccessSummary,
|
|
482
|
-
threadsList,
|
|
483
|
-
threadsGet,
|
|
484
|
-
threadsStart,
|
|
485
|
-
threadsContinue,
|
|
486
|
-
evaluationsList,
|
|
487
|
-
evaluationsGet,
|
|
488
|
-
evaluationsCreate,
|
|
489
|
-
evaluationsUpdate,
|
|
490
|
-
evaluationsAppend,
|
|
491
|
-
evaluationsDelete,
|
|
492
|
-
evaluationsRun,
|
|
493
|
-
evaluationsRunsList,
|
|
494
|
-
evaluationsRunResultsGet,
|
|
495
|
-
];
|