@lightdash-tools/mcp 0.12.0 → 0.13.1
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/README.md +23 -14
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +31 -57
- package/dist/cli-help.d.ts +5 -0
- package/dist/cli-help.js +23 -0
- package/dist/cli-help.test.js +24 -0
- package/dist/config/env.d.ts +2 -2
- package/dist/config/env.js +3 -3
- package/dist/config/load-mcp-config.js +10 -2
- package/dist/config/load-mcp-config.test.js +34 -6
- package/dist/config/obsolete-env.js +0 -4
- package/dist/config/obsolete-env.test.js +0 -5
- package/dist/config/runtime.js +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +22 -32
- package/dist/notifications/operation-reporter.d.ts +13 -0
- package/dist/notifications/operation-reporter.js +45 -0
- package/dist/notifications/operation-reporter.test.js +79 -0
- package/dist/profiles/ai-agent-ops/v1/index.js +25 -6
- package/dist/profiles/ai-agent-ops/v1/prompts.test.js +2 -5
- package/dist/profiles/content-developer/v1/index.js +36 -6
- package/dist/profiles/content-developer/v1/prompts.test.js +7 -8
- package/dist/profiles/content-governance/v1/index.js +7 -6
- package/dist/profiles/content-governance/v1/prompts.test.js +2 -5
- package/dist/profiles/content-reader/v1/index.js +26 -6
- package/dist/profiles/content-reader/v1/prompts.test.js +2 -5
- package/dist/profiles/data-analyst/v1/index.js +19 -6
- package/dist/profiles/data-analyst/v1/prompts.test.js +2 -4
- package/dist/profiles/index.d.ts +3 -1
- package/dist/profiles/index.js +6 -1
- package/dist/profiles/index.test.js +29 -14
- package/dist/profiles/organization-audit/v1/index.js +27 -6
- package/dist/profiles/organization-audit/v1/prompts.test.js +2 -5
- package/dist/profiles/semantic-layer/v1/index.js +17 -6
- package/dist/profiles/semantic-layer/v1/prompts.js +3 -2
- package/dist/profiles/semantic-layer/v1/prompts.test.js +2 -5
- package/dist/profiles/semantic-layer/v1/resources/playbooks/compose-compile.md +14 -8
- package/dist/profiles/semantic-layer/v1/resources/playbooks/core.md +9 -9
- package/dist/profiles/semantic-layer/v1/resources/playbooks/explore.md +4 -3
- package/dist/profiles/test-support/playbook-invariants.d.ts +5 -0
- package/dist/profiles/test-support/playbook-invariants.js +14 -0
- package/dist/profiles/types.d.ts +6 -1
- package/dist/profiles/types.js +1 -1
- package/dist/protocol-contract.test.js +2 -2
- package/dist/server/capabilities.d.ts +2 -2
- package/dist/server/capabilities.js +3 -4
- package/dist/server/capabilities.test.js +4 -5
- package/dist/stdio.process.test.js +114 -193
- package/dist/tools/ai-agents/agents.d.ts +2 -0
- package/dist/tools/ai-agents/agents.js +5 -0
- package/dist/tools/ai-agents/discovery.d.ts +4 -0
- package/dist/tools/ai-agents/discovery.js +7 -0
- package/dist/tools/ai-agents/evaluations.d.ts +9 -0
- package/dist/tools/ai-agents/evaluations.js +12 -0
- package/dist/tools/ai-agents/threads.d.ts +2 -0
- package/dist/tools/ai-agents/threads.js +5 -0
- package/dist/tools/composition/explain-content.d.ts +1 -0
- package/dist/tools/composition/explain-content.js +4 -0
- package/dist/tools/organization/invariants.test.js +7 -3
- package/dist/tools/organization/inventory.d.ts +5 -0
- package/dist/tools/organization/inventory.js +8 -0
- package/dist/tools/organization/roles.d.ts +5 -0
- package/dist/tools/organization/roles.js +8 -0
- package/dist/tools/project/content.d.ts +4 -0
- package/dist/tools/project/content.js +7 -0
- package/dist/tools/project/delete-chart.d.ts +3 -1
- package/dist/tools/project/delete-chart.js +4 -2
- package/dist/tools/project/delete-dashboard.d.ts +3 -1
- package/dist/tools/project/delete-dashboard.js +4 -2
- package/dist/tools/project/developer-content-preview.d.ts +3 -0
- package/dist/tools/project/developer-content-preview.js +6 -0
- package/dist/tools/project/developer-content.d.ts +16 -1
- package/dist/tools/project/developer-content.js +18 -5
- package/dist/tools/project/developer-get-chart-as-code.d.ts +1 -0
- package/dist/tools/project/developer-get-chart-as-code.js +4 -0
- package/dist/tools/project/get-dashboard-promote-diff.d.ts +1 -0
- package/dist/tools/project/get-dashboard-promote-diff.js +4 -0
- package/dist/tools/project/invariants.test.js +6 -18
- package/dist/tools/project/parameters.d.ts +2 -0
- package/dist/tools/project/parameters.js +5 -0
- package/dist/tools/project/projects.d.ts +8 -2
- package/dist/tools/project/projects.js +34 -38
- package/dist/tools/project/projects.test.js +6 -6
- package/dist/tools/project/promote-dashboard.d.ts +3 -1
- package/dist/tools/project/promote-dashboard.js +4 -2
- package/dist/tools/project/reader-content.d.ts +3 -0
- package/dist/tools/project/reader-content.js +6 -0
- package/dist/tools/project/reader-execution.d.ts +2 -0
- package/dist/tools/project/reader-execution.js +5 -0
- package/dist/tools/project/reader-export-chart-image.d.ts +1 -0
- package/dist/tools/project/reader-export-chart-image.js +4 -0
- package/dist/tools/project/schedulers.d.ts +2 -0
- package/dist/tools/project/schedulers.js +5 -0
- package/dist/tools/project/spaces.d.ts +2 -0
- package/dist/tools/project/spaces.js +5 -0
- package/dist/tools/query/lifecycle.d.ts +2 -0
- package/dist/tools/query/lifecycle.js +5 -0
- package/dist/tools/query/run-metric-query.d.ts +1 -0
- package/dist/tools/query/run-metric-query.js +4 -0
- package/dist/tools/registry.d.ts +5 -284
- package/dist/tools/registry.js +9 -137
- package/dist/tools/registry.test.js +36 -0
- package/dist/tools/semantic/explores.d.ts +5 -1
- package/dist/tools/semantic/explores.js +8 -1
- package/dist/tools/semantic/metrics.d.ts +3 -1
- package/dist/tools/semantic/metrics.js +6 -1
- package/dist/tools/semantic/query.d.ts +2 -1
- package/dist/tools/semantic/query.js +11 -3
- package/dist/tools/semantic/query.test.d.ts +4 -0
- package/dist/tools/semantic/query.test.js +134 -0
- package/dist/tools/shared.d.ts +4 -1
- package/dist/tools/shared.js +6 -3
- package/dist/tools/space/access.d.ts +2 -0
- package/dist/tools/space/access.js +5 -0
- package/dist/tools/types.d.ts +18 -0
- package/dist/tools/types.js +29 -0
- package/dist/tools/types.test.d.ts +1 -0
- package/dist/tools/types.test.js +50 -0
- package/package.json +5 -5
- package/dist/index.test.js +0 -9
- package/dist/profiles/profile.membership.test.js +0 -36
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.js +0 -8
- package/dist/tools/index.test.js +0 -78
- /package/dist/{index.test.d.ts → cli-help.test.d.ts} +0 -0
- /package/dist/{profiles/profile.membership.test.d.ts → notifications/operation-reporter.test.d.ts} +0 -0
- /package/dist/tools/{index.test.d.ts → registry.test.d.ts} +0 -0
|
@@ -9,15 +9,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
*/
|
|
10
10
|
const node_child_process_1 = require("node:child_process");
|
|
11
11
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
-
const common_1 = require("@lightdash-tools/common");
|
|
13
12
|
const server_1 = require("@modelcontextprotocol/server");
|
|
14
13
|
const vitest_1 = require("vitest");
|
|
14
|
+
const index_js_1 = require("./profiles/index.js");
|
|
15
15
|
const shared_js_1 = require("./tools/shared.js");
|
|
16
16
|
/** Vitest runs from the monorepo root (`vitest.config.ts`). */
|
|
17
17
|
const repoRoot = process.cwd();
|
|
18
18
|
const binPath = node_path_1.default.join(repoRoot, 'packages/mcp/dist/bin.js');
|
|
19
19
|
const INIT_TIMEOUT_MS = 5000;
|
|
20
|
-
const SEMANTIC_LAYER_TOOL_COUNT = (0,
|
|
20
|
+
const SEMANTIC_LAYER_TOOL_COUNT = (0, index_js_1.getProfile)('semantic-layer').tools.length;
|
|
21
21
|
function writeLine(child, message) {
|
|
22
22
|
child.stdin.write(`${JSON.stringify(message)}\n`);
|
|
23
23
|
}
|
|
@@ -71,6 +71,68 @@ function killChild(child) {
|
|
|
71
71
|
return;
|
|
72
72
|
child.kill('SIGTERM');
|
|
73
73
|
}
|
|
74
|
+
function stdioSmokeEnv(overrides = {}) {
|
|
75
|
+
return Object.assign(Object.assign(Object.assign({}, process.env), { LIGHTDASH_URL: 'https://app.lightdash.cloud', LIGHTDASH_API_KEY: 'dummy-key-for-stdio-smoke', LIGHTDASH_TOOLS_AUDIT_LOG: undefined }), overrides);
|
|
76
|
+
}
|
|
77
|
+
function spawnStdioBin(args, envOverrides = {}) {
|
|
78
|
+
let stderr = '';
|
|
79
|
+
const child = (0, node_child_process_1.spawn)(process.execPath, [binPath, ...args], {
|
|
80
|
+
cwd: repoRoot,
|
|
81
|
+
env: stdioSmokeEnv(envOverrides),
|
|
82
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
83
|
+
});
|
|
84
|
+
child.stderr.setEncoding('utf8');
|
|
85
|
+
child.stderr.on('data', (chunk) => {
|
|
86
|
+
stderr += chunk;
|
|
87
|
+
});
|
|
88
|
+
return { child, getStderr: () => stderr };
|
|
89
|
+
}
|
|
90
|
+
async function spawnBinAndAwaitExit(args, envOverrides = {}) {
|
|
91
|
+
let stdout = '';
|
|
92
|
+
const { child, getStderr } = spawnStdioBin(args, envOverrides);
|
|
93
|
+
child.stdout.setEncoding('utf8');
|
|
94
|
+
child.stdout.on('data', (chunk) => {
|
|
95
|
+
stdout += chunk;
|
|
96
|
+
});
|
|
97
|
+
const code = await new Promise((resolve) => {
|
|
98
|
+
child.once('exit', (exitCode) => resolve(exitCode));
|
|
99
|
+
});
|
|
100
|
+
return { code, stderr: getStderr(), stdout };
|
|
101
|
+
}
|
|
102
|
+
/** Legacy initialize → notifications/initialized → tools/list over stdio. */
|
|
103
|
+
async function initializeThenListTools(child, getStderr, clientName) {
|
|
104
|
+
var _a;
|
|
105
|
+
writeLine(child, {
|
|
106
|
+
jsonrpc: '2.0',
|
|
107
|
+
id: 1,
|
|
108
|
+
method: 'initialize',
|
|
109
|
+
params: {
|
|
110
|
+
protocolVersion: '2024-11-05',
|
|
111
|
+
capabilities: {},
|
|
112
|
+
clientInfo: { name: clientName, version: '0.0.0' },
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
const initResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, getStderr);
|
|
116
|
+
(0, vitest_1.expect)(initResponse.error).toBeUndefined();
|
|
117
|
+
(0, vitest_1.expect)(initResponse.result).toBeDefined();
|
|
118
|
+
const initResult = initResponse.result;
|
|
119
|
+
(0, vitest_1.expect)(initResult.protocolVersion).toBeTruthy();
|
|
120
|
+
writeLine(child, {
|
|
121
|
+
jsonrpc: '2.0',
|
|
122
|
+
method: 'notifications/initialized',
|
|
123
|
+
});
|
|
124
|
+
writeLine(child, {
|
|
125
|
+
jsonrpc: '2.0',
|
|
126
|
+
id: 2,
|
|
127
|
+
method: 'tools/list',
|
|
128
|
+
params: {},
|
|
129
|
+
});
|
|
130
|
+
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, getStderr);
|
|
131
|
+
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
132
|
+
const tools = listResponse.result.tools;
|
|
133
|
+
(0, vitest_1.expect)(Array.isArray(tools)).toBe(true);
|
|
134
|
+
return { serverName: (_a = initResult.serverInfo) === null || _a === void 0 ? void 0 : _a.name, tools: tools !== null && tools !== void 0 ? tools : [] };
|
|
135
|
+
}
|
|
74
136
|
(0, vitest_1.describe)('stdio process smoke', () => {
|
|
75
137
|
let child;
|
|
76
138
|
(0, vitest_1.afterEach)(() => {
|
|
@@ -79,16 +141,9 @@ function killChild(child) {
|
|
|
79
141
|
});
|
|
80
142
|
(0, vitest_1.it)('server/discover then tools/list over stdio (modern era)', async () => {
|
|
81
143
|
var _a;
|
|
82
|
-
|
|
83
|
-
child =
|
|
84
|
-
|
|
85
|
-
env: Object.assign(Object.assign({}, process.env), { LIGHTDASH_URL: 'https://app.lightdash.cloud', LIGHTDASH_API_KEY: 'dummy-key-for-stdio-smoke', LIGHTDASH_TOOLS_MCP_STDIO_PROFILE: 'semantic-layer', LIGHTDASH_TOOLS_AUDIT_LOG: undefined }),
|
|
86
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
87
|
-
});
|
|
88
|
-
child.stderr.setEncoding('utf8');
|
|
89
|
-
child.stderr.on('data', (chunk) => {
|
|
90
|
-
stderr += chunk;
|
|
91
|
-
});
|
|
144
|
+
const spawned = spawnStdioBin(['stdio', '--profile', 'semantic-layer']);
|
|
145
|
+
child = spawned.child;
|
|
146
|
+
const getStderr = spawned.getStderr;
|
|
92
147
|
const modernMeta = {
|
|
93
148
|
[server_1.PROTOCOL_VERSION_META_KEY]: '2026-07-28',
|
|
94
149
|
[server_1.CLIENT_INFO_META_KEY]: {
|
|
@@ -103,7 +158,7 @@ function killChild(child) {
|
|
|
103
158
|
method: 'server/discover',
|
|
104
159
|
params: { _meta: modernMeta },
|
|
105
160
|
});
|
|
106
|
-
const discoverResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS,
|
|
161
|
+
const discoverResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, getStderr);
|
|
107
162
|
(0, vitest_1.expect)(discoverResponse.error).toBeUndefined();
|
|
108
163
|
(0, vitest_1.expect)(discoverResponse.result).toBeDefined();
|
|
109
164
|
const discoverResult = discoverResponse.result;
|
|
@@ -115,7 +170,7 @@ function killChild(child) {
|
|
|
115
170
|
method: 'tools/list',
|
|
116
171
|
params: { _meta: modernMeta },
|
|
117
172
|
});
|
|
118
|
-
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS,
|
|
173
|
+
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, getStderr);
|
|
119
174
|
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
120
175
|
(0, vitest_1.expect)(listResponse.result).toMatchObject({
|
|
121
176
|
tools: vitest_1.expect.arrayContaining([
|
|
@@ -128,148 +183,34 @@ function killChild(child) {
|
|
|
128
183
|
child = undefined;
|
|
129
184
|
});
|
|
130
185
|
(0, vitest_1.it)('initialize then tools/list over stdio', async () => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
LIGHTDASH_TOOLS_AUDIT_LOG: undefined }),
|
|
138
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
139
|
-
});
|
|
140
|
-
// Drain stderr so the child cannot block on a full pipe and preserve it for failures.
|
|
141
|
-
child.stderr.setEncoding('utf8');
|
|
142
|
-
child.stderr.on('data', (chunk) => {
|
|
143
|
-
stderr += chunk;
|
|
144
|
-
});
|
|
145
|
-
writeLine(child, {
|
|
146
|
-
jsonrpc: '2.0',
|
|
147
|
-
id: 1,
|
|
148
|
-
method: 'initialize',
|
|
149
|
-
params: {
|
|
150
|
-
protocolVersion: '2024-11-05',
|
|
151
|
-
capabilities: {},
|
|
152
|
-
clientInfo: { name: 'stdio-process-smoke', version: '0.0.0' },
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
const initResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, () => stderr);
|
|
156
|
-
(0, vitest_1.expect)(initResponse.error).toBeUndefined();
|
|
157
|
-
(0, vitest_1.expect)(initResponse.result).toBeDefined();
|
|
158
|
-
const initResult = initResponse.result;
|
|
159
|
-
(0, vitest_1.expect)((_a = initResult.serverInfo) === null || _a === void 0 ? void 0 : _a.name).toBe('lightdash-mcp-semantic-layer');
|
|
160
|
-
(0, vitest_1.expect)(initResult.protocolVersion).toBeTruthy();
|
|
161
|
-
writeLine(child, {
|
|
162
|
-
jsonrpc: '2.0',
|
|
163
|
-
method: 'notifications/initialized',
|
|
164
|
-
});
|
|
165
|
-
writeLine(child, {
|
|
166
|
-
jsonrpc: '2.0',
|
|
167
|
-
id: 2,
|
|
168
|
-
method: 'tools/list',
|
|
169
|
-
params: {},
|
|
170
|
-
});
|
|
171
|
-
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, () => stderr);
|
|
172
|
-
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
173
|
-
const listResult = listResponse.result;
|
|
174
|
-
(0, vitest_1.expect)(Array.isArray(listResult.tools)).toBe(true);
|
|
175
|
-
(0, vitest_1.expect)(listResult.tools.length).toBeGreaterThan(0);
|
|
176
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_list_projects')).toBe(true);
|
|
186
|
+
const spawned = spawnStdioBin(['stdio', '--profile', 'semantic-layer']);
|
|
187
|
+
child = spawned.child;
|
|
188
|
+
const { serverName, tools } = await initializeThenListTools(child, spawned.getStderr, 'stdio-process-smoke');
|
|
189
|
+
(0, vitest_1.expect)(serverName).toBe('lightdash-mcp-semantic-layer');
|
|
190
|
+
(0, vitest_1.expect)(tools.length).toBeGreaterThan(0);
|
|
191
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_list_projects')).toBe(true);
|
|
177
192
|
killChild(child);
|
|
178
193
|
child = undefined;
|
|
179
194
|
});
|
|
180
195
|
(0, vitest_1.it)('initialize then tools/list for content-reader profile', async () => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
child.stderr.on('data', (chunk) => {
|
|
190
|
-
stderr += chunk;
|
|
191
|
-
});
|
|
192
|
-
writeLine(child, {
|
|
193
|
-
jsonrpc: '2.0',
|
|
194
|
-
id: 1,
|
|
195
|
-
method: 'initialize',
|
|
196
|
-
params: {
|
|
197
|
-
protocolVersion: '2024-11-05',
|
|
198
|
-
capabilities: {},
|
|
199
|
-
clientInfo: { name: 'stdio-process-smoke', version: '0.0.0' },
|
|
200
|
-
},
|
|
201
|
-
});
|
|
202
|
-
const initResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, () => stderr);
|
|
203
|
-
(0, vitest_1.expect)(initResponse.error).toBeUndefined();
|
|
204
|
-
(0, vitest_1.expect)(initResponse.result).toBeDefined();
|
|
205
|
-
const initResult = initResponse.result;
|
|
206
|
-
(0, vitest_1.expect)((_a = initResult.serverInfo) === null || _a === void 0 ? void 0 : _a.name).toBe('lightdash-mcp-content');
|
|
207
|
-
(0, vitest_1.expect)(initResult.protocolVersion).toBeTruthy();
|
|
208
|
-
writeLine(child, {
|
|
209
|
-
jsonrpc: '2.0',
|
|
210
|
-
method: 'notifications/initialized',
|
|
211
|
-
});
|
|
212
|
-
writeLine(child, {
|
|
213
|
-
jsonrpc: '2.0',
|
|
214
|
-
id: 2,
|
|
215
|
-
method: 'tools/list',
|
|
216
|
-
params: {},
|
|
217
|
-
});
|
|
218
|
-
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, () => stderr);
|
|
219
|
-
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
220
|
-
const listResult = listResponse.result;
|
|
221
|
-
(0, vitest_1.expect)(Array.isArray(listResult.tools)).toBe(true);
|
|
222
|
-
(0, vitest_1.expect)(listResult.tools).toHaveLength(14);
|
|
223
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_search_content')).toBe(true);
|
|
224
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_run_chart')).toBe(true);
|
|
225
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_export_chart_image')).toBe(true);
|
|
196
|
+
const spawned = spawnStdioBin(['stdio', '--profile', 'content-reader']);
|
|
197
|
+
child = spawned.child;
|
|
198
|
+
const { serverName, tools } = await initializeThenListTools(child, spawned.getStderr, 'stdio-process-smoke');
|
|
199
|
+
(0, vitest_1.expect)(serverName).toBe('lightdash-mcp-content');
|
|
200
|
+
(0, vitest_1.expect)(tools).toHaveLength(14);
|
|
201
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_search_content')).toBe(true);
|
|
202
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_run_chart')).toBe(true);
|
|
203
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_export_chart_image')).toBe(true);
|
|
226
204
|
killChild(child);
|
|
227
205
|
child = undefined;
|
|
228
206
|
});
|
|
229
207
|
(0, vitest_1.it)('initialize then tools/list for content-governance profile', async () => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
});
|
|
237
|
-
child.stderr.setEncoding('utf8');
|
|
238
|
-
child.stderr.on('data', (chunk) => {
|
|
239
|
-
stderr += chunk;
|
|
240
|
-
});
|
|
241
|
-
writeLine(child, {
|
|
242
|
-
jsonrpc: '2.0',
|
|
243
|
-
id: 1,
|
|
244
|
-
method: 'initialize',
|
|
245
|
-
params: {
|
|
246
|
-
protocolVersion: '2024-11-05',
|
|
247
|
-
capabilities: {},
|
|
248
|
-
clientInfo: { name: 'stdio-process-smoke', version: '0.0.0' },
|
|
249
|
-
},
|
|
250
|
-
});
|
|
251
|
-
const initResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, () => stderr);
|
|
252
|
-
(0, vitest_1.expect)(initResponse.error).toBeUndefined();
|
|
253
|
-
(0, vitest_1.expect)(initResponse.result).toBeDefined();
|
|
254
|
-
const initResult = initResponse.result;
|
|
255
|
-
(0, vitest_1.expect)((_a = initResult.serverInfo) === null || _a === void 0 ? void 0 : _a.name).toBe('lightdash-mcp-gov');
|
|
256
|
-
(0, vitest_1.expect)(initResult.protocolVersion).toBeTruthy();
|
|
257
|
-
writeLine(child, {
|
|
258
|
-
jsonrpc: '2.0',
|
|
259
|
-
method: 'notifications/initialized',
|
|
260
|
-
});
|
|
261
|
-
writeLine(child, {
|
|
262
|
-
jsonrpc: '2.0',
|
|
263
|
-
id: 2,
|
|
264
|
-
method: 'tools/list',
|
|
265
|
-
params: {},
|
|
266
|
-
});
|
|
267
|
-
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, () => stderr);
|
|
268
|
-
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
269
|
-
const listResult = listResponse.result;
|
|
270
|
-
(0, vitest_1.expect)(Array.isArray(listResult.tools)).toBe(true);
|
|
271
|
-
(0, vitest_1.expect)(listResult.tools).toHaveLength(4);
|
|
272
|
-
(0, vitest_1.expect)(listResult.tools.map((t) => t.name).sort()).toEqual([
|
|
208
|
+
const spawned = spawnStdioBin(['stdio', '--profile', 'content-governance']);
|
|
209
|
+
child = spawned.child;
|
|
210
|
+
const { serverName, tools } = await initializeThenListTools(child, spawned.getStderr, 'stdio-process-smoke');
|
|
211
|
+
(0, vitest_1.expect)(serverName).toBe('lightdash-mcp-gov');
|
|
212
|
+
(0, vitest_1.expect)(tools).toHaveLength(4);
|
|
213
|
+
(0, vitest_1.expect)(tools.map((t) => t.name).sort()).toEqual([
|
|
273
214
|
'lightdash_delete_chart',
|
|
274
215
|
'lightdash_delete_dashboard',
|
|
275
216
|
'lightdash_get_dashboard_promote_diff',
|
|
@@ -279,52 +220,32 @@ function killChild(child) {
|
|
|
279
220
|
child = undefined;
|
|
280
221
|
});
|
|
281
222
|
(0, vitest_1.it)('initialize then tools/list for content-developer profile', async () => {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
child.stderr.on('data', (chunk) => {
|
|
291
|
-
stderr += chunk;
|
|
292
|
-
});
|
|
293
|
-
writeLine(child, {
|
|
294
|
-
jsonrpc: '2.0',
|
|
295
|
-
id: 1,
|
|
296
|
-
method: 'initialize',
|
|
297
|
-
params: {
|
|
298
|
-
protocolVersion: '2024-11-05',
|
|
299
|
-
capabilities: {},
|
|
300
|
-
clientInfo: { name: 'stdio-process-smoke', version: '0.0.0' },
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
const initResponse = await readJsonRpcResponse(child, 1, INIT_TIMEOUT_MS, () => stderr);
|
|
304
|
-
(0, vitest_1.expect)(initResponse.error).toBeUndefined();
|
|
305
|
-
(0, vitest_1.expect)(initResponse.result).toBeDefined();
|
|
306
|
-
const initResult = initResponse.result;
|
|
307
|
-
(0, vitest_1.expect)((_a = initResult.serverInfo) === null || _a === void 0 ? void 0 : _a.name).toBe('lightdash-mcp-cdev');
|
|
308
|
-
(0, vitest_1.expect)(initResult.protocolVersion).toBeTruthy();
|
|
309
|
-
writeLine(child, {
|
|
310
|
-
jsonrpc: '2.0',
|
|
311
|
-
method: 'notifications/initialized',
|
|
312
|
-
});
|
|
313
|
-
writeLine(child, {
|
|
314
|
-
jsonrpc: '2.0',
|
|
315
|
-
id: 2,
|
|
316
|
-
method: 'tools/list',
|
|
317
|
-
params: {},
|
|
318
|
-
});
|
|
319
|
-
const listResponse = await readJsonRpcResponse(child, 2, INIT_TIMEOUT_MS, () => stderr);
|
|
320
|
-
(0, vitest_1.expect)(listResponse.error).toBeUndefined();
|
|
321
|
-
const listResult = listResponse.result;
|
|
322
|
-
(0, vitest_1.expect)(Array.isArray(listResult.tools)).toBe(true);
|
|
323
|
-
(0, vitest_1.expect)(listResult.tools).toHaveLength(26);
|
|
324
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_get_chart_as_code')).toBe(true);
|
|
325
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_preview_dashboard_changes')).toBe(true);
|
|
326
|
-
(0, vitest_1.expect)(listResult.tools.some((t) => t.name === 'lightdash_move_content')).toBe(true);
|
|
223
|
+
const spawned = spawnStdioBin(['stdio', '--profile', 'content-developer']);
|
|
224
|
+
child = spawned.child;
|
|
225
|
+
const { serverName, tools } = await initializeThenListTools(child, spawned.getStderr, 'stdio-process-smoke');
|
|
226
|
+
(0, vitest_1.expect)(serverName).toBe('lightdash-mcp-cdev');
|
|
227
|
+
(0, vitest_1.expect)(tools).toHaveLength(26);
|
|
228
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_get_chart_as_code')).toBe(true);
|
|
229
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_preview_dashboard_changes')).toBe(true);
|
|
230
|
+
(0, vitest_1.expect)(tools.some((t) => t.name === 'lightdash_move_content')).toBe(true);
|
|
327
231
|
killChild(child);
|
|
328
232
|
child = undefined;
|
|
329
233
|
});
|
|
234
|
+
(0, vitest_1.it)('bare invoke exits nonzero without a transport', async () => {
|
|
235
|
+
const result = await spawnBinAndAwaitExit([]);
|
|
236
|
+
(0, vitest_1.expect)(result.code).toBe(1);
|
|
237
|
+
(0, vitest_1.expect)(result.stderr).toMatch(/stdio --profile/i);
|
|
238
|
+
(0, vitest_1.expect)(result.stdout).toBe('');
|
|
239
|
+
});
|
|
240
|
+
(0, vitest_1.it)('stdio without --profile exits nonzero', async () => {
|
|
241
|
+
const result = await spawnBinAndAwaitExit(['stdio']);
|
|
242
|
+
(0, vitest_1.expect)(result.code).not.toBe(0);
|
|
243
|
+
(0, vitest_1.expect)(result.stderr).toMatch(/required option|--profile|usage:/i);
|
|
244
|
+
});
|
|
245
|
+
(0, vitest_1.it)('stdio with invalid --profile exits nonzero', async () => {
|
|
246
|
+
const result = await spawnBinAndAwaitExit(['stdio', '--profile', 'not-a-profile']);
|
|
247
|
+
(0, vitest_1.expect)(result.code).toBe(1);
|
|
248
|
+
(0, vitest_1.expect)(result.stderr).toMatch(/Invalid profile/i);
|
|
249
|
+
(0, vitest_1.expect)(result.stdout).toBe('');
|
|
250
|
+
});
|
|
330
251
|
});
|
|
@@ -5,3 +5,5 @@ import type { McpContextProvider } from '../../server/request-context.js';
|
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerListProjectAgents(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
7
|
export declare function registerGetProjectAgent(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
|
+
export declare const listProjectAgentsTool: import("../types.js").ToolModule;
|
|
9
|
+
export declare const getProjectAgentTool: import("../types.js").ToolModule;
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* Project AI agent inventory tools (ai-agent-ops profile).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getProjectAgentTool = exports.listProjectAgentsTool = void 0;
|
|
6
7
|
exports.registerListProjectAgents = registerListProjectAgents;
|
|
7
8
|
exports.registerGetProjectAgent = registerGetProjectAgent;
|
|
8
9
|
const shared_js_1 = require("../shared.js");
|
|
10
|
+
const types_js_1 = require("../types.js");
|
|
9
11
|
const helpers_js_1 = require("./helpers.js");
|
|
10
12
|
function registerListProjectAgents(server, contextProvider) {
|
|
11
13
|
(0, shared_js_1.registerToolSafe)(server, 'list_project_agents', {
|
|
@@ -30,3 +32,6 @@ function registerGetProjectAgent(server, contextProvider) {
|
|
|
30
32
|
data: await c.v1.aiAgents.getAgent(scope.projectUuid, agentUuid),
|
|
31
33
|
}))));
|
|
32
34
|
}
|
|
35
|
+
// ToolModule exports (profile mounts)
|
|
36
|
+
exports.listProjectAgentsTool = (0, types_js_1.defineTool)('list_project_agents', registerListProjectAgents);
|
|
37
|
+
exports.getProjectAgentTool = (0, types_js_1.defineTool)('get_project_agent', registerGetProjectAgent);
|
|
@@ -7,3 +7,7 @@ export declare function registerEvaluateAgentReadiness(server: McpServer, contex
|
|
|
7
7
|
export declare function registerGetAgentSuggestions(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
8
|
export declare function registerGetAgentModels(server: McpServer, contextProvider: McpContextProvider): void;
|
|
9
9
|
export declare function registerGetExploreAccessSummary(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
|
+
export declare const evaluateAgentReadinessTool: import("../types.js").ToolModule;
|
|
11
|
+
export declare const getAgentSuggestionsTool: import("../types.js").ToolModule;
|
|
12
|
+
export declare const getAgentModelsTool: import("../types.js").ToolModule;
|
|
13
|
+
export declare const getExploreAccessSummaryTool: import("../types.js").ToolModule;
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
* AI agent discovery tools (readiness, suggestions, models, explore access).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getExploreAccessSummaryTool = exports.getAgentModelsTool = exports.getAgentSuggestionsTool = exports.evaluateAgentReadinessTool = void 0;
|
|
6
7
|
exports.registerEvaluateAgentReadiness = registerEvaluateAgentReadiness;
|
|
7
8
|
exports.registerGetAgentSuggestions = registerGetAgentSuggestions;
|
|
8
9
|
exports.registerGetAgentModels = registerGetAgentModels;
|
|
9
10
|
exports.registerGetExploreAccessSummary = registerGetExploreAccessSummary;
|
|
10
11
|
const zod_1 = require("zod");
|
|
11
12
|
const shared_js_1 = require("../shared.js");
|
|
13
|
+
const types_js_1 = require("../types.js");
|
|
12
14
|
const helpers_js_1 = require("./helpers.js");
|
|
13
15
|
const READINESS_LIMITATION = 'evaluate_agent_readiness calls the Lightdash readiness API only. It is not an evaluation-suite run and does not invoke the agent end-to-end.';
|
|
14
16
|
function registerEvaluateAgentReadiness(server, contextProvider) {
|
|
@@ -71,3 +73,8 @@ function registerGetExploreAccessSummary(server, contextProvider) {
|
|
|
71
73
|
}),
|
|
72
74
|
}))));
|
|
73
75
|
}
|
|
76
|
+
// ToolModule exports (profile mounts)
|
|
77
|
+
exports.evaluateAgentReadinessTool = (0, types_js_1.defineTool)('evaluate_agent_readiness', registerEvaluateAgentReadiness);
|
|
78
|
+
exports.getAgentSuggestionsTool = (0, types_js_1.defineTool)('get_agent_suggestions', registerGetAgentSuggestions);
|
|
79
|
+
exports.getAgentModelsTool = (0, types_js_1.defineTool)('get_agent_models', registerGetAgentModels);
|
|
80
|
+
exports.getExploreAccessSummaryTool = (0, types_js_1.defineTool)('get_explore_access_summary', registerGetExploreAccessSummary);
|
|
@@ -12,3 +12,12 @@ export declare function registerDeleteAgentEvaluation(server: McpServer, context
|
|
|
12
12
|
export declare function registerRunAgentEvaluation(server: McpServer, contextProvider: McpContextProvider): void;
|
|
13
13
|
export declare function registerListAgentEvaluationRuns(server: McpServer, contextProvider: McpContextProvider): void;
|
|
14
14
|
export declare function registerGetAgentEvalRunResults(server: McpServer, contextProvider: McpContextProvider): void;
|
|
15
|
+
export declare const listAgentEvaluationsTool: import("../types.js").ToolModule;
|
|
16
|
+
export declare const getAgentEvaluationTool: import("../types.js").ToolModule;
|
|
17
|
+
export declare const createAgentEvaluationTool: import("../types.js").ToolModule;
|
|
18
|
+
export declare const updateAgentEvaluationTool: import("../types.js").ToolModule;
|
|
19
|
+
export declare const appendAgentEvaluationPromptsTool: import("../types.js").ToolModule;
|
|
20
|
+
export declare const deleteAgentEvaluationTool: import("../types.js").ToolModule;
|
|
21
|
+
export declare const runAgentEvaluationTool: import("../types.js").ToolModule;
|
|
22
|
+
export declare const listAgentEvaluationRunsTool: import("../types.js").ToolModule;
|
|
23
|
+
export declare const getAgentEvalRunResultsTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* AI agent evaluation suite/run tools (ai-agent-ops profile).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getAgentEvalRunResultsTool = exports.listAgentEvaluationRunsTool = exports.runAgentEvaluationTool = exports.deleteAgentEvaluationTool = exports.appendAgentEvaluationPromptsTool = exports.updateAgentEvaluationTool = exports.createAgentEvaluationTool = exports.getAgentEvaluationTool = exports.listAgentEvaluationsTool = void 0;
|
|
6
7
|
exports.registerListAgentEvaluations = registerListAgentEvaluations;
|
|
7
8
|
exports.registerGetAgentEvaluation = registerGetAgentEvaluation;
|
|
8
9
|
exports.registerCreateAgentEvaluation = registerCreateAgentEvaluation;
|
|
@@ -15,6 +16,7 @@ exports.registerGetAgentEvalRunResults = registerGetAgentEvalRunResults;
|
|
|
15
16
|
const common_1 = require("@lightdash-tools/common");
|
|
16
17
|
const zod_1 = require("zod");
|
|
17
18
|
const shared_js_1 = require("../shared.js");
|
|
19
|
+
const types_js_1 = require("../types.js");
|
|
18
20
|
const helpers_js_1 = require("./helpers.js");
|
|
19
21
|
function registerListAgentEvaluations(server, contextProvider) {
|
|
20
22
|
(0, shared_js_1.registerToolSafe)(server, 'list_agent_evaluations', {
|
|
@@ -175,3 +177,13 @@ function registerGetAgentEvalRunResults(server, contextProvider) {
|
|
|
175
177
|
] });
|
|
176
178
|
})));
|
|
177
179
|
}
|
|
180
|
+
// ToolModule exports (profile mounts)
|
|
181
|
+
exports.listAgentEvaluationsTool = (0, types_js_1.defineTool)('list_agent_evaluations', registerListAgentEvaluations);
|
|
182
|
+
exports.getAgentEvaluationTool = (0, types_js_1.defineTool)('get_agent_evaluation', registerGetAgentEvaluation);
|
|
183
|
+
exports.createAgentEvaluationTool = (0, types_js_1.defineTool)('create_agent_evaluation', registerCreateAgentEvaluation);
|
|
184
|
+
exports.updateAgentEvaluationTool = (0, types_js_1.defineTool)('update_agent_evaluation', registerUpdateAgentEvaluation);
|
|
185
|
+
exports.appendAgentEvaluationPromptsTool = (0, types_js_1.defineTool)('append_agent_evaluation_prompts', registerAppendAgentEvaluationPrompts);
|
|
186
|
+
exports.deleteAgentEvaluationTool = (0, types_js_1.defineTool)('delete_agent_evaluation', registerDeleteAgentEvaluation);
|
|
187
|
+
exports.runAgentEvaluationTool = (0, types_js_1.defineTool)('run_agent_evaluation', registerRunAgentEvaluation);
|
|
188
|
+
exports.listAgentEvaluationRunsTool = (0, types_js_1.defineTool)('list_agent_evaluation_runs', registerListAgentEvaluationRuns);
|
|
189
|
+
exports.getAgentEvalRunResultsTool = (0, types_js_1.defineTool)('get_agent_eval_run_results', registerGetAgentEvalRunResults);
|
|
@@ -5,3 +5,5 @@ import type { McpContextProvider } from '../../server/request-context.js';
|
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerListAgentThreads(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
7
|
export declare function registerGetAgentThread(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
|
+
export declare const listAgentThreadsTool: import("../types.js").ToolModule;
|
|
9
|
+
export declare const getAgentThreadTool: import("../types.js").ToolModule;
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* AI agent thread read tools (ai-agent-ops profile).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getAgentThreadTool = exports.listAgentThreadsTool = void 0;
|
|
6
7
|
exports.registerListAgentThreads = registerListAgentThreads;
|
|
7
8
|
exports.registerGetAgentThread = registerGetAgentThread;
|
|
8
9
|
const shared_js_1 = require("../shared.js");
|
|
10
|
+
const types_js_1 = require("../types.js");
|
|
9
11
|
const helpers_js_1 = require("./helpers.js");
|
|
10
12
|
function registerListAgentThreads(server, contextProvider) {
|
|
11
13
|
(0, shared_js_1.registerToolSafe)(server, 'list_agent_threads', {
|
|
@@ -38,3 +40,6 @@ function registerGetAgentThread(server, contextProvider) {
|
|
|
38
40
|
return (0, helpers_js_1.redactThreadMessages)(thread, includeMessageText === true);
|
|
39
41
|
})));
|
|
40
42
|
}
|
|
43
|
+
// ToolModule exports (profile mounts)
|
|
44
|
+
exports.listAgentThreadsTool = (0, types_js_1.defineTool)('list_agent_threads', registerListAgentThreads);
|
|
45
|
+
exports.getAgentThreadTool = (0, types_js_1.defineTool)('get_agent_thread', registerGetAgentThread);
|
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerExplainContent(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
|
+
export declare const explainContentTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Deterministic metadata-based content explanation (no invented semantics).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.explainContentTool = void 0;
|
|
6
7
|
exports.registerExplainContent = registerExplainContent;
|
|
7
8
|
const zod_1 = require("zod");
|
|
8
9
|
const project_scope_js_1 = require("../../governance/project-scope.js");
|
|
@@ -14,6 +15,7 @@ const reader_content_js_1 = require("../project/reader-content.js");
|
|
|
14
15
|
const chart_source_js_1 = require("../query/chart-source.js");
|
|
15
16
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
16
17
|
const shared_js_1 = require("../shared.js");
|
|
18
|
+
const types_js_1 = require("../types.js");
|
|
17
19
|
function registerExplainContent(server, contextProvider) {
|
|
18
20
|
(0, content_reader_js_1.registerContentReaderTool)(server, 'explain_content', {
|
|
19
21
|
title: 'Explain content',
|
|
@@ -108,3 +110,5 @@ function registerExplainContent(server, contextProvider) {
|
|
|
108
110
|
}
|
|
109
111
|
}));
|
|
110
112
|
}
|
|
113
|
+
// ToolModule exports (profile mounts)
|
|
114
|
+
exports.explainContentTool = (0, types_js_1.defineTool)('explain_content', registerExplainContent);
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const common_1 = require("@lightdash-tools/common");
|
|
7
7
|
const vitest_1 = require("vitest");
|
|
8
|
+
const server_profile_js_1 = require("../../audit/server-profile.js");
|
|
9
|
+
const index_js_1 = require("../../profiles/index.js");
|
|
8
10
|
const registry_js_1 = require("../registry.js");
|
|
9
11
|
const shared_js_1 = require("../shared.js");
|
|
10
12
|
(0, vitest_1.describe)('organization-audit safety invariants', () => {
|
|
11
|
-
(0, vitest_1.it)('registers only readOnlyHint tools for
|
|
13
|
+
(0, vitest_1.it)('registers only readOnlyHint tools for profile-mounted tools', () => {
|
|
12
14
|
const annotationsByName = new Map();
|
|
13
15
|
const mockServer = {
|
|
14
16
|
registerTool: vitest_1.vi.fn((name, options) => {
|
|
@@ -16,8 +18,10 @@ const shared_js_1 = require("../shared.js");
|
|
|
16
18
|
}),
|
|
17
19
|
};
|
|
18
20
|
const mockCtx = { getContext: async () => ({ lightdashClient: {} }) };
|
|
19
|
-
const
|
|
20
|
-
(0,
|
|
21
|
+
const profile = (0, index_js_1.getProfile)('organization-audit');
|
|
22
|
+
const toolIds = (0, index_js_1.listToolIds)(profile);
|
|
23
|
+
(0, server_profile_js_1.bindServerProfile)(mockServer, profile.id);
|
|
24
|
+
(0, registry_js_1.registerTools)(mockServer, mockCtx, profile.tools);
|
|
21
25
|
(0, vitest_1.expect)(annotationsByName.size).toBe(toolIds.length);
|
|
22
26
|
for (const id of toolIds) {
|
|
23
27
|
const annotations = annotationsByName.get(`${shared_js_1.TOOL_PREFIX}${id}`);
|
|
@@ -8,3 +8,8 @@ export declare function registerListOrgMembers(server: McpServer, contextProvide
|
|
|
8
8
|
export declare function registerGetOrgMember(server: McpServer, contextProvider: McpContextProvider): void;
|
|
9
9
|
export declare function registerListOrgGroups(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
10
|
export declare function registerListOrgProjects(server: McpServer, contextProvider: McpContextProvider): void;
|
|
11
|
+
export declare const getOrgProfileTool: import("../types.js").ToolModule;
|
|
12
|
+
export declare const listOrgMembersTool: import("../types.js").ToolModule;
|
|
13
|
+
export declare const getOrgMemberTool: import("../types.js").ToolModule;
|
|
14
|
+
export declare const listOrgGroupsTool: import("../types.js").ToolModule;
|
|
15
|
+
export declare const listOrgProjectsTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Organization inventory primitive tools.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.listOrgProjectsTool = exports.listOrgGroupsTool = exports.getOrgMemberTool = exports.listOrgMembersTool = exports.getOrgProfileTool = void 0;
|
|
6
7
|
exports.registerGetOrgProfile = registerGetOrgProfile;
|
|
7
8
|
exports.registerListOrgMembers = registerListOrgMembers;
|
|
8
9
|
exports.registerGetOrgMember = registerGetOrgMember;
|
|
@@ -16,6 +17,7 @@ const redaction_js_1 = require("../lib/redaction.js");
|
|
|
16
17
|
const register_org_audit_js_1 = require("../lib/register-org-audit.js");
|
|
17
18
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
18
19
|
const shared_js_1 = require("../shared.js");
|
|
20
|
+
const types_js_1 = require("../types.js");
|
|
19
21
|
const binding_js_1 = require("./binding.js");
|
|
20
22
|
function registerGetOrgProfile(server, contextProvider) {
|
|
21
23
|
(0, register_org_audit_js_1.registerOrgAuditTool)(server, 'get_org_profile', {
|
|
@@ -188,3 +190,9 @@ function registerListOrgProjects(server, contextProvider) {
|
|
|
188
190
|
});
|
|
189
191
|
}));
|
|
190
192
|
}
|
|
193
|
+
// ToolModule exports (profile mounts)
|
|
194
|
+
exports.getOrgProfileTool = (0, types_js_1.defineTool)('get_org_profile', registerGetOrgProfile);
|
|
195
|
+
exports.listOrgMembersTool = (0, types_js_1.defineTool)('list_org_members', registerListOrgMembers);
|
|
196
|
+
exports.getOrgMemberTool = (0, types_js_1.defineTool)('get_org_member', registerGetOrgMember);
|
|
197
|
+
exports.listOrgGroupsTool = (0, types_js_1.defineTool)('list_org_groups', registerListOrgGroups);
|
|
198
|
+
exports.listOrgProjectsTool = (0, types_js_1.defineTool)('list_org_projects', registerListOrgProjects);
|
|
@@ -8,3 +8,8 @@ export declare function registerListCustomRoles(server: McpServer, contextProvid
|
|
|
8
8
|
export declare function registerGetCustomRole(server: McpServer, contextProvider: McpContextProvider): void;
|
|
9
9
|
export declare function registerListProjectRoles(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
10
|
export declare function registerListProjectDirectAccess(server: McpServer, contextProvider: McpContextProvider): void;
|
|
11
|
+
export declare const listOrgRoleAssignmentsTool: import("../types.js").ToolModule;
|
|
12
|
+
export declare const listCustomRolesTool: import("../types.js").ToolModule;
|
|
13
|
+
export declare const getCustomRoleTool: import("../types.js").ToolModule;
|
|
14
|
+
export declare const listProjectRolesTool: import("../types.js").ToolModule;
|
|
15
|
+
export declare const listProjectDirectAccessTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Roles and project access primitive tools.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.listProjectDirectAccessTool = exports.listProjectRolesTool = exports.getCustomRoleTool = exports.listCustomRolesTool = exports.listOrgRoleAssignmentsTool = void 0;
|
|
6
7
|
exports.registerListOrgRoleAssignments = registerListOrgRoleAssignments;
|
|
7
8
|
exports.registerListCustomRoles = registerListCustomRoles;
|
|
8
9
|
exports.registerGetCustomRole = registerGetCustomRole;
|
|
@@ -16,6 +17,7 @@ const redaction_js_1 = require("../lib/redaction.js");
|
|
|
16
17
|
const register_org_audit_js_1 = require("../lib/register-org-audit.js");
|
|
17
18
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
18
19
|
const shared_js_1 = require("../shared.js");
|
|
20
|
+
const types_js_1 = require("../types.js");
|
|
19
21
|
const binding_js_1 = require("./binding.js");
|
|
20
22
|
function registerListOrgRoleAssignments(server, contextProvider) {
|
|
21
23
|
(0, register_org_audit_js_1.registerOrgAuditTool)(server, 'list_org_role_assignments', {
|
|
@@ -211,3 +213,9 @@ function registerListProjectDirectAccess(server, contextProvider) {
|
|
|
211
213
|
});
|
|
212
214
|
}));
|
|
213
215
|
}
|
|
216
|
+
// ToolModule exports (profile mounts)
|
|
217
|
+
exports.listOrgRoleAssignmentsTool = (0, types_js_1.defineTool)('list_org_role_assignments', registerListOrgRoleAssignments);
|
|
218
|
+
exports.listCustomRolesTool = (0, types_js_1.defineTool)('list_custom_roles', registerListCustomRoles);
|
|
219
|
+
exports.getCustomRoleTool = (0, types_js_1.defineTool)('get_custom_role', registerGetCustomRole);
|
|
220
|
+
exports.listProjectRolesTool = (0, types_js_1.defineTool)('list_project_roles', registerListProjectRoles);
|
|
221
|
+
exports.listProjectDirectAccessTool = (0, types_js_1.defineTool)('list_project_direct_access', registerListProjectDirectAccess);
|