@lightdash-tools/mcp 0.20.0 → 0.21.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/README.md +5 -5
- package/dist/auth/request-state-key.d.ts +2 -2
- package/dist/auth/request-state-key.js +2 -2
- package/dist/config/enabled-profiles.d.ts +1 -1
- package/dist/config/enabled-profiles.js +3 -2
- package/dist/config/enabled-profiles.test.js +1 -0
- package/dist/policy/create-agent-preview.d.ts +65 -0
- package/dist/policy/create-agent-preview.js +126 -0
- package/dist/policy/create-agent-preview.test.d.ts +4 -0
- package/dist/policy/create-agent-preview.test.js +162 -0
- package/dist/profiles/ai-agent-ops/v1/index.js +10 -0
- package/dist/profiles/ai-agent-ops/v1/invariants.d.ts +6 -3
- package/dist/profiles/ai-agent-ops/v1/invariants.js +6 -2
- package/dist/profiles/ai-agent-ops/v1/prompts.js +24 -3
- package/dist/profiles/ai-agent-ops/v1/prompts.test.js +10 -1
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/core.md +34 -2
- package/dist/profiles/ai-agent-ops/v1/resources/playbooks/loop-engineering.md +9 -4
- package/dist/profiles/index.test.js +7 -2
- package/dist/server/server.js +16 -4
- package/dist/tools/ai-agents/agents.d.ts +8 -0
- package/dist/tools/ai-agents/agents.js +283 -1
- package/dist/tools/ai-agents/agents.test.js +25 -0
- package/dist/tools/ai-agents/create-elicitation.d.ts +52 -0
- package/dist/tools/ai-agents/create-elicitation.js +206 -0
- package/dist/tools/ai-agents/create-elicitation.test.d.ts +4 -0
- package/dist/tools/ai-agents/create-elicitation.test.js +363 -0
- package/dist/tools/ai-agents/create-request-state.d.ts +18 -0
- package/dist/tools/ai-agents/create-request-state.js +43 -0
- package/dist/tools/ai-agents/documents.d.ts +15 -0
- package/dist/tools/ai-agents/documents.js +212 -0
- package/dist/tools/ai-agents/documents.test.d.ts +1 -0
- package/dist/tools/ai-agents/documents.test.js +129 -0
- package/dist/tools/ai-agents/gate-create-project-agent.d.ts +28 -0
- package/dist/tools/ai-agents/gate-create-project-agent.js +71 -0
- package/dist/tools/ai-agents/helpers.d.ts +11 -0
- package/dist/tools/ai-agents/helpers.js +29 -1
- package/dist/tools/ai-agents/knowledge-warnings.d.ts +11 -0
- package/dist/tools/ai-agents/knowledge-warnings.js +21 -0
- package/dist/tools/ai-agents/space-warnings.d.ts +36 -0
- package/dist/tools/ai-agents/space-warnings.js +101 -0
- package/dist/tools/ai-agents/space-warnings.test.d.ts +1 -0
- package/dist/tools/ai-agents/space-warnings.test.js +78 -0
- package/dist/tools/ai-agents/tag-warnings.d.ts +31 -0
- package/dist/tools/ai-agents/tag-warnings.js +70 -0
- package/dist/tools/ai-agents/test-support.d.ts +4 -1
- package/dist/tools/ai-agents/test-support.js +7 -2
- package/package.json +3 -3
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Soft warnings when agent spaceAccess UUIDs are not found in the project.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.effectiveAgentSpaceAccess = effectiveAgentSpaceAccess;
|
|
7
|
+
exports.fetchSpaceAccessValidation = fetchSpaceAccessValidation;
|
|
8
|
+
exports.formatSpaceAccessPreviewLine = formatSpaceAccessPreviewLine;
|
|
9
|
+
exports.warningsFromSpaceAccessValidation = warningsFromSpaceAccessValidation;
|
|
10
|
+
exports.warningsForAgentSpaceAccess = warningsForAgentSpaceAccess;
|
|
11
|
+
/** Non-empty spaceAccess only; null/empty skip (all project spaces). */
|
|
12
|
+
function effectiveAgentSpaceAccess(spaceAccess) {
|
|
13
|
+
if (spaceAccess == null || spaceAccess.length === 0) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return spaceAccess;
|
|
17
|
+
}
|
|
18
|
+
/** Validate spaceAccess UUIDs against the project space list. */
|
|
19
|
+
async function fetchSpaceAccessValidation(client, projectUuid, spaceAccess) {
|
|
20
|
+
const effective = effectiveAgentSpaceAccess(spaceAccess);
|
|
21
|
+
if (effective === undefined) {
|
|
22
|
+
return { skipped: true };
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const spaces = await client.listSpacesInProject(projectUuid);
|
|
26
|
+
const byUuid = new Map(spaces.map((space) => [space.uuid, space]));
|
|
27
|
+
const resolved = [];
|
|
28
|
+
const unknownUuids = [];
|
|
29
|
+
for (const uuid of effective) {
|
|
30
|
+
const space = byUuid.get(uuid);
|
|
31
|
+
if (space === undefined) {
|
|
32
|
+
unknownUuids.push(uuid);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
resolved.push({ uuid: space.uuid, name: space.name });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return { resolved, unknownUuids };
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return { error: err instanceof Error ? err : new Error(String(err)) };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Human-readable space scope line for create confirmation / preview. */
|
|
45
|
+
function formatSpaceAccessPreviewLine(spaceAccess, validation) {
|
|
46
|
+
var _a, _b, _c;
|
|
47
|
+
if ('skipped' in validation) {
|
|
48
|
+
return 'Space access: (all project spaces)';
|
|
49
|
+
}
|
|
50
|
+
if ('error' in validation) {
|
|
51
|
+
const count = (_b = (_a = effectiveAgentSpaceAccess(spaceAccess)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
52
|
+
return `Space access: ${count} UUID(s) configured (names unavailable — space list call failed)`;
|
|
53
|
+
}
|
|
54
|
+
if (validation.unknownUuids.length > 0) {
|
|
55
|
+
const known = formatResolvedSpaceRefs(validation.resolved);
|
|
56
|
+
const unknown = validation.unknownUuids.join(', ');
|
|
57
|
+
const effective = effectiveAgentSpaceAccess(spaceAccess);
|
|
58
|
+
const count = (_c = effective === null || effective === void 0 ? void 0 : effective.length) !== null && _c !== void 0 ? _c : validation.resolved.length + validation.unknownUuids.length;
|
|
59
|
+
return known.length > 0
|
|
60
|
+
? `Space access: ${count} UUID(s) — known: ${known}; not in project: ${unknown}`
|
|
61
|
+
: `Space access: ${count} UUID(s) not found in project: ${unknown}`;
|
|
62
|
+
}
|
|
63
|
+
return `Space access: ${validation.resolved.length} space(s): ${formatResolvedSpaceRefs(validation.resolved)}`;
|
|
64
|
+
}
|
|
65
|
+
function formatResolvedSpaceRefs(spaces) {
|
|
66
|
+
return spaces.map((s) => `${s.name} (${s.uuid})`).join(', ');
|
|
67
|
+
}
|
|
68
|
+
/** Derive soft warnings from a prior validation result (no upstream call). */
|
|
69
|
+
function warningsFromSpaceAccessValidation(result) {
|
|
70
|
+
if ('skipped' in result) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
if ('error' in result) {
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
code: 'SPACE_LIST_UNAVAILABLE',
|
|
77
|
+
message: `Could not verify agent spaceAccess UUIDs: ${result.error.message}`,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
if (result.unknownUuids.length > 0) {
|
|
82
|
+
const known = formatResolvedSpaceRefs(result.resolved);
|
|
83
|
+
return [
|
|
84
|
+
{
|
|
85
|
+
code: 'SPACES_NOT_IN_PROJECT',
|
|
86
|
+
message: `spaceAccess includes UUID(s) not found in this project: ${result.unknownUuids.join(', ')}.` +
|
|
87
|
+
(known.length > 0 ? ` Known: ${known}.` : '') +
|
|
88
|
+
' Discover valid UUIDs via content-reader list_spaces — do not invent.',
|
|
89
|
+
},
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* After create/update with non-empty spaceAccess, warn when UUIDs are missing from the project.
|
|
96
|
+
* Never fails the mutation.
|
|
97
|
+
*/
|
|
98
|
+
async function warningsForAgentSpaceAccess(client, projectUuid, spaceAccess) {
|
|
99
|
+
const result = await fetchSpaceAccessValidation(client, projectUuid, spaceAccess);
|
|
100
|
+
return warningsFromSpaceAccessValidation(result);
|
|
101
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const space_warnings_js_1 = require("./space-warnings.js");
|
|
5
|
+
const PROJECT = '11111111-1111-1111-1111-111111111111';
|
|
6
|
+
const SPACE_A = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa';
|
|
7
|
+
const SPACE_B = 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb';
|
|
8
|
+
const UNKNOWN = 'cccccccc-cccc-cccc-cccc-cccccccccccc';
|
|
9
|
+
(0, vitest_1.describe)('warningsForAgentSpaceAccess', () => {
|
|
10
|
+
(0, vitest_1.it)('skips when spaceAccess is undefined or empty', async () => {
|
|
11
|
+
const listSpacesInProject = vitest_1.vi.fn();
|
|
12
|
+
const client = { listSpacesInProject };
|
|
13
|
+
(0, vitest_1.expect)(await (0, space_warnings_js_1.warningsForAgentSpaceAccess)(client, PROJECT, undefined)).toEqual([]);
|
|
14
|
+
(0, vitest_1.expect)(await (0, space_warnings_js_1.warningsForAgentSpaceAccess)(client, PROJECT, [])).toEqual([]);
|
|
15
|
+
(0, vitest_1.expect)(listSpacesInProject).not.toHaveBeenCalled();
|
|
16
|
+
});
|
|
17
|
+
(0, vitest_1.it)('returns SPACES_NOT_IN_PROJECT when UUIDs are missing', async () => {
|
|
18
|
+
var _a;
|
|
19
|
+
const listSpacesInProject = vitest_1.vi.fn().mockResolvedValue([{ uuid: SPACE_A, name: 'Finance' }]);
|
|
20
|
+
const warnings = await (0, space_warnings_js_1.warningsForAgentSpaceAccess)({ listSpacesInProject }, PROJECT, [
|
|
21
|
+
SPACE_A,
|
|
22
|
+
UNKNOWN,
|
|
23
|
+
]);
|
|
24
|
+
(0, vitest_1.expect)(warnings).toEqual([
|
|
25
|
+
vitest_1.expect.objectContaining({
|
|
26
|
+
code: 'SPACES_NOT_IN_PROJECT',
|
|
27
|
+
message: vitest_1.expect.stringContaining(UNKNOWN),
|
|
28
|
+
}),
|
|
29
|
+
]);
|
|
30
|
+
(0, vitest_1.expect)((_a = warnings[0]) === null || _a === void 0 ? void 0 : _a.message).toContain('Finance');
|
|
31
|
+
});
|
|
32
|
+
(0, vitest_1.it)('returns no warning when all UUIDs match', async () => {
|
|
33
|
+
const listSpacesInProject = vitest_1.vi.fn().mockResolvedValue([
|
|
34
|
+
{ uuid: SPACE_A, name: 'Finance' },
|
|
35
|
+
{ uuid: SPACE_B, name: 'Leadership' },
|
|
36
|
+
]);
|
|
37
|
+
const warnings = await (0, space_warnings_js_1.warningsForAgentSpaceAccess)({ listSpacesInProject }, PROJECT, [
|
|
38
|
+
SPACE_A,
|
|
39
|
+
SPACE_B,
|
|
40
|
+
]);
|
|
41
|
+
(0, vitest_1.expect)(warnings).toEqual([]);
|
|
42
|
+
});
|
|
43
|
+
(0, vitest_1.it)('returns SPACE_LIST_UNAVAILABLE when list throws', async () => {
|
|
44
|
+
const listSpacesInProject = vitest_1.vi.fn().mockRejectedValue(new Error('upstream down'));
|
|
45
|
+
const warnings = await (0, space_warnings_js_1.warningsForAgentSpaceAccess)({ listSpacesInProject }, PROJECT, [SPACE_A]);
|
|
46
|
+
(0, vitest_1.expect)(warnings).toEqual([
|
|
47
|
+
vitest_1.expect.objectContaining({
|
|
48
|
+
code: 'SPACE_LIST_UNAVAILABLE',
|
|
49
|
+
message: vitest_1.expect.stringContaining('upstream down'),
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
(0, vitest_1.describe)('warningsFromSpaceAccessValidation', () => {
|
|
55
|
+
(0, vitest_1.it)('derives SPACES_NOT_IN_PROJECT without upstream call', () => {
|
|
56
|
+
const warnings = (0, space_warnings_js_1.warningsFromSpaceAccessValidation)({
|
|
57
|
+
resolved: [{ uuid: SPACE_A, name: 'Finance' }],
|
|
58
|
+
unknownUuids: [UNKNOWN],
|
|
59
|
+
});
|
|
60
|
+
(0, vitest_1.expect)(warnings).toEqual([
|
|
61
|
+
vitest_1.expect.objectContaining({
|
|
62
|
+
code: 'SPACES_NOT_IN_PROJECT',
|
|
63
|
+
message: vitest_1.expect.stringContaining(UNKNOWN),
|
|
64
|
+
}),
|
|
65
|
+
]);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
(0, vitest_1.describe)('formatSpaceAccessPreviewLine', () => {
|
|
69
|
+
(0, vitest_1.it)('shows all spaces when skipped', () => {
|
|
70
|
+
(0, vitest_1.expect)((0, space_warnings_js_1.formatSpaceAccessPreviewLine)(undefined, { skipped: true })).toBe('Space access: (all project spaces)');
|
|
71
|
+
});
|
|
72
|
+
(0, vitest_1.it)('shows resolved names when all match', async () => {
|
|
73
|
+
const validation = await (0, space_warnings_js_1.fetchSpaceAccessValidation)({
|
|
74
|
+
listSpacesInProject: vitest_1.vi.fn().mockResolvedValue([{ uuid: SPACE_A, name: 'Finance' }]),
|
|
75
|
+
}, PROJECT, [SPACE_A]);
|
|
76
|
+
(0, vitest_1.expect)((0, space_warnings_js_1.formatSpaceAccessPreviewLine)([SPACE_A], validation)).toContain('Finance');
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soft warnings when agent tags match no explores (Lightdash explore allowlist).
|
|
3
|
+
*/
|
|
4
|
+
export type AgentTagWarningCode = 'EXPLORE_ACCESS_SUMMARY_UNAVAILABLE' | 'TAGS_MATCH_NO_EXPLORES';
|
|
5
|
+
export type AgentTagWarning = {
|
|
6
|
+
code: AgentTagWarningCode;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export type ExploreAccessSummaryClient = {
|
|
10
|
+
getExploreAccessSummary: (projectUuid: string, body: {
|
|
11
|
+
tags: string[] | null;
|
|
12
|
+
}) => Promise<unknown[]>;
|
|
13
|
+
};
|
|
14
|
+
/** Non-empty tags only; null/empty skip (all explores). */
|
|
15
|
+
export declare function effectiveAgentTags(tags: string[] | null | undefined): string[] | undefined;
|
|
16
|
+
export type ExploreAccessForTagsResult = {
|
|
17
|
+
count: number;
|
|
18
|
+
} | {
|
|
19
|
+
error: Error;
|
|
20
|
+
} | {
|
|
21
|
+
skipped: true;
|
|
22
|
+
};
|
|
23
|
+
/** Shared explore-access-summary fetch for preview messages and post-mutation warnings. */
|
|
24
|
+
export declare function fetchExploreAccessForAgentTags(client: ExploreAccessSummaryClient, projectUuid: string, tags: string[] | null | undefined): Promise<ExploreAccessForTagsResult>;
|
|
25
|
+
/** Explore count for create confirmation copy; null when all explores or summary unavailable. */
|
|
26
|
+
export declare function previewExploreCountForTags(client: ExploreAccessSummaryClient, projectUuid: string, tags: string[] | null | undefined): Promise<number | null>;
|
|
27
|
+
/**
|
|
28
|
+
* After create/update with non-empty tags, warn when explore-access-summary is empty.
|
|
29
|
+
* Never fails the mutation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function warningsForAgentTags(client: ExploreAccessSummaryClient, projectUuid: string, tags: string[] | null | undefined): Promise<AgentTagWarning[]>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Soft warnings when agent tags match no explores (Lightdash explore allowlist).
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.effectiveAgentTags = effectiveAgentTags;
|
|
7
|
+
exports.fetchExploreAccessForAgentTags = fetchExploreAccessForAgentTags;
|
|
8
|
+
exports.previewExploreCountForTags = previewExploreCountForTags;
|
|
9
|
+
exports.warningsForAgentTags = warningsForAgentTags;
|
|
10
|
+
/** Non-empty tags only; null/empty skip (all explores). */
|
|
11
|
+
function effectiveAgentTags(tags) {
|
|
12
|
+
if (tags == null || tags.length === 0) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return tags;
|
|
16
|
+
}
|
|
17
|
+
/** Shared explore-access-summary fetch for preview messages and post-mutation warnings. */
|
|
18
|
+
async function fetchExploreAccessForAgentTags(client, projectUuid, tags) {
|
|
19
|
+
const effective = effectiveAgentTags(tags);
|
|
20
|
+
if (effective === undefined) {
|
|
21
|
+
return { skipped: true };
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const summary = await client.getExploreAccessSummary(projectUuid, { tags: effective });
|
|
25
|
+
return { count: summary.length };
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
return { error: err instanceof Error ? err : new Error(String(err)) };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Explore count for create confirmation copy; null when all explores or summary unavailable. */
|
|
32
|
+
async function previewExploreCountForTags(client, projectUuid, tags) {
|
|
33
|
+
const result = await fetchExploreAccessForAgentTags(client, projectUuid, tags);
|
|
34
|
+
if ('skipped' in result) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if ('error' in result) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return result.count;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* After create/update with non-empty tags, warn when explore-access-summary is empty.
|
|
44
|
+
* Never fails the mutation.
|
|
45
|
+
*/
|
|
46
|
+
async function warningsForAgentTags(client, projectUuid, tags) {
|
|
47
|
+
const result = await fetchExploreAccessForAgentTags(client, projectUuid, tags);
|
|
48
|
+
if ('skipped' in result) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
if ('error' in result) {
|
|
52
|
+
return [
|
|
53
|
+
{
|
|
54
|
+
code: 'EXPLORE_ACCESS_SUMMARY_UNAVAILABLE',
|
|
55
|
+
message: `Could not verify explore access for agent tags: ${result.error.message}`,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
if (result.count === 0) {
|
|
60
|
+
return [
|
|
61
|
+
{
|
|
62
|
+
code: 'TAGS_MATCH_NO_EXPLORES',
|
|
63
|
+
message: 'Agent tags match no explores (OR match on dbt/Lightdash explore or field tags). ' +
|
|
64
|
+
'The agent will see no data model. Clear tags for all explores, or tag explores first, ' +
|
|
65
|
+
'then re-check with get_explore_access_summary.',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
@@ -17,8 +17,11 @@ export type RegisteredAiAgentTool = {
|
|
|
17
17
|
inputSchema: Record<string, unknown>;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
export declare function mockAiAgentsContext(aiAgents: Record<string, ReturnType<typeof vi.fn>>): McpContextProvider;
|
|
20
|
+
export declare function mockAiAgentsContext(aiAgents: Record<string, ReturnType<typeof vi.fn>>, spaces?: Record<string, ReturnType<typeof vi.fn>>): McpContextProvider;
|
|
21
21
|
export declare function registeredAiAgentTool(register: (server: never, ctx: McpContextProvider) => void, ctx: McpContextProvider, toolId: string, server?: {
|
|
22
22
|
registerTool: ReturnType<typeof vi.fn>;
|
|
23
|
+
server?: {
|
|
24
|
+
getClientCapabilities: () => unknown;
|
|
25
|
+
};
|
|
23
26
|
}): RegisteredAiAgentTool;
|
|
24
27
|
export declare function parseAiAgentToolBody(result: AiAgentToolResult): Record<string, unknown>;
|
|
@@ -8,17 +8,22 @@ exports.registeredAiAgentTool = registeredAiAgentTool;
|
|
|
8
8
|
exports.parseAiAgentToolBody = parseAiAgentToolBody;
|
|
9
9
|
const vitest_1 = require("vitest");
|
|
10
10
|
const shared_js_1 = require("../shared.js");
|
|
11
|
-
function mockAiAgentsContext(aiAgents
|
|
11
|
+
function mockAiAgentsContext(aiAgents, spaces = {
|
|
12
|
+
listSpacesInProject: vitest_1.vi.fn().mockResolvedValue([]),
|
|
13
|
+
}) {
|
|
12
14
|
return {
|
|
13
15
|
getContext: async () => ({
|
|
14
16
|
lightdashClient: {
|
|
15
|
-
v1: { aiAgents },
|
|
17
|
+
v1: { aiAgents, spaces },
|
|
16
18
|
},
|
|
17
19
|
auth: { mode: 'none' },
|
|
18
20
|
}),
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
function registeredAiAgentTool(register, ctx, toolId, server = { registerTool: vitest_1.vi.fn() }) {
|
|
24
|
+
if (!server.registerTool) {
|
|
25
|
+
server.registerTool = vitest_1.vi.fn();
|
|
26
|
+
}
|
|
22
27
|
register(server, ctx);
|
|
23
28
|
const call = server.registerTool.mock.calls.find((entry) => entry[0] === `${shared_js_1.TOOL_PREFIX}${toolId}`);
|
|
24
29
|
if (call === undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash-tools/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "MCP server for Lightdash semantic-layer, organization-audit, content-reader, content-developer, content-governance, ai-agent-ops, ai-agent-chat, and data-analyst profiles.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"commander": "^15.0.0",
|
|
25
25
|
"hono": "^4.13.0",
|
|
26
26
|
"zod": "^4.4.3",
|
|
27
|
-
"@lightdash-tools/client": "0.
|
|
28
|
-
"@lightdash-tools/common": "0.
|
|
27
|
+
"@lightdash-tools/client": "0.21.0",
|
|
28
|
+
"@lightdash-tools/common": "0.21.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@modelcontextprotocol/client": "2.0.0",
|