@lightdash-tools/mcp 0.14.0 → 0.17.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.
Files changed (126) hide show
  1. package/README.md +43 -14
  2. package/dist/auth/oauth-broker/as-metadata.d.ts +6 -2
  3. package/dist/auth/oauth-broker/as-metadata.js +8 -4
  4. package/dist/auth/oauth-broker/invoke-origins.d.ts +16 -0
  5. package/dist/auth/oauth-broker/invoke-origins.js +112 -0
  6. package/dist/auth/oauth-broker/invoke-origins.test.d.ts +1 -0
  7. package/dist/auth/oauth-broker/invoke-origins.test.js +82 -0
  8. package/dist/auth/oauth-broker/lightdash-token.d.ts +6 -5
  9. package/dist/auth/oauth-broker/lightdash-token.js +6 -10
  10. package/dist/auth/oauth-broker/mcp-access-token.d.ts +31 -0
  11. package/dist/auth/oauth-broker/mcp-access-token.js +109 -0
  12. package/dist/auth/oauth-broker/mcp-access-token.test.d.ts +1 -0
  13. package/dist/auth/oauth-broker/mcp-access-token.test.js +61 -0
  14. package/dist/auth/oauth-broker/pending-store.d.ts +9 -3
  15. package/dist/auth/oauth-broker/pending-store.js +5 -3
  16. package/dist/auth/oauth-broker/pending-store.test.js +28 -44
  17. package/dist/auth/oauth-broker/routes.d.ts +2 -1
  18. package/dist/auth/oauth-broker/routes.js +124 -48
  19. package/dist/auth/oauth-broker/routes.test.js +191 -16
  20. package/dist/auth/resource-server/lightdash-oauth-middleware.d.ts +3 -1
  21. package/dist/auth/resource-server/lightdash-oauth-middleware.js +65 -41
  22. package/dist/auth/resource-server/lightdash-oauth-middleware.test.js +95 -59
  23. package/dist/auth/resource-server/oauth-protected-resource.d.ts +2 -2
  24. package/dist/auth/resource-server/oauth-protected-resource.js +8 -11
  25. package/dist/auth/resource-server/www-authenticate.test.js +3 -3
  26. package/dist/bin.js +33 -7
  27. package/dist/config/env.d.ts +10 -0
  28. package/dist/config/env.js +11 -1
  29. package/dist/config/load-mcp-config.d.ts +14 -1
  30. package/dist/config/load-mcp-config.js +35 -8
  31. package/dist/config/load-mcp-config.test.js +49 -0
  32. package/dist/config/prompt-context-policy.d.ts +18 -0
  33. package/dist/config/prompt-context-policy.js +40 -0
  34. package/dist/config/prompt-context-policy.test.d.ts +4 -0
  35. package/dist/config/prompt-context-policy.test.js +35 -0
  36. package/dist/config/test-mcp-http-config.js +1 -1
  37. package/dist/governance/mcp-post-factory-context.d.ts +2 -0
  38. package/dist/http.d.ts +7 -1
  39. package/dist/http.integration.helpers.d.ts +50 -0
  40. package/dist/http.integration.helpers.js +190 -0
  41. package/dist/http.integration.test.js +81 -187
  42. package/dist/http.invoke-origin.integration.test.d.ts +1 -0
  43. package/dist/http.invoke-origin.integration.test.js +108 -0
  44. package/dist/http.js +10 -1
  45. package/dist/index.d.ts +6 -1
  46. package/dist/index.js +6 -3
  47. package/dist/policy/content-developer.d.ts +5 -0
  48. package/dist/policy/content-developer.js +25 -1
  49. package/dist/policy/content-developer.test.js +29 -0
  50. package/dist/profiles/ai-agent-ops/v1/invariants.d.ts +27 -0
  51. package/dist/profiles/ai-agent-ops/v1/invariants.js +39 -0
  52. package/dist/profiles/ai-agent-ops/v1/prompts.d.ts +3 -2
  53. package/dist/profiles/ai-agent-ops/v1/prompts.js +67 -41
  54. package/dist/profiles/ai-agent-ops/v1/resources/playbooks.d.ts +2 -1
  55. package/dist/profiles/ai-agent-ops/v1/resources/playbooks.js +10 -3
  56. package/dist/profiles/content-developer/v1/invariants.d.ts +69 -0
  57. package/dist/profiles/content-developer/v1/invariants.js +95 -0
  58. package/dist/profiles/content-developer/v1/prompt-specs.d.ts +32 -0
  59. package/dist/profiles/content-developer/v1/prompt-specs.js +56 -0
  60. package/dist/profiles/content-developer/v1/prompts.d.ts +4 -3
  61. package/dist/profiles/content-developer/v1/prompts.js +65 -71
  62. package/dist/profiles/content-developer/v1/prompts.test.js +61 -7
  63. package/dist/profiles/content-developer/v1/resources/playbooks/core.md +1 -0
  64. package/dist/profiles/content-developer/v1/resources/playbooks/index.md +11 -8
  65. package/dist/profiles/content-developer/v1/resources/playbooks/recovery/dashboard-diff.md +15 -0
  66. package/dist/profiles/content-developer/v1/resources/playbooks/recovery/preview-required.md +14 -0
  67. package/dist/profiles/content-developer/v1/resources/playbooks/recovery/preview-stale.md +21 -0
  68. package/dist/profiles/content-developer/v1/resources/playbooks.d.ts +3 -2
  69. package/dist/profiles/content-developer/v1/resources/playbooks.js +35 -22
  70. package/dist/profiles/content-governance/v1/invariants.d.ts +27 -0
  71. package/dist/profiles/content-governance/v1/invariants.js +39 -0
  72. package/dist/profiles/content-governance/v1/prompts.d.ts +4 -2
  73. package/dist/profiles/content-governance/v1/prompts.js +31 -19
  74. package/dist/profiles/content-governance/v1/resources/playbooks.d.ts +2 -1
  75. package/dist/profiles/content-governance/v1/resources/playbooks.js +8 -9
  76. package/dist/profiles/content-reader/v1/invariants.d.ts +33 -0
  77. package/dist/profiles/content-reader/v1/invariants.js +47 -0
  78. package/dist/profiles/content-reader/v1/prompt-specs.d.ts +18 -0
  79. package/dist/profiles/content-reader/v1/prompt-specs.js +33 -0
  80. package/dist/profiles/content-reader/v1/prompts.d.ts +3 -2
  81. package/dist/profiles/content-reader/v1/prompts.js +69 -76
  82. package/dist/profiles/content-reader/v1/resources/playbooks.d.ts +2 -1
  83. package/dist/profiles/content-reader/v1/resources/playbooks.js +10 -11
  84. package/dist/profiles/data-analyst/v1/invariants.d.ts +21 -0
  85. package/dist/profiles/data-analyst/v1/invariants.js +31 -0
  86. package/dist/profiles/data-analyst/v1/prompts.d.ts +3 -2
  87. package/dist/profiles/data-analyst/v1/prompts.js +17 -9
  88. package/dist/profiles/data-analyst/v1/resources/playbooks.d.ts +2 -1
  89. package/dist/profiles/data-analyst/v1/resources/playbooks.js +6 -7
  90. package/dist/profiles/lib/playbook-resources.d.ts +16 -34
  91. package/dist/profiles/lib/playbook-resources.js +55 -76
  92. package/dist/profiles/lib/prompt-context.d.ts +71 -0
  93. package/dist/profiles/lib/prompt-context.js +205 -0
  94. package/dist/profiles/lib/prompt-context.test.d.ts +4 -0
  95. package/dist/profiles/lib/prompt-context.test.js +154 -0
  96. package/dist/profiles/lib/prompt-invariants.d.ts +20 -0
  97. package/dist/profiles/lib/prompt-invariants.js +54 -0
  98. package/dist/profiles/organization-audit/v1/invariants.d.ts +24 -0
  99. package/dist/profiles/organization-audit/v1/invariants.js +35 -0
  100. package/dist/profiles/organization-audit/v1/prompts.d.ts +3 -2
  101. package/dist/profiles/organization-audit/v1/prompts.js +44 -28
  102. package/dist/profiles/organization-audit/v1/resources/playbooks.d.ts +2 -1
  103. package/dist/profiles/organization-audit/v1/resources/playbooks.js +10 -3
  104. package/dist/profiles/semantic-layer/v1/invariants.d.ts +27 -0
  105. package/dist/profiles/semantic-layer/v1/invariants.js +39 -0
  106. package/dist/profiles/semantic-layer/v1/prompts.d.ts +3 -2
  107. package/dist/profiles/semantic-layer/v1/prompts.js +37 -26
  108. package/dist/profiles/semantic-layer/v1/resources/playbooks.d.ts +2 -4
  109. package/dist/profiles/semantic-layer/v1/resources/playbooks.js +8 -7
  110. package/dist/profiles/test-support/prompt-context-budget.test.d.ts +5 -0
  111. package/dist/profiles/test-support/prompt-context-budget.test.js +72 -0
  112. package/dist/profiles/types.d.ts +6 -1
  113. package/dist/server/capabilities.d.ts +3 -0
  114. package/dist/server/capabilities.js +4 -2
  115. package/dist/tools/lib/schema-fields.d.ts +4 -0
  116. package/dist/tools/lib/schema-fields.js +8 -1
  117. package/dist/tools/project/developer-content-preview.js +1 -1
  118. package/dist/tools/project/developer-content.js +2 -2
  119. package/dist/tools/query/reader-tool-helpers.d.ts +2 -2
  120. package/dist/tools/query/reader-tool-helpers.js +2 -2
  121. package/dist/tools/query/reader-tool-helpers.test.js +1 -0
  122. package/dist/tools/shared.d.ts +6 -1
  123. package/dist/tools/shared.js +12 -2
  124. package/dist/transports/streamable-http.js +13 -4
  125. package/dist/transports/streamable-http.test.js +8 -3
  126. package/package.json +3 -3
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /**
3
+ * Structured prompt invariants (SSOT for eager safety capsules and HARD_BANS projections).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.INVARIANT_CAPSULE_HEADER = void 0;
7
+ exports.assertUniqueInvariantIds = assertUniqueInvariantIds;
8
+ exports.allInvariantIds = allInvariantIds;
9
+ exports.resolveInvariants = resolveInvariants;
10
+ exports.invariantIndex = invariantIndex;
11
+ exports.formatInvariantCapsule = formatInvariantCapsule;
12
+ exports.formatHardBansProjection = formatHardBansProjection;
13
+ exports.INVARIANT_CAPSULE_HEADER = 'Critical invariants:';
14
+ /** Assert unique invariant ids (throws on duplicates). */
15
+ function assertUniqueInvariantIds(invariants) {
16
+ const seen = new Set();
17
+ for (const inv of invariants) {
18
+ if (seen.has(inv.id)) {
19
+ throw new Error(`Duplicate prompt invariant id '${inv.id}'`);
20
+ }
21
+ seen.add(inv.id);
22
+ }
23
+ }
24
+ /** Typed id list for a catalog (avoids per-profile `as unknown as` casts). */
25
+ function allInvariantIds(catalog) {
26
+ return catalog.map((inv) => inv.id);
27
+ }
28
+ function resolveInvariants(byId, ids) {
29
+ const resolved = [];
30
+ for (const id of ids) {
31
+ const inv = byId.get(id);
32
+ if (!inv) {
33
+ throw new Error(`Unknown prompt invariant id '${id}'`);
34
+ }
35
+ resolved.push(inv);
36
+ }
37
+ return resolved;
38
+ }
39
+ /** Build a lookup map once (call after assertUniqueInvariantIds). */
40
+ function invariantIndex(catalog) {
41
+ return new Map(catalog.map((inv) => [inv.id, inv]));
42
+ }
43
+ /** Compact eager capsule for prompts/get text. */
44
+ function formatInvariantCapsule(invariants) {
45
+ if (invariants.length === 0) {
46
+ return '';
47
+ }
48
+ const lines = invariants.map((inv) => `- ${inv.short}`);
49
+ return [exports.INVARIANT_CAPSULE_HEADER, ...lines].join('\n');
50
+ }
51
+ /** Legacy multi-line HARD_BANS string (one ban per line, no header). */
52
+ function formatHardBansProjection(invariants) {
53
+ return invariants.map((inv) => inv.short).join('\n');
54
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Organization-audit structured prompt invariants (SSOT for capsules + HARD_BANS projection).
3
+ */
4
+ export declare const ORGANIZATION_AUDIT_INVARIANTS: readonly [{
5
+ readonly id: "no-mutation";
6
+ readonly short: "Do not mutate users/groups/roles/content/schedulers.";
7
+ }, {
8
+ readonly id: "no-warehouse-query";
9
+ readonly short: "Do not execute warehouse or chart queries.";
10
+ }, {
11
+ readonly id: "no-csv-download";
12
+ readonly short: "Do not download user-activity CSV.";
13
+ }, {
14
+ readonly id: "no-secrets";
15
+ readonly short: "Do not reveal secrets.";
16
+ }, {
17
+ readonly id: "no-unbounded-crawl";
18
+ readonly short: "Do not crawl unbounded org inventories. Prefer core budgets (page/project caps).";
19
+ }, {
20
+ readonly id: "no-compliance-claim";
21
+ readonly short: "Do not claim compliance certification. Those capabilities are not available on this server.";
22
+ }];
23
+ export declare const ORGANIZATION_AUDIT_HARD_BANS: string;
24
+ export declare const ORGANIZATION_AUDIT_DEFAULT_INVARIANT_IDS: readonly ("no-secrets" | "no-mutation" | "no-warehouse-query" | "no-csv-download" | "no-unbounded-crawl" | "no-compliance-claim")[];
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * Organization-audit structured prompt invariants (SSOT for capsules + HARD_BANS projection).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ORGANIZATION_AUDIT_DEFAULT_INVARIANT_IDS = exports.ORGANIZATION_AUDIT_HARD_BANS = exports.ORGANIZATION_AUDIT_INVARIANTS = void 0;
7
+ const prompt_invariants_js_1 = require("../../lib/prompt-invariants.js");
8
+ exports.ORGANIZATION_AUDIT_INVARIANTS = [
9
+ {
10
+ id: 'no-mutation',
11
+ short: 'Do not mutate users/groups/roles/content/schedulers.',
12
+ },
13
+ {
14
+ id: 'no-warehouse-query',
15
+ short: 'Do not execute warehouse or chart queries.',
16
+ },
17
+ {
18
+ id: 'no-csv-download',
19
+ short: 'Do not download user-activity CSV.',
20
+ },
21
+ {
22
+ id: 'no-secrets',
23
+ short: 'Do not reveal secrets.',
24
+ },
25
+ {
26
+ id: 'no-unbounded-crawl',
27
+ short: 'Do not crawl unbounded org inventories. Prefer core budgets (page/project caps).',
28
+ },
29
+ {
30
+ id: 'no-compliance-claim',
31
+ short: 'Do not claim compliance certification. Those capabilities are not available on this server.',
32
+ },
33
+ ];
34
+ exports.ORGANIZATION_AUDIT_HARD_BANS = (0, prompt_invariants_js_1.formatHardBansProjection)(exports.ORGANIZATION_AUDIT_INVARIANTS);
35
+ exports.ORGANIZATION_AUDIT_DEFAULT_INVARIANT_IDS = (0, prompt_invariants_js_1.allInvariantIds)(exports.ORGANIZATION_AUDIT_INVARIANTS);
@@ -1,5 +1,6 @@
1
1
  /**
2
- * MCP prompts for organization-audit workflows.
2
+ * MCP prompts for organization-audit workflows (progressive-disclosure context).
3
3
  */
4
+ import type { RegisterPromptsOptions } from '../../types.js';
4
5
  import type { McpServer } from '@modelcontextprotocol/server';
5
- export declare function registerOrganizationAuditPrompts(server: McpServer): void;
6
+ export declare function registerOrganizationAuditPrompts(server: McpServer, options?: RegisterPromptsOptions): void;
@@ -1,18 +1,27 @@
1
1
  "use strict";
2
2
  /**
3
- * MCP prompts for organization-audit workflows.
3
+ * MCP prompts for organization-audit workflows (progressive-disclosure context).
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.registerOrganizationAuditPrompts = registerOrganizationAuditPrompts;
7
7
  /* eslint-disable @typescript-eslint/no-deprecated -- matches semantic-layer prompt registration pattern */
8
8
  const zod_1 = require("zod");
9
- const playbook_resources_js_1 = require("../../lib/playbook-resources.js");
9
+ const schema_fields_js_1 = require("../../../tools/lib/schema-fields.js");
10
+ const prompt_context_js_1 = require("../../lib/prompt-context.js");
11
+ const invariants_js_1 = require("./invariants.js");
10
12
  const playbooks_js_1 = require("./resources/playbooks.js");
11
- const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
13
+ const TOPIC_ACCESS = 'access';
14
+ const TOPIC_CONTENT = 'content';
15
+ const TOPIC_DELIVERIES = 'deliveries';
16
+ const bindPromptContext = (0, prompt_context_js_1.bindProfilePromptContext)({
17
+ invariants: invariants_js_1.ORGANIZATION_AUDIT_INVARIANTS,
12
18
  core: playbooks_js_1.ORGANIZATION_AUDIT_CORE_PLAYBOOK,
13
19
  topics: playbooks_js_1.ORGANIZATION_AUDIT_TOPIC_PLAYBOOKS,
20
+ topicMeta: playbooks_js_1.ORGANIZATION_AUDIT_TOPIC_META,
14
21
  });
15
- function registerOrganizationAuditPrompts(server) {
22
+ function registerOrganizationAuditPrompts(server, options) {
23
+ const promptContext = bindPromptContext(options === null || options === void 0 ? void 0 : options.promptContextPolicy);
24
+ const invariantIds = invariants_js_1.ORGANIZATION_AUDIT_DEFAULT_INVARIANT_IDS;
16
25
  server.registerPrompt('audit_organization', {
17
26
  title: 'Audit organization',
18
27
  description: 'Bounded, evidence-backed read-only org audit via primitive lightdash_* tools (no audit_* mega-tools)',
@@ -26,9 +35,8 @@ function registerOrganizationAuditPrompts(server) {
26
35
  .optional()
27
36
  .describe('Comma-separated internal email domains; convert to a string[] for tool args'),
28
37
  },
29
- }, ({ projectUuids, allowedEmailDomains }) => userMessages(`Perform a bounded, evidence-backed, read-only audit of the current Lightdash organization.
30
-
31
- ${playbooks_js_1.ORGANIZATION_AUDIT_HARD_BANS}
38
+ }, ({ projectUuids, allowedEmailDomains }) => promptContext({
39
+ task: `Perform a bounded, evidence-backed, read-only audit of the current Lightdash organization.
32
40
 
33
41
  Scope inputs:
34
42
  - Optional project filter: ${projectUuids !== null && projectUuids !== void 0 ? projectUuids : '(none — sample ≤3 DEFAULT non-preview projects; honor X-Lightdash-Project pin if set)'}.
@@ -41,7 +49,10 @@ Procedure (primitives only — there are no lightdash_audit_* tools):
41
49
  3. Content (content playbook): per project list_content + list_validation_results + get_project_user_activity (summarize; do not dump weekly series).
42
50
  4. Deliveries (deliveries playbook): list_project_schedulers; get_scheduler only as needed.
43
51
  5. Phase 5 report: use the core finding template; cite tools + UUIDs; separate facts vs inferences; list budget/pagination/redaction gaps.
44
- 6. Never claim formal compliance certification or exhaustive inventory when pagination/budgets stopped early.`));
52
+ 6. Never claim formal compliance certification or exhaustive inventory when pagination/budgets stopped early.`,
53
+ invariantIds,
54
+ requiredTopics: [],
55
+ }));
45
56
  server.registerPrompt('review_access_governance', {
46
57
  title: 'Review access governance',
47
58
  description: 'Build a bounded effective-access picture from identity + project/space primitives',
@@ -55,16 +66,18 @@ Procedure (primitives only — there are no lightdash_audit_* tools):
55
66
  .optional()
56
67
  .describe('Comma-separated domains → string[] for tools'),
57
68
  },
58
- }, ({ projectUuids, allowedEmailDomains }) => userMessages(`Review Lightdash identity and access governance with core budgets.
59
-
60
- ${playbooks_js_1.ORGANIZATION_AUDIT_HARD_BANS}
69
+ }, ({ projectUuids, allowedEmailDomains }) => promptContext({
70
+ task: `Review Lightdash identity and access governance with core budgets.
61
71
 
62
72
  Projects: ${projectUuids !== null && projectUuids !== void 0 ? projectUuids : '(sample ≤3)'}.
63
73
  Domains: ${allowedEmailDomains !== null && allowedEmailDomains !== void 0 ? allowedEmailDomains : '(none)'}.
64
74
 
65
75
  Mandatory tool order per project: lightdash_list_project_roles → lightdash_list_project_direct_access → lightdash_list_space_access → lightdash_resolve_effective_access.
66
76
  Also use lightdash_list_org_members, lightdash_list_org_groups, lightdash_list_org_role_assignments, lightdash_list_custom_roles as needed.
67
- Empty direct_access ≠ no access. Truncation / INCOMPLETE_EFFECTIVE_ACCESS warnings must appear in the report.`, 'access'));
77
+ Empty direct_access ≠ no access. Truncation / INCOMPLETE_EFFECTIVE_ACCESS warnings must appear in the report.`,
78
+ invariantIds,
79
+ requiredTopics: [TOPIC_ACCESS],
80
+ }));
68
81
  server.registerPrompt('review_content_governance', {
69
82
  title: 'Review content governance',
70
83
  description: 'Inventory content health via list_content, validation, and user-activity evidence',
@@ -74,14 +87,16 @@ Empty direct_access ≠ no access. Truncation / INCOMPLETE_EFFECTIVE_ACCESS warn
74
87
  .optional()
75
88
  .describe('Comma-separated project UUIDs (required for useful inventory; else sample ≤3)'),
76
89
  },
77
- }, ({ projectUuids }) => userMessages(`Inventory charts, dashboards, and spaces; evaluate validation, ownership, and usage.
78
-
79
- ${playbooks_js_1.ORGANIZATION_AUDIT_HARD_BANS}
90
+ }, ({ projectUuids }) => promptContext({
91
+ task: `Inventory charts, dashboards, and spaces; evaluate validation, ownership, and usage.
80
92
 
81
93
  Projects: ${projectUuids !== null && projectUuids !== void 0 ? projectUuids : '(sample ≤3; always pass projectUuids into list_content)'}.
82
94
 
83
95
  Use lightdash_list_content (sortBy views or last_updated_at), lightdash_list_validation_results, and lightdash_get_project_user_activity (summarize role counts + top views only). Optional lightdash_get_dashboard_meta.
84
- Join in the conversation — no server-side audit crawler. Do not recommend deletion for low/zero views.`, 'content'));
96
+ Join in the conversation — no server-side audit crawler. Do not recommend deletion for low/zero views.`,
97
+ invariantIds,
98
+ requiredTopics: [TOPIC_CONTENT],
99
+ }));
85
100
  server.registerPrompt('review_scheduled_deliveries', {
86
101
  title: 'Review scheduled deliveries',
87
102
  description: 'Inspect schedulers without executing or mutating them',
@@ -92,33 +107,34 @@ Join in the conversation — no server-side audit crawler. Do not recommend dele
92
107
  .describe('Comma-separated project UUIDs (default: ≤3 sampled)'),
93
108
  allowedEmailDomains: zod_1.z.string().optional().describe('Comma-separated domains → string[]'),
94
109
  },
95
- }, ({ projectUuids, allowedEmailDomains }) => userMessages(`Inspect scheduled deliveries without creating, editing, executing, enabling, disabling, or deleting schedules.
96
-
97
- ${playbooks_js_1.ORGANIZATION_AUDIT_HARD_BANS}
110
+ }, ({ projectUuids, allowedEmailDomains }) => promptContext({
111
+ task: `Inspect scheduled deliveries without creating, editing, executing, enabling, disabling, or deleting schedules.
98
112
 
99
113
  Projects: ${projectUuids !== null && projectUuids !== void 0 ? projectUuids : '(sample ≤3)'}.
100
114
  Allowed email domains: ${allowedEmailDomains !== null && allowedEmailDomains !== void 0 ? allowedEmailDomains : '(none)'}.
101
115
 
102
116
  Use lightdash_list_project_schedulers (destinations redacted by default) and lightdash_get_scheduler when needed.
103
- Report enabled and disabled schedules. External destinations (if revealed) are review signals, not automatic violations.`, 'deliveries'));
117
+ Report enabled and disabled schedules. External destinations (if revealed) are review signals, not automatic violations.`,
118
+ invariantIds,
119
+ requiredTopics: [TOPIC_DELIVERIES],
120
+ }));
104
121
  server.registerPrompt('investigate_audit_finding', {
105
122
  title: 'Investigate audit finding',
106
123
  description: 'Validate or refute one previously reported finding with minimum extra metadata',
107
124
  argsSchema: {
108
125
  findingSummary: zod_1.z.string().describe('The finding claim to investigate'),
109
- projectUuid: zod_1.z
110
- .string()
111
- .optional()
112
- .describe('Project UUID when the finding is project-scoped'),
126
+ projectUuid: (0, schema_fields_js_1.optionalProjectUuidField)(),
113
127
  },
114
- }, ({ findingSummary, projectUuid }) => userMessages(`Investigate this organization-audit finding with minimum additional metadata:
128
+ }, ({ findingSummary, projectUuid }) => promptContext({
129
+ task: `Investigate this organization-audit finding with minimum additional metadata:
115
130
 
116
131
  ${findingSummary}
117
132
 
118
133
  Project context: ${projectUuid !== null && projectUuid !== void 0 ? projectUuid : '(org-level or unspecified — ask only if needed)'}.
119
134
 
120
- ${playbooks_js_1.ORGANIZATION_AUDIT_HARD_BANS}
121
-
122
- Use only primitive list/get tools under core budgets. Report supporting evidence, contradictory evidence, remaining uncertainty, and whether severity/confidence changed. Prefer targeted get_* / single-project lists over org-wide crawls.`));
135
+ Use only primitive list/get tools under core budgets. Report supporting evidence, contradictory evidence, remaining uncertainty, and whether severity/confidence changed. Prefer targeted get_* / single-project lists over org-wide crawls.`,
136
+ invariantIds,
137
+ requiredTopics: [],
138
+ }));
123
139
  }
