@lightdash-tools/mcp 0.8.0 → 0.9.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 +108 -237
- package/dist/audit/server-persona.d.ts +10 -0
- package/dist/audit/server-persona.js +19 -0
- package/dist/auth/oauth-broker/pending-store.d.ts +6 -7
- package/dist/auth/oauth-broker/pending-store.js +3 -4
- package/dist/auth/oauth-broker/pending-store.test.d.ts +2 -3
- package/dist/auth/oauth-broker/pending-store.test.js +2 -39
- package/dist/auth/oauth-broker/routes.d.ts +1 -1
- package/dist/auth/oauth-broker/routes.js +3 -3
- package/dist/auth/oauth-broker/routes.test.js +1 -1
- package/dist/auth/request-state-key.d.ts +19 -0
- package/dist/auth/request-state-key.js +49 -0
- package/dist/auth/resource-server/lightdash-oauth-middleware.d.ts +0 -2
- package/dist/auth/resource-server/lightdash-oauth-middleware.js +0 -19
- package/dist/auth/resource-server/www-authenticate.test.js +0 -2
- package/dist/bin.js +9 -2
- package/dist/config/env.d.ts +5 -15
- package/dist/config/env.js +6 -16
- package/dist/config/load-mcp-config.d.ts +0 -4
- package/dist/config/load-mcp-config.js +8 -9
- package/dist/config/normalize-url.test.js +14 -11
- package/dist/config/runtime.d.ts +3 -3
- package/dist/config/runtime.js +19 -23
- package/dist/config/runtime.test.js +23 -9
- package/dist/config/test-mcp-http-config.js +1 -1
- package/dist/destructive/content-promote.js +7 -1
- package/dist/destructive/promote-contract.test.js +106 -47
- package/dist/destructive/register-destructive-tool.js +6 -24
- package/dist/destructive/request-state.d.ts +2 -6
- package/dist/destructive/request-state.js +3 -38
- package/dist/destructive/types.d.ts +2 -1
- package/dist/governance/available-projects.d.ts +37 -0
- package/dist/governance/available-projects.js +132 -0
- package/dist/governance/available-projects.test.d.ts +4 -0
- package/dist/governance/available-projects.test.js +107 -0
- package/dist/governance/client-capabilities-cache.d.ts +44 -0
- package/dist/governance/client-capabilities-cache.js +142 -0
- package/dist/governance/client-capabilities-cache.test.js +148 -0
- package/dist/governance/mcp-client-session.d.ts +3 -2
- package/dist/governance/mcp-client-session.js +3 -2
- package/dist/governance/project-scope.d.ts +8 -22
- package/dist/governance/project-scope.js +36 -44
- package/dist/governance/project-scope.test.d.ts +1 -1
- package/dist/governance/project-scope.test.js +21 -44
- package/dist/governance/promote-allowlist.d.ts +18 -0
- package/dist/governance/promote-allowlist.js +66 -0
- package/dist/governance/promote-allowlist.test.d.ts +4 -0
- package/dist/governance/promote-allowlist.test.js +87 -0
- package/dist/http.integration.test.js +117 -262
- package/dist/http.test.js +0 -12
- package/dist/index.integration.test.js +0 -4
- package/dist/index.js +3 -1
- package/dist/personas/ai-agent-ops/v1/index.d.ts +8 -0
- package/dist/personas/ai-agent-ops/v1/index.js +41 -0
- package/dist/personas/ai-agent-ops/v1/prompts.d.ts +5 -0
- package/dist/personas/ai-agent-ops/v1/prompts.js +141 -0
- package/dist/personas/ai-agent-ops/v1/prompts.test.d.ts +4 -0
- package/dist/personas/ai-agent-ops/v1/prompts.test.js +26 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks/core.md +39 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks/evaluation.md +25 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks/index.md +14 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks/loop-engineering.md +28 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks/release-gate.md +22 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks.d.ts +10 -0
- package/dist/personas/ai-agent-ops/v1/resources/playbooks.js +41 -0
- package/dist/personas/content-developer/v1/index.d.ts +1 -1
- package/dist/personas/content-developer/v1/index.js +1 -0
- package/dist/personas/content-developer/v1/prompts.d.ts +3 -0
- package/dist/personas/content-developer/v1/prompts.js +80 -61
- package/dist/personas/content-developer/v1/prompts.test.js +159 -3
- package/dist/personas/content-developer/v1/resources/playbooks/chart-types.md +123 -0
- package/dist/personas/content-developer/v1/resources/playbooks/content-move.md +13 -6
- package/dist/personas/content-developer/v1/resources/playbooks/core.md +91 -49
- package/dist/personas/content-developer/v1/resources/playbooks/dashboard-design.md +153 -0
- package/dist/personas/content-developer/v1/resources/playbooks/dashboards.md +82 -34
- package/dist/personas/content-developer/v1/resources/playbooks/index.md +9 -7
- package/dist/personas/content-developer/v1/resources/playbooks.d.ts +1 -1
- package/dist/personas/content-developer/v1/resources/playbooks.js +29 -10
- package/dist/personas/content-governance/v1/resources/playbooks/core.md +1 -1
- package/dist/personas/content-governance/v1/resources/playbooks/dashboards.md +1 -1
- package/dist/personas/content-reader/v1/index.d.ts +1 -1
- package/dist/personas/content-reader/v1/index.js +1 -0
- package/dist/personas/content-reader/v1/prompts.js +64 -30
- package/dist/personas/content-reader/v1/resources/playbooks/compare.md +24 -9
- package/dist/personas/content-reader/v1/resources/playbooks/core.md +56 -29
- package/dist/personas/content-reader/v1/resources/playbooks/discover.md +27 -5
- package/dist/personas/content-reader/v1/resources/playbooks/explain-run.md +38 -8
- package/dist/personas/content-reader/v1/resources/playbooks/index.md +8 -8
- package/dist/personas/content-reader/v1/resources/playbooks.js +2 -2
- package/dist/personas/index.d.ts +1 -0
- package/dist/personas/index.js +27 -22
- package/dist/personas/index.test.js +68 -53
- package/dist/personas/lib/playbook-resources.d.ts +4 -3
- package/dist/personas/lib/playbook-resources.js +14 -10
- package/dist/personas/organization-audit/v1/prompts.js +68 -36
- package/dist/personas/organization-audit/v1/resources/playbooks/access.md +12 -4
- package/dist/personas/organization-audit/v1/resources/playbooks/content.md +13 -3
- package/dist/personas/organization-audit/v1/resources/playbooks/core.md +49 -16
- package/dist/personas/organization-audit/v1/resources/playbooks/deliveries.md +8 -3
- package/dist/personas/organization-audit/v1/resources/playbooks/index.md +8 -8
- package/dist/personas/organization-audit/v1/resources/playbooks.js +1 -1
- package/dist/personas/persona.parity.test.js +14 -10
- package/dist/personas/semantic-layer/v1/prompts.js +50 -39
- package/dist/personas/semantic-layer/v1/resources/playbooks/compose-compile.md +36 -31
- package/dist/personas/semantic-layer/v1/resources/playbooks/core.md +53 -21
- package/dist/personas/semantic-layer/v1/resources/playbooks/explore.md +42 -39
- package/dist/personas/semantic-layer/v1/resources/playbooks/index.md +6 -6
- package/dist/personas/semantic-layer/v1/resources/playbooks.js +2 -2
- package/dist/personas/types.d.ts +1 -1
- package/dist/policy/content-developer.d.ts +3 -3
- package/dist/policy/content-developer.js +3 -3
- package/dist/policy/content-developer.test.js +10 -4
- package/dist/policy/content-reader.d.ts +5 -1
- package/dist/policy/content-reader.js +18 -3
- package/dist/policy/content-reader.test.js +2 -1
- package/dist/policy/preview-ledger-fault.test.js +101 -426
- package/dist/policy/preview-ledger.d.ts +38 -74
- package/dist/policy/preview-ledger.js +108 -186
- package/dist/policy/preview-ledger.test.js +237 -111
- package/dist/policy/result-limits.d.ts +6 -1
- package/dist/policy/result-limits.js +28 -29
- package/dist/policy/result-limits.test.js +10 -1
- package/dist/server/capabilities.js +2 -0
- package/dist/server/capabilities.test.js +2 -0
- package/dist/server/server.js +12 -8
- package/dist/server/upstream-errors.d.ts +17 -0
- package/dist/server/upstream-errors.js +60 -0
- package/dist/server/upstream-errors.test.js +50 -0
- package/dist/stdio.process.test.js +4 -2
- package/dist/tools/ai-agents/agents.d.ts +7 -0
- package/dist/tools/ai-agents/agents.js +32 -0
- package/dist/tools/ai-agents/agents.test.js +176 -0
- package/dist/tools/ai-agents/discovery.d.ts +9 -0
- package/dist/tools/ai-agents/discovery.js +73 -0
- package/dist/tools/ai-agents/evaluations.d.ts +14 -0
- package/dist/tools/ai-agents/evaluations.js +177 -0
- package/dist/tools/ai-agents/helpers.d.ts +64 -0
- package/dist/tools/ai-agents/helpers.js +323 -0
- package/dist/tools/ai-agents/threads.d.ts +7 -0
- package/dist/tools/ai-agents/threads.js +40 -0
- package/dist/tools/organization/inventory.js +2 -1
- package/dist/tools/project/content.js +5 -1
- package/dist/tools/project/developer-content-preview.d.ts +2 -1
- package/dist/tools/project/developer-content-preview.js +40 -35
- package/dist/tools/project/developer-content-shared.d.ts +8 -2
- package/dist/tools/project/developer-content-shared.js +7 -3
- package/dist/tools/project/developer-content.d.ts +7 -8
- package/dist/tools/project/developer-content.js +72 -67
- package/dist/tools/project/developer-get-chart-as-code.d.ts +9 -0
- package/dist/tools/project/developer-get-chart-as-code.js +39 -0
- package/dist/tools/project/developer-get-chart-as-code.test.d.ts +4 -0
- package/dist/tools/project/developer-get-chart-as-code.test.js +70 -0
- package/dist/tools/project/developer-helpers.d.ts +1 -1
- package/dist/tools/project/developer-helpers.js +1 -1
- package/dist/tools/project/get-dashboard-promote-diff.js +12 -2
- package/dist/tools/project/invariants.test.js +5 -3
- package/dist/tools/project/projects.js +6 -4
- package/dist/tools/project/projects.test.js +44 -5
- package/dist/tools/project/reader-export-chart-image.d.ts +6 -0
- package/dist/tools/project/reader-export-chart-image.js +78 -0
- package/dist/tools/project/reader-export-chart-image.test.d.ts +4 -0
- package/dist/tools/project/reader-export-chart-image.test.js +149 -0
- package/dist/tools/query/bounded-saved-query.js +1 -1
- package/dist/tools/query/lifecycle.d.ts +1 -1
- package/dist/tools/query/lifecycle.js +17 -25
- package/dist/tools/query/query-ledger.d.ts +15 -8
- package/dist/tools/query/query-ledger.js +21 -15
- package/dist/tools/query/query-ledger.test.js +13 -11
- package/dist/tools/query/reader-tool-helpers.js +4 -6
- package/dist/tools/query/reader-tool-helpers.test.js +8 -4
- package/dist/tools/registry.d.ts +63 -0
- package/dist/tools/registry.js +26 -0
- package/dist/tools/shared.d.ts +27 -8
- package/dist/tools/shared.js +61 -28
- package/dist/tools/shared.test.js +100 -4
- package/dist/transports/streamable-http.js +48 -206
- package/dist/transports/streamable-http.test.js +10 -3
- package/package.json +5 -6
- package/dist/destructive/confirmation-claim.d.ts +0 -21
- package/dist/destructive/confirmation-claim.js +0 -87
- package/dist/destructive/confirmation-claim.test.js +0 -50
- package/dist/store/config.d.ts +0 -11
- package/dist/store/config.js +0 -50
- package/dist/store/config.test.js +0 -56
- package/dist/store/create-oauth-broker-store.d.ts +0 -6
- package/dist/store/create-oauth-broker-store.js +0 -16
- package/dist/store/create-preview-store.d.ts +0 -10
- package/dist/store/create-preview-store.js +0 -30
- package/dist/store/create-session-store.d.ts +0 -19
- package/dist/store/create-session-store.js +0 -24
- package/dist/store/in-memory-preview-store.d.ts +0 -17
- package/dist/store/in-memory-preview-store.js +0 -72
- package/dist/store/redis-client.d.ts +0 -11
- package/dist/store/redis-client.js +0 -48
- package/dist/store/redis-oauth-broker-store.d.ts +0 -42
- package/dist/store/redis-oauth-broker-store.js +0 -167
- package/dist/store/redis-oauth-broker-store.test.js +0 -80
- package/dist/store/redis-preview-store.d.ts +0 -23
- package/dist/store/redis-preview-store.js +0 -94
- package/dist/store/redis-preview-store.test.d.ts +0 -1
- package/dist/store/redis-preview-store.test.js +0 -39
- package/dist/store/redis-session-index.d.ts +0 -33
- package/dist/store/redis-session-index.js +0 -49
- package/dist/store/types.d.ts +0 -13
- package/dist/store/types.js +0 -8
- package/dist/transports/http-request-utils.d.ts +0 -2
- package/dist/transports/http-request-utils.js +0 -13
- package/dist/transports/session-store.d.ts +0 -72
- package/dist/transports/session-store.js +0 -143
- package/dist/transports/session-store.test.d.ts +0 -1
- package/dist/transports/session-store.test.js +0 -111
- /package/dist/{destructive/confirmation-claim.test.d.ts → governance/client-capabilities-cache.test.d.ts} +0 -0
- /package/dist/{store/config.test.d.ts → server/upstream-errors.test.d.ts} +0 -0
- /package/dist/{store/redis-oauth-broker-store.test.d.ts → tools/ai-agents/agents.test.d.ts} +0 -0
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.registerContentReaderPrompts = registerContentReaderPrompts;
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-deprecated -- matches organization-audit prompt registration pattern */
|
|
8
8
|
const zod_1 = require("zod");
|
|
9
|
+
const schema_fields_js_1 = require("../../../tools/lib/schema-fields.js");
|
|
9
10
|
const playbook_resources_js_1 = require("../../lib/playbook-resources.js");
|
|
10
11
|
const playbooks_js_1 = require("./resources/playbooks.js");
|
|
11
12
|
const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
|
|
@@ -13,88 +14,114 @@ const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
|
|
|
13
14
|
topics: playbooks_js_1.CONTENT_READER_TOPIC_PLAYBOOKS,
|
|
14
15
|
});
|
|
15
16
|
const TOPIC_EXPLAIN_RUN = 'explain-run';
|
|
17
|
+
const optionalProjectUuid = (0, schema_fields_js_1.projectUuidField)().optional();
|
|
18
|
+
const PROJECT_UUID_HINT = '(pin or projectUuid required)';
|
|
16
19
|
function registerContentReaderPrompts(server) {
|
|
17
20
|
server.registerPrompt('find_content', {
|
|
18
21
|
title: 'Find content',
|
|
19
22
|
description: 'Find the most relevant saved Lightdash content in the current project',
|
|
20
23
|
argsSchema: {
|
|
24
|
+
projectUuid: optionalProjectUuid,
|
|
21
25
|
question: zod_1.z.string(),
|
|
22
26
|
contentTypes: zod_1.z.string().optional(),
|
|
23
27
|
verifiedOnly: zod_1.z.boolean().optional(),
|
|
24
28
|
spaceUuid: zod_1.z.string().optional(),
|
|
25
29
|
},
|
|
26
|
-
}, ({ question, contentTypes, verifiedOnly, spaceUuid }) => userMessages(`Find the most relevant Lightdash content
|
|
30
|
+
}, ({ projectUuid, question, contentTypes, verifiedOnly, spaceUuid }) => userMessages(`Find the most relevant Lightdash content for:
|
|
27
31
|
|
|
28
32
|
${question}
|
|
29
33
|
|
|
30
34
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Verified only: ${verifiedOnly !== null && verifiedOnly !== void 0 ? verifiedOnly : false}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : '(use HTTP pin or ask for projectUuid — PROJECT_SCOPE_REQUIRED otherwise)'}.
|
|
37
|
+
Content types hint: ${contentTypes !== null && contentTypes !== void 0 ? contentTypes : '(any)'}.
|
|
38
|
+
Verified only: ${verifiedOnly !== null && verifiedOnly !== void 0 ? verifiedOnly : false} (verification is often null — fall back to pinned + views + description).
|
|
39
|
+
Space filter: ${spaceUuid !== null && spaceUuid !== void 0 ? spaceUuid : '(none)'}.
|
|
40
|
+
|
|
41
|
+
Procedure:
|
|
42
|
+
1. get_project with projectUuid/pin; record readerCapabilities.
|
|
43
|
+
2. search_content with short tokens (retry Japanese/single keyword / sortBy=views if empty). Use spaceUuids when given. pageSize≤25; ≤2 pages.
|
|
44
|
+
3. Prefer semantic charts (source≠sql). Rank by relevance, views, pinnedList; verification is optional.
|
|
45
|
+
4. Optionally list_spaces / get_space (≤3) to confirm path.
|
|
46
|
+
5. Return ≤5 candidates (name/type/uuid/space/views/source/why). Do not execute unless values were requested.`, 'discover'));
|
|
39
47
|
server.registerPrompt('explain_chart', {
|
|
40
48
|
title: 'Explain chart',
|
|
41
49
|
description: 'Explain a saved chart from metadata (optional bounded execution)',
|
|
42
50
|
argsSchema: {
|
|
51
|
+
projectUuid: optionalProjectUuid,
|
|
43
52
|
chartUuidOrSlug: zod_1.z.string(),
|
|
44
53
|
includeLatestValues: zod_1.z.boolean().optional(),
|
|
45
54
|
},
|
|
46
|
-
}, ({ chartUuidOrSlug, includeLatestValues }) => userMessages(`Explain the saved chart ${chartUuidOrSlug}.
|
|
55
|
+
}, ({ projectUuid, chartUuidOrSlug, includeLatestValues }) => userMessages(`Explain the saved chart ${chartUuidOrSlug}.
|
|
47
56
|
|
|
48
57
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : PROJECT_UUID_HINT}.
|
|
60
|
+
includeLatestValues=${includeLatestValues !== null && includeLatestValues !== void 0 ? includeLatestValues : false}.
|
|
61
|
+
|
|
62
|
+
Procedure:
|
|
63
|
+
1. get_project → get_chart (includeQueryDefinition as needed) and/or explain_content.
|
|
64
|
+
2. If chartType/source is sql, do not run; cite non-executable / capability.
|
|
65
|
+
3. When includeLatestValues is true and semantic: run_chart (cache, bounded limit); cite queryUuid.
|
|
66
|
+
4. If the user needs to **see** the rendered viz (not just numbers), call export_chart_image (≤3); requires headless browser.
|
|
67
|
+
5. Separate explicit metadata from inferred meaning; quote population caveats from the description.
|
|
68
|
+
6. Do not construct a new query or retrieve underlying data.`, TOPIC_EXPLAIN_RUN));
|
|
54
69
|
server.registerPrompt('summarize_dashboard', {
|
|
55
70
|
title: 'Summarize dashboard',
|
|
56
71
|
description: 'Summarize a dashboard with optional bounded tile execution',
|
|
57
72
|
argsSchema: {
|
|
73
|
+
projectUuid: optionalProjectUuid,
|
|
58
74
|
dashboardUuidOrSlug: zod_1.z.string(),
|
|
59
75
|
executeTiles: zod_1.z.boolean().optional(),
|
|
60
76
|
maximumTiles: zod_1.z.number().optional(),
|
|
61
77
|
focus: zod_1.z.string().optional(),
|
|
62
78
|
},
|
|
63
|
-
}, ({ dashboardUuidOrSlug, executeTiles, maximumTiles, focus }) => userMessages(`Summarize dashboard ${dashboardUuidOrSlug}.
|
|
79
|
+
}, ({ projectUuid, dashboardUuidOrSlug, executeTiles, maximumTiles, focus }) => userMessages(`Summarize dashboard ${dashboardUuidOrSlug}.
|
|
64
80
|
|
|
65
81
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
66
82
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : PROJECT_UUID_HINT}.
|
|
84
|
+
Focus: ${focus !== null && focus !== void 0 ? focus : '(general summary)'}.
|
|
85
|
+
Execute tiles: ${executeTiles !== null && executeTiles !== void 0 ? executeTiles : false}; max tiles: ${maximumTiles !== null && maximumTiles !== void 0 ? maximumTiles : 5}.
|
|
86
|
+
|
|
87
|
+
Procedure:
|
|
88
|
+
1. get_dashboard with includeTiles (+ filters as needed). Use tileUuid (not uuid); skip non-executable/markdown tiles.
|
|
89
|
+
2. Describe purpose, filters, parameters, verification, and tile structure — summarize, do not dump all tiles.
|
|
90
|
+
3. When execution is requested, run_dashboard_tile for ≤max relevant executable tiles; preserve dashboard context; value-only overrides.
|
|
91
|
+
4. Report values/trends/failures with content + query UUIDs. Unexecuted tiles must not support conclusions.`, TOPIC_EXPLAIN_RUN));
|
|
72
92
|
server.registerPrompt('answer_from_content', {
|
|
73
93
|
title: 'Answer from content',
|
|
74
94
|
description: 'Answer a question using existing saved Lightdash content only',
|
|
75
95
|
argsSchema: {
|
|
96
|
+
projectUuid: optionalProjectUuid,
|
|
76
97
|
question: zod_1.z.string(),
|
|
77
98
|
verifiedOnly: zod_1.z.boolean().optional(),
|
|
78
99
|
maximumExecutions: zod_1.z.number().optional(),
|
|
79
100
|
},
|
|
80
|
-
}, ({ question, verifiedOnly, maximumExecutions }) => userMessages(`Answer this question using existing Lightdash content:
|
|
101
|
+
}, ({ projectUuid, question, verifiedOnly, maximumExecutions }) => userMessages(`Answer this question using existing Lightdash content only:
|
|
81
102
|
|
|
82
103
|
${question}
|
|
83
104
|
|
|
84
105
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
85
106
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
107
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : PROJECT_UUID_HINT}.
|
|
108
|
+
Prefer verified=${verifiedOnly !== null && verifiedOnly !== void 0 ? verifiedOnly : false} when present; else pinned + views + description.
|
|
109
|
+
Max executions: ${maximumExecutions !== null && maximumExecutions !== void 0 ? maximumExecutions : 3}.
|
|
110
|
+
|
|
111
|
+
Procedure:
|
|
112
|
+
1. get_project → search_content (short tokens; retry if empty) → pick best semantic content.
|
|
113
|
+
2. Inspect metadata; execute the smallest number of saved charts/tiles required (≤ max), cache-first.
|
|
114
|
+
3. Skip SQL / non-executable sources. Value-only parameter/filter overrides.
|
|
115
|
+
4. State answer, content used, filter/parameter context, result time/cache, truncation, and limitations.`, TOPIC_EXPLAIN_RUN));
|
|
90
116
|
server.registerPrompt('compare_content', {
|
|
91
117
|
title: 'Compare content',
|
|
92
118
|
description: 'Compare saved content definitions and optionally values',
|
|
93
119
|
argsSchema: {
|
|
120
|
+
projectUuid: optionalProjectUuid,
|
|
94
121
|
contentReferences: zod_1.z.string(),
|
|
95
122
|
comparisonQuestion: zod_1.z.string(),
|
|
96
123
|
},
|
|
97
|
-
}, ({ contentReferences, comparisonQuestion }) => userMessages(`Compare these Lightdash content items:
|
|
124
|
+
}, ({ projectUuid, contentReferences, comparisonQuestion }) => userMessages(`Compare these Lightdash content items:
|
|
98
125
|
|
|
99
126
|
${contentReferences}
|
|
100
127
|
|
|
@@ -103,18 +130,23 @@ ${comparisonQuestion}
|
|
|
103
130
|
|
|
104
131
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
105
132
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
133
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : PROJECT_UUID_HINT}.
|
|
134
|
+
|
|
135
|
+
Procedure:
|
|
136
|
+
1. Resolve both sides in-project; fetch metadata first (definitions, fieldIds, filters, grains, parameters, source).
|
|
137
|
+
2. Diff before values. Matching labels ≠ equivalence.
|
|
138
|
+
3. Execute only when structurally comparable or values are the question (≤2 runs). Skip SQL sides.
|
|
139
|
+
4. Report confirmed / plausible / ruled-out / unresolved causes with UUIDs.`, 'compare'));
|
|
109
140
|
server.registerPrompt('investigate_result_difference', {
|
|
110
141
|
title: 'Investigate result difference',
|
|
111
142
|
description: 'Investigate why two content resources differ',
|
|
112
143
|
argsSchema: {
|
|
144
|
+
projectUuid: optionalProjectUuid,
|
|
113
145
|
firstContent: zod_1.z.string(),
|
|
114
146
|
secondContent: zod_1.z.string(),
|
|
115
147
|
observedDifference: zod_1.z.string(),
|
|
116
148
|
},
|
|
117
|
-
}, ({ firstContent, secondContent, observedDifference }) => userMessages(`Investigate why these Lightdash resources differ:
|
|
149
|
+
}, ({ projectUuid, firstContent, secondContent, observedDifference }) => userMessages(`Investigate why these Lightdash resources differ:
|
|
118
150
|
|
|
119
151
|
First: ${firstContent}
|
|
120
152
|
Second: ${secondContent}
|
|
@@ -122,7 +154,9 @@ Difference: ${observedDifference}
|
|
|
122
154
|
|
|
123
155
|
${playbooks_js_1.CONTENT_READER_HARD_BANS}
|
|
124
156
|
|
|
125
|
-
|
|
157
|
+
Project: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : PROJECT_UUID_HINT}.
|
|
158
|
+
|
|
159
|
+
Checklist: metrics, fields, filters, dashboard context, date ranges, time grains, parameters, sorts, limits, pivots, table calculations, verification, cache timestamps, semantic-vs-SQL.
|
|
126
160
|
Execute only when needed with equivalent valid context. Separate confirmed, plausible, ruled-out, and unresolved causes.`, 'compare'));
|
|
127
161
|
}
|
|
128
162
|
/* eslint-enable @typescript-eslint/no-deprecated */
|
|
@@ -2,20 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
URI: `lightdash://playbooks/content-reader/compare`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Compare **definitions before values**. Matching titles/labels ≠ same metric, grain, or population.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Inspect both sides
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
1. Resolve each reference (UUID/slug/search) inside the same `projectUuid`.
|
|
10
|
+
2. Fetch metadata (`get_chart` / `get_dashboard` / `explain_content`). Prefer `includeQueryDefinition` for charts.
|
|
11
|
+
3. Diff checklist:
|
|
12
|
+
- Explore / `tableName`
|
|
13
|
+
- Metrics & dimensions (`fieldId`s)
|
|
14
|
+
- Filters (targets, operators, windows — e.g. `inThePast` days)
|
|
15
|
+
- Time grain / timezone fields
|
|
16
|
+
- Parameters, sorts, limits, pivots, table calculations
|
|
17
|
+
- Chart `source` / `chartType` (semantic vs SQL)
|
|
18
|
+
- Verification, `updatedAt`, space, views
|
|
19
|
+
- Dashboard context (filters, tile selection) when comparing tiles
|
|
10
20
|
|
|
11
|
-
##
|
|
21
|
+
## When to execute
|
|
12
22
|
|
|
13
|
-
Execute only
|
|
23
|
+
Execute **only** if sides are structurally comparable **or** the user asked about value differences. Use equivalent valid context (same overrides if any). Cap at **≤2** executions unless the user expands scope.
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
Skip execution when either side is SQL / non-executable — report that as a confirmed blocker.
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
## Report causes
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
Separate:
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
- **Confirmed** (from metadata or executed numbers)
|
|
32
|
+
- **Plausible** (hypothesis)
|
|
33
|
+
- **Ruled out**
|
|
34
|
+
- **Unresolved** (missing access, truncation, non-executable)
|
|
35
|
+
|
|
36
|
+
Cite content UUIDs, query UUIDs, truncation, and caveats. Do not assume label equality.
|
|
@@ -2,39 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
URI: `lightdash://playbooks/content-reader/core`
|
|
4
4
|
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Discover, explain, and **optionally execute** saved Lightdash charts/dashboards inside one resolved project. Never author new queries or mutate content.
|
|
8
|
+
|
|
5
9
|
## Hard bans
|
|
6
10
|
|
|
7
|
-
- Do not mutate Lightdash resources.
|
|
8
|
-
- Do not execute arbitrary metric queries, raw SQL, or underlying-data
|
|
9
|
-
- Do not
|
|
10
|
-
- Do not execute saved SQL charts (
|
|
11
|
-
- Do not override filter targets
|
|
11
|
+
- Do not mutate Lightdash resources (create/update/delete/move/promote).
|
|
12
|
+
- Do not execute arbitrary metric queries, raw SQL, SQL runner, or underlying-data downloads.
|
|
13
|
+
- Do not bulk-export or page endlessly through result sets.
|
|
14
|
+
- Do not execute saved SQL charts (`source=sql` / `chartType=sql`); default capability is off (`canExecuteSqlCharts=false`).
|
|
15
|
+
- Do not override filter **targets/operators**, required-filter behavior, fields, metrics, dimensions, SQL, table calculations, or sorts — only allowed **value** overrides on existing filter ids / known parameters.
|
|
12
16
|
- Do not execute content outside the resolved project.
|
|
13
|
-
- Do not present truncated
|
|
17
|
+
- Do not present truncated / incomplete coverage as a full answer.
|
|
14
18
|
- Do not claim metric equivalence from matching labels alone.
|
|
15
|
-
- Do not
|
|
16
|
-
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
- Do not invent secrets, warehouse credentials, or hidden SQL text.
|
|
20
|
+
|
|
21
|
+
## Default budgets (override only if the user expands scope)
|
|
22
|
+
|
|
23
|
+
| Resource | Default |
|
|
24
|
+
| ----------------------------------------------- | --------------------------------------------------------------------- |
|
|
25
|
+
| `search_content` pages | `pageSize≤25`, stop after **2** pages (or when `pagination.complete`) |
|
|
26
|
+
| Candidates returned to the user | **≤5** |
|
|
27
|
+
| Spaces deep-dived (`get_space`) | **≤3** |
|
|
28
|
+
| Charts / dashboards fully inspected | **≤5** metadata fetches |
|
|
29
|
+
| Executions (`run_chart` / `run_dashboard_tile`) | **≤3** total; dashboard tiles **≤5** when summarizing |
|
|
30
|
+
| Chart image exports (`export_chart_image`) | **≤3** (prefer when the user needs to **see** the viz) |
|
|
31
|
+
| Result rows kept in the answer | **≤20** (even if more returned) |
|
|
32
|
+
| `get_query_result` polls | only while status is non-terminal; then stop |
|
|
33
|
+
|
|
34
|
+
Record budget / pagination / truncation stops in the answer.
|
|
35
|
+
|
|
36
|
+
## Coverage semantics (do not confuse)
|
|
37
|
+
|
|
38
|
+
- **`pagination.complete`**: this list page finished (or you stopped paging).
|
|
39
|
+
- **`coverage.complete`**: true only when the envelope says the _result_ is complete **and** not truncated. `status=complete` + `truncated=true` (e.g. small `pageSize` on `get_query_result`) ⇒ **incomplete** for reporting.
|
|
40
|
+
- Warning codes such as `TRUNCATED`, `REDACTED`, `CONTENT_NOT_EXECUTABLE`, `PROJECT_SCOPE_REQUIRED` are first-class evidence — cite them.
|
|
41
|
+
|
|
42
|
+
## Allowed tools (`lightdash_*`)
|
|
43
|
+
|
|
44
|
+
| Tool | Use for |
|
|
45
|
+
| ---------------------------------------------------- | -------------------------------------------------------- |
|
|
46
|
+
| `get_project` | Resolve project; read `readerCapabilities` + pin context |
|
|
47
|
+
| `search_content` | Find charts/dashboards/spaces/data apps |
|
|
48
|
+
| `list_spaces` / `get_space` | Space hierarchy + immediate content |
|
|
49
|
+
| `get_dashboard` / `get_chart` | Structure / definition (SQL text hidden) |
|
|
50
|
+
| `list_project_parameters` / `get_project_parameters` | Parameter defs / values |
|
|
51
|
+
| `explain_content` | Compact metadata explanation |
|
|
52
|
+
| `run_chart` / `run_dashboard_tile` | Bounded saved execution (numbers) |
|
|
53
|
+
| `export_chart_image` | PNG snapshot of a saved chart (vision); needs headless |
|
|
54
|
+
| `get_query_result` / `cancel_query` | Poll / cancel by `queryUuid` |
|
|
34
55
|
|
|
35
56
|
## Phase 0 — Resolve project
|
|
36
57
|
|
|
37
|
-
1.
|
|
38
|
-
2. Record
|
|
39
|
-
3.
|
|
40
|
-
|
|
58
|
+
1. Always pass **`projectUuid`** (or rely on HTTP `X-Lightdash-Project` pin). Without either → `PROJECT_SCOPE_REQUIRED`; stop.
|
|
59
|
+
2. Call `get_project`. Record UUID, name, `context.projectPinned`, and `readerCapabilities` (`canExecuteSavedCharts`, `canExecuteSqlCharts`, `canExecuteDashboardTiles`).
|
|
60
|
+
3. There is **no** org-wide project list on this persona — never invent one.
|
|
61
|
+
|
|
62
|
+
## Answer shape
|
|
63
|
+
|
|
64
|
+
- Facts with **content UUID / slug**, space name, and (if executed) **queryUuid**.
|
|
65
|
+
- Explicit metadata vs inferred meaning.
|
|
66
|
+
- Cache/time context, applied parameters/filters, truncation, and capability limits.
|
|
67
|
+
- Never dump full dashboard tile arrays or full result tables — summarize.
|
|
@@ -2,12 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
URI: `lightdash://playbooks/content-reader/discover`
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Classify intent
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Map the user request to: find / explain / retrieve values / summarize dashboard / compare / investigate. Discovery-only intents **must not** execute.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Search strategy
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
1. Prefer **short, high-signal tokens** that appear in titles (product names, Japanese KPI words). Multi-word English phrases often return **zero** hits even when related content exists.
|
|
12
|
+
2. If the first query is empty, try: alternate language tokens, a single keyword, `spaceUuids` / `parentSpaceUuid`, or browse with `sortBy=views` + `sortDirection=desc` (optional empty/`query` omitted) and then refine.
|
|
13
|
+
3. Always set `pageSize` (≤25). Prefer `contentTypes` when the user asked for charts vs dashboards.
|
|
14
|
+
4. Read `source` on chart hits: `dbt_explore` (or similar semantic) vs `sql`. Treat `sql` as **not executable** on this persona.
|
|
15
|
+
5. Ranking heuristics when relevance ties:
|
|
16
|
+
- Higher `views` / pinned (`pinnedList` non-null)
|
|
17
|
+
- Richer description / clearer name match
|
|
18
|
+
- Prefer non-deleted / non-sandbox space names when obvious
|
|
19
|
+
- Verification is often **null** in real orgs — do not stall waiting for verified content; prefer pinned + views + description instead
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
## Spaces
|
|
22
|
+
|
|
23
|
+
- `list_spaces` without `parentSpaceUuid` returns **top-level** spaces only.
|
|
24
|
+
- Drill with `parentSpaceUuid` or `get_space` (`includeChildren` / `includeContent`) for one space at a time (budget ≤3).
|
|
25
|
+
- `get_space` content summaries are name/uuid only — follow with `search_content` or `get_*` for detail.
|
|
26
|
+
|
|
27
|
+
## Deliverable (find)
|
|
28
|
+
|
|
29
|
+
Return **≤5** candidates:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
- name (type) — uuid/slug — space — views/pinned — source(if chart) — why relevant — warnings
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Do not execute unless the user asked for values or analysis.
|
|
@@ -2,18 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
URI: `lightdash://playbooks/content-reader/explain-run`
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Inspect metadata first
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Charts: `get_chart` (set `includeQueryDefinition=true` when filters/metrics matter) and/or `explain_content`.
|
|
8
|
+
2. Dashboards: `get_dashboard` with `includeTiles=true` (and filters when needed). Tile objects use **`tileUuid`** (not `uuid`), plus `type`, `title`, `chartUuid`, `executable`.
|
|
9
|
+
3. Parameters: `list_project_parameters` / `get_project_parameters` only when the content references parameters or the user asks to override values.
|
|
10
|
+
4. Distinguish **explicit** description/filters/fieldIds from **inferred** business meaning. Chart descriptions often document population caveats — quote them.
|
|
8
11
|
|
|
9
|
-
##
|
|
12
|
+
## SQL vs semantic (critical)
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
| Signal | Action |
|
|
15
|
+
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
16
|
+
| Search `source=sql` | Do **not** call `run_chart`; explain metadata only; cite `CONTENT_NOT_EXECUTABLE` / capability |
|
|
17
|
+
| `get_chart` → `chartType=sql` + warnings | Same — SQL text is hidden; execution disabled |
|
|
18
|
+
| Opaque API errors (e.g. “Saved query not found”) on SQL ids | Treat as non-executable; do not retry endlessly |
|
|
19
|
+
| `readerCapabilities.canExecuteSqlCharts=false` | Hard stop for SQL execution |
|
|
12
20
|
|
|
13
|
-
##
|
|
21
|
+
## Decide whether to execute
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
Execute only for values, trends, rankings, summaries, comparisons, or discrepancy checks. Skip for discovery/description.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
Defaults: `useCache=true`, modest `limit` (≤100; summarize ≤20 rows in the answer), prefer `waitForResults=true` for single charts.
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
## Chart images (see the viz)
|
|
28
|
+
|
|
29
|
+
- Use `export_chart_image` when the user needs to **see** the rendered chart (layout, series, labels), not raw numbers.
|
|
30
|
+
- Prefer `run_chart` when they need values/aggregates.
|
|
31
|
+
- Export relies on Lightdash headless browser; self-hosted instances without Browserless will fail — report the API error; do not invent a screenshot.
|
|
32
|
+
- Budget ≤3 image exports per turn.
|
|
33
|
+
|
|
34
|
+
## Dashboard tile execution
|
|
35
|
+
|
|
36
|
+
1. Pick tiles with `executable=true` and a `chartUuid` (skip markdown / non-chart tiles).
|
|
37
|
+
2. Call `run_dashboard_tile` with dashboard UUID/slug + **`tileUuid`** from `get_dashboard`.
|
|
38
|
+
3. Preserve dashboard context; only pass `filterOverrides` / `parameterOverrides` for **existing** filter ids / known parameter names with **values** (never retarget filters).
|
|
39
|
+
4. Cap tiles per summary (`maximumTiles` / budget ≤5). Unexecuted tiles must not support conclusions.
|
|
40
|
+
|
|
41
|
+
## Async handles
|
|
42
|
+
|
|
43
|
+
- Record `queryUuid` from run responses.
|
|
44
|
+
- Use `get_query_result` to poll or re-page; note `truncated` / `TRUNCATED` when `pageSize` clips rows — do not claim completeness.
|
|
45
|
+
- `cancel_query` when a run is no longer needed.
|
|
46
|
+
|
|
47
|
+
## Report
|
|
48
|
+
|
|
49
|
+
Answer + evidence: content UUID(s), query UUID(s), applied filters/parameters, cache/time context, truncation, capability limits. Never construct a new metric query.
|
|
@@ -4,11 +4,11 @@ URI: `lightdash://playbooks/content-reader`
|
|
|
4
4
|
|
|
5
5
|
Workflow-scoped playbooks (always load **core** plus one topic with a prompt):
|
|
6
6
|
|
|
7
|
-
| Topic
|
|
8
|
-
|
|
|
9
|
-
| Core (
|
|
10
|
-
| Discover
|
|
11
|
-
| Explain & run
|
|
12
|
-
| Compare / investigate
|
|
13
|
-
|
|
14
|
-
Discover, explain, and execute saved Lightdash charts and dashboards safely within a resolved project.
|
|
7
|
+
| Topic | URI |
|
|
8
|
+
| --------------------------- | -------------------------------------------------- |
|
|
9
|
+
| Core (bans, budgets, scope) | `lightdash://playbooks/content-reader/core` |
|
|
10
|
+
| Discover | `lightdash://playbooks/content-reader/discover` |
|
|
11
|
+
| Explain & run | `lightdash://playbooks/content-reader/explain-run` |
|
|
12
|
+
| Compare / investigate | `lightdash://playbooks/content-reader/compare` |
|
|
13
|
+
|
|
14
|
+
Discover, explain, and execute saved Lightdash charts and dashboards safely within a resolved project under default budgets.
|
|
@@ -14,11 +14,11 @@ Do not execute arbitrary metric queries, raw SQL, or underlying-data queries.
|
|
|
14
14
|
Do not download or bulk-export results.
|
|
15
15
|
Do not execute saved SQL charts (disabled by default on content-reader).
|
|
16
16
|
Do not override filter targets, operators, required-filter behavior, fields, metrics, dimensions, SQL, table calculations, or sorts.
|
|
17
|
-
Do not execute content outside the resolved project.
|
|
17
|
+
Do not execute content outside the resolved project (pass projectUuid or HTTP pin).
|
|
18
18
|
Do not present truncated results as complete.
|
|
19
19
|
Do not claim metric equivalence from matching labels alone.
|
|
20
20
|
Do not reveal secrets, warehouse credentials, hidden SQL, or inaccessible content.`,
|
|
21
|
-
coreDescription: 'Hard bans, tools, and
|
|
21
|
+
coreDescription: 'Hard bans, budgets, tools, project scope, and coverage semantics',
|
|
22
22
|
topics: [
|
|
23
23
|
{
|
|
24
24
|
id: 'discover',
|
package/dist/personas/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { PersonaDefinition, PersonaId } from './types.js';
|
|
5
5
|
export type { PersonaDefinition, PersonaId } from './types.js';
|
|
6
|
+
export { AI_AGENT_OPS_PERSONA_PATH } from './ai-agent-ops/v1/index.js';
|
|
6
7
|
export { SEMANTIC_LAYER_PERSONA_PATH } from './semantic-layer/v1/index.js';
|
|
7
8
|
export { ORGANIZATION_AUDIT_PERSONA_PATH } from './organization-audit/v1/index.js';
|
|
8
9
|
export { CONTENT_READER_PERSONA_PATH } from './content-reader/v1/index.js';
|
package/dist/personas/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Shipped MCP personas (path → definition). No PERSONA/PATH env knobs.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PERSONAS = exports.DEFAULT_PERSONA_ID = exports.CONTENT_GOVERNANCE_PERSONA_PATH = exports.CONTENT_DEVELOPER_PERSONA_PATH = exports.CONTENT_READER_PERSONA_PATH = exports.ORGANIZATION_AUDIT_PERSONA_PATH = exports.SEMANTIC_LAYER_PERSONA_PATH = void 0;
|
|
6
|
+
exports.PERSONAS = exports.DEFAULT_PERSONA_ID = exports.CONTENT_GOVERNANCE_PERSONA_PATH = exports.CONTENT_DEVELOPER_PERSONA_PATH = exports.CONTENT_READER_PERSONA_PATH = exports.ORGANIZATION_AUDIT_PERSONA_PATH = exports.SEMANTIC_LAYER_PERSONA_PATH = exports.AI_AGENT_OPS_PERSONA_PATH = void 0;
|
|
7
7
|
exports.getPersona = getPersona;
|
|
8
8
|
exports.getDefaultPersona = getDefaultPersona;
|
|
9
9
|
exports.getPersonaByPath = getPersonaByPath;
|
|
@@ -11,29 +11,33 @@ exports.listPersonaPaths = listPersonaPaths;
|
|
|
11
11
|
exports.parsePersonaId = parsePersonaId;
|
|
12
12
|
exports.getPersonaServerName = getPersonaServerName;
|
|
13
13
|
const normalize_url_js_1 = require("../config/normalize-url.js");
|
|
14
|
-
const index_js_1 = require("./
|
|
15
|
-
const index_js_2 = require("./content-
|
|
16
|
-
const index_js_3 = require("./content-
|
|
17
|
-
const index_js_4 = require("./
|
|
18
|
-
const index_js_5 = require("./
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
const index_js_1 = require("./ai-agent-ops/v1/index.js");
|
|
15
|
+
const index_js_2 = require("./content-developer/v1/index.js");
|
|
16
|
+
const index_js_3 = require("./content-governance/v1/index.js");
|
|
17
|
+
const index_js_4 = require("./content-reader/v1/index.js");
|
|
18
|
+
const index_js_5 = require("./organization-audit/v1/index.js");
|
|
19
|
+
const index_js_6 = require("./semantic-layer/v1/index.js");
|
|
20
|
+
var index_js_7 = require("./ai-agent-ops/v1/index.js");
|
|
21
|
+
Object.defineProperty(exports, "AI_AGENT_OPS_PERSONA_PATH", { enumerable: true, get: function () { return index_js_7.AI_AGENT_OPS_PERSONA_PATH; } });
|
|
22
|
+
var index_js_8 = require("./semantic-layer/v1/index.js");
|
|
23
|
+
Object.defineProperty(exports, "SEMANTIC_LAYER_PERSONA_PATH", { enumerable: true, get: function () { return index_js_8.SEMANTIC_LAYER_PERSONA_PATH; } });
|
|
24
|
+
var index_js_9 = require("./organization-audit/v1/index.js");
|
|
25
|
+
Object.defineProperty(exports, "ORGANIZATION_AUDIT_PERSONA_PATH", { enumerable: true, get: function () { return index_js_9.ORGANIZATION_AUDIT_PERSONA_PATH; } });
|
|
26
|
+
var index_js_10 = require("./content-reader/v1/index.js");
|
|
27
|
+
Object.defineProperty(exports, "CONTENT_READER_PERSONA_PATH", { enumerable: true, get: function () { return index_js_10.CONTENT_READER_PERSONA_PATH; } });
|
|
28
|
+
var index_js_11 = require("./content-developer/v1/index.js");
|
|
29
|
+
Object.defineProperty(exports, "CONTENT_DEVELOPER_PERSONA_PATH", { enumerable: true, get: function () { return index_js_11.CONTENT_DEVELOPER_PERSONA_PATH; } });
|
|
30
|
+
var index_js_12 = require("./content-governance/v1/index.js");
|
|
31
|
+
Object.defineProperty(exports, "CONTENT_GOVERNANCE_PERSONA_PATH", { enumerable: true, get: function () { return index_js_12.CONTENT_GOVERNANCE_PERSONA_PATH; } });
|
|
29
32
|
/** Default stdio persona (backward compatible). */
|
|
30
33
|
exports.DEFAULT_PERSONA_ID = 'semantic-layer';
|
|
31
34
|
exports.PERSONAS = {
|
|
32
|
-
'semantic-layer':
|
|
33
|
-
'organization-audit':
|
|
34
|
-
'content-reader':
|
|
35
|
-
'content-developer':
|
|
36
|
-
'content-governance':
|
|
35
|
+
'semantic-layer': index_js_6.semanticLayerPersona,
|
|
36
|
+
'organization-audit': index_js_5.organizationAuditPersona,
|
|
37
|
+
'content-reader': index_js_4.contentReaderPersona,
|
|
38
|
+
'content-developer': index_js_2.contentDeveloperPersona,
|
|
39
|
+
'content-governance': index_js_3.contentGovernancePersona,
|
|
40
|
+
'ai-agent-ops': index_js_1.aiAgentOpsPersona,
|
|
37
41
|
};
|
|
38
42
|
const PERSONAS_BY_PATH = new Map(Object.values(exports.PERSONAS).map((persona) => [persona.path, persona]));
|
|
39
43
|
function getPersona(id) {
|
|
@@ -61,7 +65,8 @@ function parsePersonaId(value) {
|
|
|
61
65
|
value === 'organization-audit' ||
|
|
62
66
|
value === 'content-reader' ||
|
|
63
67
|
value === 'content-developer' ||
|
|
64
|
-
value === 'content-governance'
|
|
68
|
+
value === 'content-governance' ||
|
|
69
|
+
value === 'ai-agent-ops') {
|
|
65
70
|
return value;
|
|
66
71
|
}
|
|
67
72
|
return undefined;
|