124
140
  /* eslint-enable @typescript-eslint/no-deprecated */
@@ -3,8 +3,9 @@
3
3
  */
4
4
  import type { McpServer } from '@modelcontextprotocol/server';
5
5
  export type OrganizationAuditPlaybookTopic = 'access' | 'content' | 'deliveries';
6
- export declare const ORGANIZATION_AUDIT_HARD_BANS: string;
6
+ export { ORGANIZATION_AUDIT_HARD_BANS } from '../invariants.js';
7
7
  export declare const getAllPlaybookMarkdown: () => string;
8
8
  export declare const ORGANIZATION_AUDIT_CORE_PLAYBOOK: import("../../../lib/playbook-resources.js").EmbeddedPlaybook;
9
9
  export declare const ORGANIZATION_AUDIT_TOPIC_PLAYBOOKS: Readonly<Record<OrganizationAuditPlaybookTopic, import("../../../lib/playbook-resources.js").EmbeddedPlaybook>>;
10
+ export declare const ORGANIZATION_AUDIT_TOPIC_META: Readonly<Record<OrganizationAuditPlaybookTopic, import("../../../lib/playbook-resources.js").PromptTopicMeta>>;
10
11
  export declare function registerOrganizationAuditPlaybook(server: McpServer): void;
@@ -3,13 +3,12 @@
3
3
  * Organization-audit multi-playbook resources (core + topics + index).
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ORGANIZATION_AUDIT_TOPIC_PLAYBOOKS = exports.ORGANIZATION_AUDIT_CORE_PLAYBOOK = exports.getAllPlaybookMarkdown = exports.ORGANIZATION_AUDIT_HARD_BANS = void 0;
6
+ exports.ORGANIZATION_AUDIT_TOPIC_META = exports.ORGANIZATION_AUDIT_TOPIC_PLAYBOOKS = exports.ORGANIZATION_AUDIT_CORE_PLAYBOOK = exports.getAllPlaybookMarkdown = exports.ORGANIZATION_AUDIT_HARD_BANS = void 0;
7
7
  exports.registerOrganizationAuditPlaybook = registerOrganizationAuditPlaybook;
8
8
  const playbook_resources_js_1 = require("../../../lib/playbook-resources.js");
9
9
  const playbooks = (0, playbook_resources_js_1.defineProfilePlaybooks)({
10
10
  profileId: 'organization-audit',
11
11
  moduleDir: __dirname,
12
- hardBans: 'Do not mutate users/groups/roles/content/schedulers, execute warehouse or chart queries, download user-activity CSV, reveal secrets, crawl unbounded org inventories, or claim compliance certification. Prefer core budgets (page/project caps). Those capabilities are not available on this server.',
13
12
  coreDescription: 'Hard bans, tool catalog, scope, and report rules',
14
13
  topics: [
15
14
  {
@@ -17,25 +16,33 @@ const playbooks = (0, playbook_resources_js_1.defineProfilePlaybooks)({
17
16
  title: 'Organization-audit access playbook',
18
17
  description: 'Identity and project/access governance phases',
19
18
  file: 'access.md',
19
+ useWhen: 'Reviewing identity, roles, or effective access',
20
+ priority: 0.8,
20
21
  },
21
22
  {
22
23
  id: 'content',
23
24
  title: 'Organization-audit content playbook',
24
25
  description: 'Content inventory, validation, and usage health',
25
26
  file: 'content.md',
27
+ useWhen: 'Inventorying content health, validation, or usage',
28
+ priority: 0.75,
26
29
  },
27
30
  {
28
31
  id: 'deliveries',
29
32
  title: 'Organization-audit deliveries playbook',
30
33
  description: 'Scheduled delivery review without mutation',
31
34
  file: 'deliveries.md',
35
+ useWhen: 'Inspecting scheduled deliveries without mutation',
36
+ priority: 0.7,
32
37
  },
33
38
  ],
34
39
  });
35
- exports.ORGANIZATION_AUDIT_HARD_BANS = playbooks.HARD_BANS;
40
+ var invariants_js_1 = require("../invariants.js");
41
+ Object.defineProperty(exports, "ORGANIZATION_AUDIT_HARD_BANS", { enumerable: true, get: function () { return invariants_js_1.ORGANIZATION_AUDIT_HARD_BANS; } });
36
42
  exports.getAllPlaybookMarkdown = playbooks.getAllPlaybookMarkdown;
37
43
  exports.ORGANIZATION_AUDIT_CORE_PLAYBOOK = playbooks.CORE_PLAYBOOK;
38
44
  exports.ORGANIZATION_AUDIT_TOPIC_PLAYBOOKS = playbooks.TOPIC_PLAYBOOKS;
45
+ exports.ORGANIZATION_AUDIT_TOPIC_META = playbooks.TOPIC_META;
39
46
  function registerOrganizationAuditPlaybook(server) {
40
47
  playbooks.registerPlaybooks(server);
41
48
  }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Semantic-layer structured prompt invariants (SSOT for capsules + HARD_BANS projection).
3
+ */
4
+ export declare const SEMANTIC_LAYER_INVARIANTS: readonly [{
5
+ readonly id: "no-query-execution";
6
+ readonly short: "Do not run metric/SQL/chart queries or use SQL runner.";
7
+ }, {
8
+ readonly id: "no-validation-jobs";
9
+ readonly short: "Do not trigger validation jobs.";
10
+ }, {
11
+ readonly id: "no-mutation";
12
+ readonly short: "Do not mutate content.";
13
+ }, {
14
+ readonly id: "project-scope";
15
+ readonly short: "Do not switch away from the given projectUuid.";
16
+ }, {
17
+ readonly id: "no-invent-field-ids";
18
+ readonly short: "Do not invent fieldIds.";
19
+ }, {
20
+ readonly id: "no-dump-payloads";
21
+ readonly short: "Do not dump full explore/metric/lineage payloads.";
22
+ }, {
23
+ readonly id: "no-ai-identity";
24
+ readonly short: "Do not call AI/identity tools. Those are not available on this server.";
25
+ }];
26
+ export declare const SEMANTIC_LAYER_HARD_BANS: string;
27
+ export declare const SEMANTIC_LAYER_DEFAULT_INVARIANT_IDS: readonly ("project-scope" | "no-invent-field-ids" | "no-mutation" | "no-query-execution" | "no-validation-jobs" | "no-dump-payloads" | "no-ai-identity")[];
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * Semantic-layer structured prompt invariants (SSOT for capsules + HARD_BANS projection).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SEMANTIC_LAYER_DEFAULT_INVARIANT_IDS = exports.SEMANTIC_LAYER_HARD_BANS = exports.SEMANTIC_LAYER_INVARIANTS = void 0;
7
+ const prompt_invariants_js_1 = require("../../lib/prompt-invariants.js");
8
+ exports.SEMANTIC_LAYER_INVARIANTS = [
9
+ {
10
+ id: 'no-query-execution',
11
+ short: 'Do not run metric/SQL/chart queries or use SQL runner.',
12
+ },
13
+ {
14
+ id: 'no-validation-jobs',
15
+ short: 'Do not trigger validation jobs.',
16
+ },
17
+ {
18
+ id: 'no-mutation',
19
+ short: 'Do not mutate content.',
20
+ },
21
+ {
22
+ id: 'project-scope',
23
+ short: 'Do not switch away from the given projectUuid.',
24
+ },
25
+ {
26
+ id: 'no-invent-field-ids',
27
+ short: 'Do not invent fieldIds.',
28
+ },
29
+ {
30
+ id: 'no-dump-payloads',
31
+ short: 'Do not dump full explore/metric/lineage payloads.',
32
+ },
33
+ {
34
+ id: 'no-ai-identity',
35
+ short: 'Do not call AI/identity tools. Those are not available on this server.',
36
+ },
37
+ ];
38
+ exports.SEMANTIC_LAYER_HARD_BANS = (0, prompt_invariants_js_1.formatHardBansProjection)(exports.SEMANTIC_LAYER_INVARIANTS);
39
+ exports.SEMANTIC_LAYER_DEFAULT_INVARIANT_IDS = (0, prompt_invariants_js_1.allInvariantIds)(exports.SEMANTIC_LAYER_INVARIANTS);
@@ -1,5 +1,6 @@
1
1
  /**
2
- * MCP prompts for semantic-layer discovery and compile workflows.
2
+ * MCP prompts for semantic-layer discovery and compile workflows (progressive-disclosure context).
3
3
  */
4
+ import type { RegisterPromptsOptions } from '../../types.js';
4
5
  import type { McpServer } from '@modelcontextprotocol/server';
5
- export declare function registerSemanticLayerPrompts(server: McpServer): void;
6
+ export declare function registerSemanticLayerPrompts(server: McpServer, options?: RegisterPromptsOptions): void;
@@ -1,35 +1,42 @@
1
1
  "use strict";
2
2
  /**
3
- * MCP prompts for semantic-layer discovery and compile workflows.
3
+ * MCP prompts for semantic-layer discovery and compile workflows (progressive-disclosure context).
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.registerSemanticLayerPrompts = registerSemanticLayerPrompts;
7
+ /* eslint-disable @typescript-eslint/no-deprecated -- matches content-reader prompt registration pattern */
7
8
  const zod_1 = require("zod");
8
9
  const schema_fields_js_1 = require("../../../tools/lib/schema-fields.js");
9
10
  const schema_fields_js_2 = require("../../../tools/semantic/schema-fields.js");
10
- const playbook_resources_js_1 = require("../../lib/playbook-resources.js");
11
+ const prompt_context_js_1 = require("../../lib/prompt-context.js");
12
+ const invariants_js_1 = require("./invariants.js");
11
13
  const playbooks_js_1 = require("./resources/playbooks.js");
12
- const userMessages = (0, playbook_resources_js_1.createPromptPlaybookEmbedder)({
14
+ const TOPIC_EXPLORE = 'explore';
15
+ const TOPIC_COMPOSE_COMPILE = 'compose-compile';
16
+ const bindPromptContext = (0, prompt_context_js_1.bindProfilePromptContext)({
17
+ invariants: invariants_js_1.SEMANTIC_LAYER_INVARIANTS,
13
18
  core: playbooks_js_1.SEMANTIC_LAYER_CORE_PLAYBOOK,
14
19
  topics: playbooks_js_1.SEMANTIC_LAYER_TOPIC_PLAYBOOKS,
20
+ topicMeta: playbooks_js_1.SEMANTIC_LAYER_TOPIC_META,
15
21
  });
16
- function registerSemanticLayerPrompts(server) {
22
+ function registerSemanticLayerPrompts(server, options) {
23
+ const promptContext = bindPromptContext(options === null || options === void 0 ? void 0 : options.promptContextPolicy);
24
+ const invariantIds = invariants_js_1.SEMANTIC_LAYER_DEFAULT_INVARIANT_IDS;
17
25
  server.registerPrompt('lightdash_semantic_explore', {
18
26
  title: 'Explore semantic layer',
19
27
  description: 'Locate explores, metrics, and dimensions for a question without running warehouse queries',
20
- argsSchema: zod_1.z.object({
28
+ argsSchema: {
21
29
  projectUuid: (0, schema_fields_js_1.projectUuidField)(),
22
30
  question: zod_1.z.string().optional().describe('Natural-language question or topic'),
23
- }),
31
+ },
24
32
  }, async ({ projectUuid, question }) => {
25
33
  const topic = question ? `Question/topic: ${question}.` : '';
26
- return userMessages(`Discover the Lightdash semantic layer for this project. Compile is out of scope unless asked.
34
+ return promptContext({
35
+ task: `Discover the Lightdash semantic layer for this project. Compile is out of scope unless asked.
27
36
 
28
37
  Project UUID (required on every tool): ${projectUuid}.
29
38
  ${topic}
30
39
 
31
- ${playbooks_js_1.SEMANTIC_LAYER_HARD_BANS}
32
-
33
40
  Procedure:
34
41
  1. get_project once to confirm name. Do not switch projects from org-wide list_projects.
35
42
  2. list_explores with search+limit (≤15). Disambiguate: skip empty schemaName / errors; prefer exact label or name __{table}; deprioritize eda_/reporting_ unless asked.
@@ -37,61 +44,65 @@ Procedure:
37
44
  4. get_explore → tables[baseTable].metrics only (≤8 names/labels). Skip list_metrics once explore is known. Skip get_metric / get_field_lineage unless needed.
38
45
  5. Deliverable: chosen explore (name/label/schemaName/databaseName + why) + field shortlist. Never dump full explore/dimension/metric/lineage payloads.
39
46
 
40
- Follow embedded playbooks (${playbooks_js_1.SEMANTIC_LAYER_CORE_URI}, ${playbooks_js_1.SEMANTIC_LAYER_EXPLORE_URI}). Use only lightdash_* tools.`, 'explore');
47
+ Use only lightdash_* tools.`,
48
+ invariantIds,
49
+ requiredTopics: [TOPIC_EXPLORE],
50
+ });
41
51
  });
42
52
  server.registerPrompt('lightdash_semantic_compose_compile', {
43
53
  title: 'Compose and compile query',
44
54
  description: 'Build a metric query and compile it with lightdash_compile_query; never execute against the warehouse',
45
- argsSchema: zod_1.z.object({
55
+ argsSchema: {
46
56
  projectUuid: (0, schema_fields_js_1.projectUuidField)(),
47
57
  question: zod_1.z.string().optional().describe('What the query should answer'),
48
58
  exploreId: (0, schema_fields_js_2.exploreIdField)().optional(),
49
- }),
59
+ },
50
60
  }, async ({ projectUuid, question, exploreId }) => {
51
61
  const topic = question ? `Goal: ${question}.` : '';
52
62
  const explore = exploreId ? `Preferred explore: ${exploreId}.` : '';
53
- return userMessages(`Compose a Lightdash metric query and compile it with lightdash_compile_query. Do not run the query.
63
+ return promptContext({
64
+ task: `Compose a Lightdash metric query and compile it with lightdash_compile_query. Do not run the query.
54
65
 
55
66
  Project UUID: ${projectUuid}.
56
67
  ${topic}
57
68
  ${explore}
58
69
 
59
- ${playbooks_js_1.SEMANTIC_LAYER_HARD_BANS}
60
-
61
70
  Procedure:
62
71
  1. If exploreId is missing, resolve it per explore playbook (search + disambiguation). Stay on this projectUuid.
63
72
  2. Copy fieldIds from list_dimensions and {exploreId}_{metricName} from get_explore → tables[baseTable].metrics. Never invent grains.
64
73
  3. If the user asked for N insights, reuse one explore and compile N diverse cuts.
65
74
  4. Build metricQuery from the compose-compile skeleton (fieldIds only; tool sets exploreName from exploreId and defaults missing tableCalculations to []). After each compile, verify every requested fieldId appears as a SELECT alias (missing alias = failure even without isError). Prefer SELECT aliases over metric name/label. ≤2 fix retries.
66
- 5. Deliverable: insight title(s) + fieldIds + compiled SQL (or errors). Never paste full explore/dimension/metric/lineage payloads.
67
-
68
- Follow embedded playbooks (${playbooks_js_1.SEMANTIC_LAYER_CORE_URI}, ${playbooks_js_1.SEMANTIC_LAYER_COMPOSE_COMPILE_URI}).`, 'compose-compile');
75
+ 5. Deliverable: insight title(s) + fieldIds + compiled SQL (or errors). Never paste full explore/dimension/metric/lineage payloads.`,
76
+ invariantIds,
77
+ requiredTopics: [TOPIC_COMPOSE_COMPILE],
78
+ });
69
79
  });
70
80
  server.registerPrompt('lightdash_semantic_compile_debug', {
71
81
  title: 'Debug compile errors',
72
82
  description: 'Interpret lightdash_compile_query failures, adjust the metric query, and re-compile',
73
- argsSchema: zod_1.z.object({
83
+ argsSchema: {
74
84
  projectUuid: (0, schema_fields_js_1.projectUuidField)(),
75
85
  exploreId: (0, schema_fields_js_2.exploreIdField)(),
76
86
  errorText: zod_1.z.string().optional().describe('Compile error text if already known'),
77
- }),
87
+ },
78
88
  }, async ({ projectUuid, exploreId, errorText }) => {
79
89
  const err = errorText ? `Known error: ${errorText}` : '';
80
- return userMessages(`Debug a failing lightdash_compile_query call and re-compile until it succeeds or you explain blockers.
90
+ return promptContext({
91
+ task: `Debug a failing lightdash_compile_query call and re-compile until it succeeds or you explain blockers.
81
92
 
82
93
  Project UUID: ${projectUuid}
83
94
  Explore: ${exploreId}
84
95
  ${err}
85
96
 
86
- ${playbooks_js_1.SEMANTIC_LAYER_HARD_BANS}
87
-
88
97
  Checklist:
89
98
  - unknown field id / empty SELECT / missing SELECT alias → use fieldIds from list_dimensions (base table) + explore-local metrics; re-compile (≤2 retries). Prefer SELECT aliases / compiledSql over metric name/label.
90
99
  - Other OpenAPI-required keys still failing (filters, sorts, limit, …) → copy the compose-compile skeleton; MCP fills exploreName and missing tableCalculations.
91
100
  - Wrong explore → re-disambiguate (schemaName; label or name __{table}; skip empty schema / eda unless asked).
92
101
  - Metric not found / catalog empty → get_explore tables[baseTable].metrics; tableName must be the full explore id; compile as {exploreId}_{metricName}.
93
- - Verify SELECT aliases after every compile. Stop after a good compile or a clear blocker.
94
-
95
- Follow embedded playbooks (${playbooks_js_1.SEMANTIC_LAYER_CORE_URI}, ${playbooks_js_1.SEMANTIC_LAYER_COMPOSE_COMPILE_URI}).`, 'compose-compile');
102
+ - Verify SELECT aliases after every compile. Stop after a good compile or a clear blocker.`,
103
+ invariantIds,
104
+ requiredTopics: [TOPIC_COMPOSE_COMPILE],
105
+ });
96
106
  });
97
107
  }
108
+ /* eslint-enable @typescript-eslint/no-deprecated */
@@ -3,11 +3,9 @@
3
3
  */
4
4
  import type { McpServer } from '@modelcontextprotocol/server';
5
5
  export type SemanticLayerPlaybookTopic = 'compose-compile' | 'explore';
6
- export declare const SEMANTIC_LAYER_CORE_URI: string;
7
- export declare const SEMANTIC_LAYER_EXPLORE_URI: string;
8
- export declare const SEMANTIC_LAYER_COMPOSE_COMPILE_URI: string;
9
- export declare const SEMANTIC_LAYER_HARD_BANS: string;
6
+ export { SEMANTIC_LAYER_HARD_BANS } from '../invariants.js';
10
7
  export declare const getAllPlaybookMarkdown: () => string;
11
8
  export declare const SEMANTIC_LAYER_CORE_PLAYBOOK: import("../../../lib/playbook-resources.js").EmbeddedPlaybook;
12
9
  export declare const SEMANTIC_LAYER_TOPIC_PLAYBOOKS: Readonly<Record<SemanticLayerPlaybookTopic, import("../../../lib/playbook-resources.js").EmbeddedPlaybook>>;
10
+ export declare const SEMANTIC_LAYER_TOPIC_META: Readonly<Record<SemanticLayerPlaybookTopic, import("../../../lib/playbook-resources.js").PromptTopicMeta>>;
13
11
  export declare function registerSemanticLayerPlaybook(server: McpServer): void;
@@ -3,14 +3,12 @@
3
3
  * Semantic-layer multi-playbook resources (core + topics + index).
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SEMANTIC_LAYER_TOPIC_PLAYBOOKS = exports.SEMANTIC_LAYER_CORE_PLAYBOOK = exports.getAllPlaybookMarkdown = exports.SEMANTIC_LAYER_HARD_BANS = exports.SEMANTIC_LAYER_COMPOSE_COMPILE_URI = exports.SEMANTIC_LAYER_EXPLORE_URI = exports.SEMANTIC_LAYER_CORE_URI = void 0;
6
+ exports.SEMANTIC_LAYER_TOPIC_META = exports.SEMANTIC_LAYER_TOPIC_PLAYBOOKS = exports.SEMANTIC_LAYER_CORE_PLAYBOOK = exports.getAllPlaybookMarkdown = exports.SEMANTIC_LAYER_HARD_BANS = void 0;
7
7
  exports.registerSemanticLayerPlaybook = registerSemanticLayerPlaybook;
8
8
  const playbook_resources_js_1 = require("../../../lib/playbook-resources.js");
9
9
  const playbooks = (0, playbook_resources_js_1.defineProfilePlaybooks)({
10
10
  profileId: 'semantic-layer',
11
11
  moduleDir: __dirname,
12
- /** Shared hard-ban text for prompts (keep in sync with playbooks/core.md Hard bans section). */
13
- hardBans: 'Do not run metric/SQL/chart queries, use SQL runner, trigger validation jobs, mutate content, switch away from the given projectUuid, invent fieldIds, dump full explore/metric/lineage payloads, or call AI/identity tools. Those are not available on this server.',
14
12
  coreDescription: 'Hard bans, budgets, allowed tools, project scope, and stop criteria',
15
13
  topics: [
16
14
  {
@@ -18,22 +16,25 @@ const playbooks = (0, playbook_resources_js_1.defineProfilePlaybooks)({
18
16
  title: 'Semantic-layer explore playbook',
19
17
  description: 'Explore discovery, disambiguation, and field shortlisting',
20
18
  file: 'explore.md',
19
+ useWhen: 'Discovering explores, metrics, and dimensions for a question',
20
+ priority: 0.8,
21
21
  },
22
22
  {
23
23
  id: 'compose-compile',
24
24
  title: 'Semantic-layer compose/compile playbook',
25
25
  description: 'Compose metric queries and compile without warehouse execution',
26
26
  file: 'compose-compile.md',
27
+ useWhen: 'Composing or debugging a metric query compile',
28
+ priority: 0.75,
27
29
  },
28
30
  ],
29
31
  });
30
- exports.SEMANTIC_LAYER_CORE_URI = playbooks.URIs.core;
31
- exports.SEMANTIC_LAYER_EXPLORE_URI = playbooks.URIs.topics.explore;
32
- exports.SEMANTIC_LAYER_COMPOSE_COMPILE_URI = playbooks.URIs.topics['compose-compile'];
33
- exports.SEMANTIC_LAYER_HARD_BANS = playbooks.HARD_BANS;
32
+ var invariants_js_1 = require("../invariants.js");
33
+ Object.defineProperty(exports, "SEMANTIC_LAYER_HARD_BANS", { enumerable: true, get: function () { return invariants_js_1.SEMANTIC_LAYER_HARD_BANS; } });
34
34
  exports.getAllPlaybookMarkdown = playbooks.getAllPlaybookMarkdown;
35
35
  exports.SEMANTIC_LAYER_CORE_PLAYBOOK = playbooks.CORE_PLAYBOOK;
36
36
  exports.SEMANTIC_LAYER_TOPIC_PLAYBOOKS = playbooks.TOPIC_PLAYBOOKS;
37
+ exports.SEMANTIC_LAYER_TOPIC_META = playbooks.TOPIC_META;
37
38
  function registerSemanticLayerPlaybook(server) {
38
39
  playbooks.registerPlaybooks(server);
39
40
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cross-profile prompt-context budget gates (deterministic; RFC).
3
+ * Specs come from production builders — not abbreviated stubs.
4
+ */
5
+ export {};