@nextblock-cms/cortex 0.20.3 → 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.
Files changed (71) hide show
  1. package/client.cjs.js +1 -1
  2. package/client.es.js +3 -7
  3. package/index.cjs.js +1 -1
  4. package/index.es.js +24 -277
  5. package/lib/ai-block-generation.cjs.js +3 -4
  6. package/lib/ai-block-generation.es.js +143 -182
  7. package/lib/ai-client.cjs.js +1 -1
  8. package/lib/ai-client.d.ts +1 -1
  9. package/lib/ai-client.es.js +101 -135
  10. package/lib/ai-config.cjs.js +1 -1
  11. package/lib/ai-config.es.js +89 -108
  12. package/lib/ai-cortex-widget-builder.cjs.js +1 -1
  13. package/lib/ai-cortex-widget-builder.es.js +56 -70
  14. package/lib/ai-global-agent-content-ops-tools.cjs.js +1 -1
  15. package/lib/ai-global-agent-content-ops-tools.d.ts +1943 -68
  16. package/lib/ai-global-agent-content-ops-tools.es.js +185 -199
  17. package/lib/ai-global-agent-custom-block-tools.cjs.js +1 -1
  18. package/lib/ai-global-agent-custom-block-tools.d.ts +2160 -95
  19. package/lib/ai-global-agent-custom-block-tools.es.js +226 -223
  20. package/lib/ai-global-agent-db-tools.cjs.js +1 -1
  21. package/lib/ai-global-agent-db-tools.d.ts +2708 -98
  22. package/lib/ai-global-agent-db-tools.es.js +1013 -986
  23. package/lib/ai-global-agent-ecommerce.cjs.js +1 -1
  24. package/lib/ai-global-agent-ecommerce.es.js +3 -7
  25. package/lib/ai-global-agent-site-tools.cjs.js +2 -3
  26. package/lib/ai-global-agent-site-tools.d.ts +10695 -500
  27. package/lib/ai-global-agent-site-tools.es.js +750 -757
  28. package/lib/ai-global-agent-theming-tools.cjs.js +1 -3
  29. package/lib/ai-global-agent-theming-tools.d.ts +2905 -105
  30. package/lib/ai-global-agent-theming-tools.es.js +326 -396
  31. package/lib/ai-global-agent-tools.cjs.js +2 -2
  32. package/lib/ai-global-agent-tools.d.ts +4 -2230
  33. package/lib/ai-global-agent-tools.es.js +3899 -4328
  34. package/lib/ai-key-crypto.cjs.js +1 -1
  35. package/lib/ai-key-crypto.es.js +63 -82
  36. package/lib/ai-key-verification.cjs.js +1 -1
  37. package/lib/ai-key-verification.es.js +74 -63
  38. package/lib/ai-model-catalog.cjs.js +1 -1
  39. package/lib/ai-model-catalog.es.js +18 -22
  40. package/lib/ai-model-registry.cjs.js +2 -2
  41. package/lib/ai-model-registry.es.js +246 -309
  42. package/lib/ai-seo-metadata.cjs.js +2 -3
  43. package/lib/ai-seo-metadata.es.js +143 -185
  44. package/lib/ai-vision.cjs.js +2 -2
  45. package/lib/ai-vision.d.ts +6 -6
  46. package/lib/ai-vision.es.js +161 -215
  47. package/lib/block-content-schemas.cjs.js +1 -1
  48. package/lib/block-content-schemas.es.js +324 -254
  49. package/lib/cortex-widget-registry.cjs.js +1 -1
  50. package/lib/cortex-widget-registry.es.js +35 -43
  51. package/lib/cortex-widget-schema.cjs.js +2 -3
  52. package/lib/cortex-widget-schema.es.js +280 -309
  53. package/lib/editor-document-from-html.cjs.js +1 -1
  54. package/lib/editor-document-from-html.es.js +334 -278
  55. package/lib/fetch-host-guard.cjs.js +1 -0
  56. package/lib/fetch-host-guard.d.ts +2 -0
  57. package/lib/fetch-host-guard.es.js +30 -0
  58. package/lib/mcp-server.cjs.js +1 -1
  59. package/lib/mcp-server.es.js +155 -173
  60. package/lib/mcp-tokens.cjs.js +1 -1
  61. package/lib/mcp-tokens.es.js +95 -107
  62. package/lib/mcp-tool-registry.cjs.js +5 -6
  63. package/lib/mcp-tool-registry.es.js +533 -411
  64. package/lib/site-brief.cjs.js +2 -2
  65. package/lib/site-brief.es.js +102 -108
  66. package/lib/vision-image-download.cjs.js +1 -0
  67. package/lib/vision-image-download.d.ts +43 -0
  68. package/lib/vision-image-download.es.js +120 -0
  69. package/lib/zod-config.cjs.js +1 -1
  70. package/lib/zod-config.es.js +5 -6
  71. package/package.json +8 -8
@@ -1,430 +1,552 @@
1
- import { createCortexGlobalAgentTools as y } from "./ai-global-agent-tools.es.js";
2
- import { availableCortexAiBlockTypes as v } from "./block-content-schemas.es.js";
3
- import "./zod-config.es.js";
4
- import { z as w } from "zod";
5
- const s = {
6
- create_cms_page: "write",
7
- create_cms_post: "write",
8
- create_cms_product: "write",
9
- create_custom_block: "write",
10
- delete_cms_item: "write",
11
- delete_custom_block: "write",
12
- describe_database_schema: "read",
13
- execute_cms_action_plan: "write",
14
- execute_database_action_plan: "write",
15
- execute_database_mutation: "write",
16
- fetch_ecommerce_stats: "read",
17
- fetch_url_content: "read",
18
- finish_site_build: "write",
19
- get_site_overview: "read",
20
- insert_content_block: "write",
21
- list_custom_blocks: "read",
22
- list_media: "read",
23
- list_product_categories: "read",
24
- list_site_script_revisions: "read",
25
- list_site_scripts: "read",
26
- list_site_themes: "read",
27
- manage_language: "write",
28
- manage_product_category: "write",
29
- manage_product_variants: "write",
30
- manage_site_script: "write",
31
- manage_site_theme: "write",
32
- prepare_delete_cms_item: "read",
33
- publish_content_draft: "write",
34
- read_current_cms_item: "read",
35
- read_database_records: "read",
36
- reset_site_content: "write",
37
- revert_site_script: "write",
38
- rewrite_page_draft: "write",
39
- save_site_brief: "write",
40
- search_documentation: "read",
41
- search_stock_photos: "read",
42
- set_content_images: "write",
43
- start_site_build: "write",
44
- translate_content_bulk: "write",
45
- translate_page: "write",
46
- update_cms_item_field: "write",
47
- upload_media: "write",
48
- update_content_block: "write",
49
- update_current_cms_fields: "write",
50
- update_custom_block: "write",
51
- update_footer: "write",
52
- update_global_css: "write",
53
- update_navigation_bar: "write",
54
- update_section_column_block: "write",
55
- update_site_identity: "write"
56
- }, k = {
57
- create_cms_page: { destructive: !1, idempotent: !0, openWorld: !0 },
58
- create_cms_post: { destructive: !1, idempotent: !0, openWorld: !0 },
59
- create_cms_product: { destructive: !1, idempotent: !0, openWorld: !0 },
60
- create_custom_block: { destructive: !1, idempotent: !1, openWorld: !1 },
61
- delete_cms_item: { destructive: !0, idempotent: !0, openWorld: !1 },
62
- delete_custom_block: { destructive: !0, idempotent: !0, openWorld: !1 },
63
- // A plan can carry delete_cms_item, insert_content_block and set_content_images, so it
64
- // inherits the worst of each.
65
- execute_cms_action_plan: { destructive: !0, idempotent: !1, openWorld: !0 },
66
- execute_database_action_plan: { destructive: !0, idempotent: !1, openWorld: !1 },
67
- execute_database_mutation: { destructive: !0, idempotent: !1, openWorld: !1 },
68
- finish_site_build: { destructive: !1, idempotent: !0, openWorld: !1 },
69
- insert_content_block: { destructive: !1, idempotent: !1, openWorld: !1 },
70
- manage_language: { destructive: !1, idempotent: !0, openWorld: !1 },
71
- manage_product_category: { destructive: !0, idempotent: !0, openWorld: !1 },
72
- manage_product_variants: { destructive: !0, idempotent: !1, openWorld: !1 },
73
- manage_site_script: { destructive: !0, idempotent: !0, openWorld: !1 },
74
- manage_site_theme: { destructive: !1, idempotent: !0, openWorld: !1 },
75
- // Overwrites the live blocks, but snapshots a revision first and consumes the draft,
76
- // so a second call finds nothing to publish.
77
- publish_content_draft: { destructive: !1, idempotent: !0, openWorld: !1 },
78
- reset_site_content: { destructive: !0, idempotent: !0, openWorld: !1 },
79
- // Logged as a new revision; the rollback can itself be rolled back.
80
- revert_site_script: { destructive: !1, idempotent: !0, openWorld: !1 },
81
- rewrite_page_draft: { destructive: !1, idempotent: !0, openWorld: !1 },
82
- save_site_brief: { destructive: !0, idempotent: !0, openWorld: !1 },
83
- set_content_images: { destructive: !0, idempotent: !1, openWorld: !0 },
84
- // Runs the reset, and each call (re)opens the time-boxed build session.
85
- start_site_build: { destructive: !0, idempotent: !1, openWorld: !1 },
86
- translate_content_bulk: { destructive: !1, idempotent: !0, openWorld: !1 },
87
- translate_page: { destructive: !1, idempotent: !0, openWorld: !1 },
88
- update_cms_item_field: { destructive: !1, idempotent: !0, openWorld: !1 },
89
- upload_media: { destructive: !1, idempotent: !1, openWorld: !0 },
90
- update_content_block: { destructive: !1, idempotent: !0, openWorld: !1 },
91
- update_current_cms_fields: { destructive: !1, idempotent: !0, openWorld: !1 },
92
- // Regenerates the whole definition from a description; nothing keeps the old layout.
93
- update_custom_block: { destructive: !0, idempotent: !1, openWorld: !1 },
94
- update_footer: { destructive: !0, idempotent: !0, openWorld: !1 },
95
- update_global_css: { destructive: !0, idempotent: !1, openWorld: !1 },
96
- update_navigation_bar: { destructive: !0, idempotent: !0, openWorld: !1 },
97
- update_section_column_block: { destructive: !1, idempotent: !0, openWorld: !1 },
98
- update_site_identity: { destructive: !1, idempotent: !0, openWorld: !1 }
99
- }, x = /* @__PURE__ */ new Set([
100
- "fetch_url_content",
101
- "search_stock_photos"
102
- ]), d = {
103
- create_page_layout: {
104
- canonical: "create_cms_page",
105
- description: 'Create a new page from a slug, a title and a strictly typed block layout in one call. Every block is normalized and validated against the NextBlock block schema (built-in types from the `cortex://schema/blocks` resource, or a custom block slug from `list_custom_blocks`) before anything is written; an invalid block rejects the whole call. Pass `status: "published"` to go live immediately, or leave the default draft and publish later. To rewrite an existing page instead, use `generate_jsonb_layout`. Alias of `create_cms_page`.',
106
- title: "Create page layout"
107
- },
108
- generate_jsonb_layout: {
109
- canonical: "rewrite_page_draft",
110
- description: "Generate a complete, strictly-validated JSONB block layout and write it into a target page or post. Blocks are normalized and validated against the NextBlock block schema, then staged as a Live Draft on the target record — nothing goes live until an editor publishes the draft, and publishing snapshots a revision so the change is reversible. Use for whole-page builds and redesigns. Alias of `rewrite_page_draft`.",
111
- title: "Generate JSONB layout"
112
- },
113
- get_database_schema: {
114
- canonical: "describe_database_schema",
115
- description: "Return the current CMS database structure: every table Cortex AI may read or mutate, its columns, primary keys, and whether it is read-only. Pair with `list_custom_blocks` for the active data-defined block definitions and with the `cortex://schema/blocks` resource for the built-in block types. Read-only. Alias of `describe_database_schema`.",
116
- title: "Get database schema"
117
- },
118
- query_site_analytics: {
119
- canonical: "fetch_ecommerce_stats",
120
- description: "Query quantitative site analytics: revenue, order counts, order-status breakdowns, and top-selling products over a time range. Read-only. For inventory levels and post/page metrics that this report does not cover, use `read_database_records` against the `products`, `product_variants`, `posts`, or `pages` tables. Alias of `fetch_ecommerce_stats`.",
121
- title: "Query site analytics"
122
- },
123
- search_stock_media: {
124
- canonical: "search_stock_photos",
125
- description: "Search free stock media (Pexels, then Unsplash) for contextually relevant imagery, returning direct image URLs with dimensions, alt text, and photographer attribution. Drop a returned `url` straight into an image block's `external_url` or a section background. Read-only and zero cost. Requires a stock provider key in CMS Settings → Cortex AI. Alias of `search_stock_photos`.",
126
- title: "Search stock media"
127
- },
128
- update_site_navigation: {
129
- canonical: "update_navigation_bar",
130
- description: 'Alter the public site navigation: header menu items and their nested child hierarchy, per locale. Use mode "append" to add links while preserving the existing menu, "update" to rename or re-point one link, and "replace" only when rebuilding the whole menu. For footer links and copyright use `update_footer`. Alias of `update_navigation_bar`.',
131
- title: "Update site navigation"
132
- }
1
+ import { z as e } from "./zod-config.es.js";
2
+ import { availableCortexAiBlockTypes as t } from "./block-content-schemas.es.js";
3
+ import { createCortexGlobalAgentTools as n } from "./ai-global-agent-tools.es.js";
4
+ //#region libs/cortex/src/lib/mcp-tool-registry.ts
5
+ var r = {
6
+ create_cms_page: "write",
7
+ create_cms_post: "write",
8
+ create_cms_product: "write",
9
+ create_custom_block: "write",
10
+ delete_cms_item: "write",
11
+ delete_custom_block: "write",
12
+ describe_database_schema: "read",
13
+ execute_cms_action_plan: "write",
14
+ execute_database_action_plan: "write",
15
+ execute_database_mutation: "write",
16
+ fetch_ecommerce_stats: "read",
17
+ fetch_url_content: "read",
18
+ finish_site_build: "write",
19
+ get_site_overview: "read",
20
+ insert_content_block: "write",
21
+ list_custom_blocks: "read",
22
+ list_media: "read",
23
+ list_product_categories: "read",
24
+ list_site_script_revisions: "read",
25
+ list_site_scripts: "read",
26
+ list_site_themes: "read",
27
+ manage_language: "write",
28
+ manage_product_category: "write",
29
+ manage_product_variants: "write",
30
+ manage_site_script: "write",
31
+ manage_site_theme: "write",
32
+ prepare_delete_cms_item: "read",
33
+ publish_content_draft: "write",
34
+ read_current_cms_item: "read",
35
+ read_database_records: "read",
36
+ reset_site_content: "write",
37
+ revert_site_script: "write",
38
+ rewrite_page_draft: "write",
39
+ save_site_brief: "write",
40
+ search_documentation: "read",
41
+ search_stock_photos: "read",
42
+ set_content_images: "write",
43
+ start_site_build: "write",
44
+ translate_content_bulk: "write",
45
+ translate_page: "write",
46
+ update_cms_item_field: "write",
47
+ upload_media: "write",
48
+ update_content_block: "write",
49
+ update_current_cms_fields: "write",
50
+ update_custom_block: "write",
51
+ update_footer: "write",
52
+ update_global_css: "write",
53
+ update_navigation_bar: "write",
54
+ update_section_column_block: "write",
55
+ update_site_identity: "write"
56
+ }, i = {
57
+ create_cms_page: {
58
+ destructive: !1,
59
+ idempotent: !0,
60
+ openWorld: !0
61
+ },
62
+ create_cms_post: {
63
+ destructive: !1,
64
+ idempotent: !0,
65
+ openWorld: !0
66
+ },
67
+ create_cms_product: {
68
+ destructive: !1,
69
+ idempotent: !0,
70
+ openWorld: !0
71
+ },
72
+ create_custom_block: {
73
+ destructive: !1,
74
+ idempotent: !1,
75
+ openWorld: !1
76
+ },
77
+ delete_cms_item: {
78
+ destructive: !0,
79
+ idempotent: !0,
80
+ openWorld: !1
81
+ },
82
+ delete_custom_block: {
83
+ destructive: !0,
84
+ idempotent: !0,
85
+ openWorld: !1
86
+ },
87
+ execute_cms_action_plan: {
88
+ destructive: !0,
89
+ idempotent: !1,
90
+ openWorld: !0
91
+ },
92
+ execute_database_action_plan: {
93
+ destructive: !0,
94
+ idempotent: !1,
95
+ openWorld: !1
96
+ },
97
+ execute_database_mutation: {
98
+ destructive: !0,
99
+ idempotent: !1,
100
+ openWorld: !1
101
+ },
102
+ finish_site_build: {
103
+ destructive: !1,
104
+ idempotent: !0,
105
+ openWorld: !1
106
+ },
107
+ insert_content_block: {
108
+ destructive: !1,
109
+ idempotent: !1,
110
+ openWorld: !1
111
+ },
112
+ manage_language: {
113
+ destructive: !1,
114
+ idempotent: !0,
115
+ openWorld: !1
116
+ },
117
+ manage_product_category: {
118
+ destructive: !0,
119
+ idempotent: !0,
120
+ openWorld: !1
121
+ },
122
+ manage_product_variants: {
123
+ destructive: !0,
124
+ idempotent: !1,
125
+ openWorld: !1
126
+ },
127
+ manage_site_script: {
128
+ destructive: !0,
129
+ idempotent: !0,
130
+ openWorld: !1
131
+ },
132
+ manage_site_theme: {
133
+ destructive: !1,
134
+ idempotent: !0,
135
+ openWorld: !1
136
+ },
137
+ publish_content_draft: {
138
+ destructive: !1,
139
+ idempotent: !0,
140
+ openWorld: !1
141
+ },
142
+ reset_site_content: {
143
+ destructive: !0,
144
+ idempotent: !0,
145
+ openWorld: !1
146
+ },
147
+ revert_site_script: {
148
+ destructive: !1,
149
+ idempotent: !0,
150
+ openWorld: !1
151
+ },
152
+ rewrite_page_draft: {
153
+ destructive: !1,
154
+ idempotent: !0,
155
+ openWorld: !1
156
+ },
157
+ save_site_brief: {
158
+ destructive: !0,
159
+ idempotent: !0,
160
+ openWorld: !1
161
+ },
162
+ set_content_images: {
163
+ destructive: !0,
164
+ idempotent: !1,
165
+ openWorld: !0
166
+ },
167
+ start_site_build: {
168
+ destructive: !0,
169
+ idempotent: !1,
170
+ openWorld: !1
171
+ },
172
+ translate_content_bulk: {
173
+ destructive: !1,
174
+ idempotent: !0,
175
+ openWorld: !1
176
+ },
177
+ translate_page: {
178
+ destructive: !1,
179
+ idempotent: !0,
180
+ openWorld: !1
181
+ },
182
+ update_cms_item_field: {
183
+ destructive: !1,
184
+ idempotent: !0,
185
+ openWorld: !1
186
+ },
187
+ upload_media: {
188
+ destructive: !1,
189
+ idempotent: !1,
190
+ openWorld: !0
191
+ },
192
+ update_content_block: {
193
+ destructive: !1,
194
+ idempotent: !0,
195
+ openWorld: !1
196
+ },
197
+ update_current_cms_fields: {
198
+ destructive: !1,
199
+ idempotent: !0,
200
+ openWorld: !1
201
+ },
202
+ update_custom_block: {
203
+ destructive: !0,
204
+ idempotent: !1,
205
+ openWorld: !1
206
+ },
207
+ update_footer: {
208
+ destructive: !0,
209
+ idempotent: !0,
210
+ openWorld: !1
211
+ },
212
+ update_global_css: {
213
+ destructive: !0,
214
+ idempotent: !1,
215
+ openWorld: !1
216
+ },
217
+ update_navigation_bar: {
218
+ destructive: !0,
219
+ idempotent: !0,
220
+ openWorld: !1
221
+ },
222
+ update_section_column_block: {
223
+ destructive: !1,
224
+ idempotent: !0,
225
+ openWorld: !1
226
+ },
227
+ update_site_identity: {
228
+ destructive: !1,
229
+ idempotent: !0,
230
+ openWorld: !1
231
+ }
232
+ }, a = /* @__PURE__ */ new Set(["fetch_url_content", "search_stock_photos"]), o = {
233
+ create_page_layout: {
234
+ canonical: "create_cms_page",
235
+ description: "Create a new page from a slug, a title and a strictly typed block layout in one call. Every block is normalized and validated against the NextBlock block schema (built-in types from the `cortex://schema/blocks` resource, or a custom block slug from `list_custom_blocks`) before anything is written; an invalid block rejects the whole call. Pass `status: \"published\"` to go live immediately, or leave the default draft and publish later. To rewrite an existing page instead, use `generate_jsonb_layout`. Alias of `create_cms_page`.",
236
+ title: "Create page layout"
237
+ },
238
+ generate_jsonb_layout: {
239
+ canonical: "rewrite_page_draft",
240
+ description: "Generate a complete, strictly-validated JSONB block layout and write it into a target page or post. Blocks are normalized and validated against the NextBlock block schema, then staged as a Live Draft on the target record — nothing goes live until an editor publishes the draft, and publishing snapshots a revision so the change is reversible. Use for whole-page builds and redesigns. Alias of `rewrite_page_draft`.",
241
+ title: "Generate JSONB layout"
242
+ },
243
+ get_database_schema: {
244
+ canonical: "describe_database_schema",
245
+ description: "Return the current CMS database structure: every table Cortex AI may read or mutate, its columns, primary keys, and whether it is read-only. Pair with `list_custom_blocks` for the active data-defined block definitions and with the `cortex://schema/blocks` resource for the built-in block types. Read-only. Alias of `describe_database_schema`.",
246
+ title: "Get database schema"
247
+ },
248
+ query_site_analytics: {
249
+ canonical: "fetch_ecommerce_stats",
250
+ description: "Query quantitative site analytics: revenue, order counts, order-status breakdowns, and top-selling products over a time range. Read-only. For inventory levels and post/page metrics that this report does not cover, use `read_database_records` against the `products`, `product_variants`, `posts`, or `pages` tables. Alias of `fetch_ecommerce_stats`.",
251
+ title: "Query site analytics"
252
+ },
253
+ search_stock_media: {
254
+ canonical: "search_stock_photos",
255
+ description: "Search free stock media (Pexels, then Unsplash) for contextually relevant imagery, returning direct image URLs with dimensions, alt text, and photographer attribution. Drop a returned `url` straight into an image block's `external_url` or a section background. Read-only and zero cost. Requires a stock provider key in CMS Settings → Cortex AI. Alias of `search_stock_photos`.",
256
+ title: "Search stock media"
257
+ },
258
+ update_site_navigation: {
259
+ canonical: "update_navigation_bar",
260
+ description: "Alter the public site navigation: header menu items and their nested child hierarchy, per locale. Use mode \"append\" to add links while preserving the existing menu, \"update\" to rename or re-point one link, and \"replace\" only when rebuilding the whole menu. For footer links and copyright use `update_footer`. Alias of `update_navigation_bar`.",
261
+ title: "Update site navigation"
262
+ }
133
263
  };
134
- function p(e) {
135
- return e in d ? d[e].canonical : e in s ? e : null;
264
+ function s(e) {
265
+ return e in o ? o[e].canonical : e in r ? e : null;
136
266
  }
137
- function C(e) {
138
- const t = p(e);
139
- return t ? s[t] : null;
267
+ function c(e) {
268
+ let t = s(e);
269
+ return t ? r[t] : null;
140
270
  }
141
- function _(e) {
142
- const t = p(e);
143
- if (!t)
144
- return null;
145
- if (s[t] === "read")
146
- return {
147
- destructiveHint: !1,
148
- idempotentHint: !0,
149
- openWorldHint: x.has(t),
150
- readOnlyHint: !0
151
- };
152
- const a = k[t];
153
- return {
154
- destructiveHint: a.destructive,
155
- idempotentHint: a.idempotent,
156
- openWorldHint: a.openWorld,
157
- readOnlyHint: !1
158
- };
271
+ function l(e) {
272
+ let t = s(e);
273
+ if (!t) return null;
274
+ if (r[t] === "read") return {
275
+ destructiveHint: !1,
276
+ idempotentHint: !0,
277
+ openWorldHint: a.has(t),
278
+ readOnlyHint: !0
279
+ };
280
+ let n = i[t];
281
+ return {
282
+ destructiveHint: n.destructive,
283
+ idempotentHint: n.idempotent,
284
+ openWorldHint: n.openWorld,
285
+ readOnlyHint: !1
286
+ };
159
287
  }
160
288
  function u(e, t) {
161
- const a = C(t);
162
- return a ? a === "read" ? e.length > 0 : e.includes("write") : !1;
289
+ let n = c(t);
290
+ return n ? n === "read" ? e.length > 0 : e.includes("write") : !1;
163
291
  }
164
- function m(e) {
165
- return e.split("_").map((a, r) => r === 0 ? a.charAt(0).toUpperCase() + a.slice(1) : a).join(" ");
292
+ function d(e) {
293
+ return e.split("_").map((e, t) => t === 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" ");
166
294
  }
167
- function h(e) {
168
- const t = { additionalProperties: !1, type: "object" };
169
- if (!e || typeof e != "object")
170
- return t;
171
- try {
172
- const a = w.toJSONSchema(e, {
173
- cycles: "ref",
174
- io: "input",
175
- reused: "inline",
176
- target: "draft-2020-12",
177
- unrepresentable: "any"
178
- });
179
- return delete a.$schema, a.type === "object" ? a : t;
180
- } catch {
181
- return t;
182
- }
295
+ function f(t) {
296
+ let n = {
297
+ additionalProperties: !1,
298
+ type: "object"
299
+ };
300
+ if (!t || typeof t != "object") return n;
301
+ try {
302
+ let r = e.toJSONSchema(t, {
303
+ cycles: "ref",
304
+ io: "input",
305
+ reused: "inline",
306
+ target: "draft-2020-12",
307
+ unrepresentable: "any"
308
+ });
309
+ return delete r.$schema, r.type === "object" ? r : n;
310
+ } catch {
311
+ return n;
312
+ }
183
313
  }
184
- function c(e) {
185
- return y(e);
314
+ function p(e) {
315
+ return n(e);
186
316
  }
187
- function N(e) {
188
- const t = Object.keys(c(e)), a = Object.keys(s);
189
- return {
190
- missingFromRegistry: a.filter((r) => !t.includes(r)),
191
- unclassified: t.filter((r) => !a.includes(r))
192
- };
317
+ function m(e) {
318
+ let t = Object.keys(p(e)), n = Object.keys(r);
319
+ return {
320
+ missingFromRegistry: n.filter((e) => !t.includes(e)),
321
+ unclassified: t.filter((e) => !n.includes(e))
322
+ };
193
323
  }
194
- function E(e) {
195
- const t = c(e.context), a = [];
196
- for (const [r, i] of Object.entries(t)) {
197
- if (!(r in s) || !u(e.scopes, r))
198
- continue;
199
- const o = _(r);
200
- o && a.push({
201
- annotations: o,
202
- description: i.description ?? `Cortex AI ${m(r)} tool.`,
203
- inputSchema: h(i.inputSchema),
204
- name: r,
205
- title: m(r)
206
- });
207
- }
208
- for (const [r, i] of Object.entries(d)) {
209
- const o = t[i.canonical];
210
- if (!o || !u(e.scopes, r))
211
- continue;
212
- const n = _(r);
213
- n && a.push({
214
- annotations: n,
215
- description: i.description,
216
- inputSchema: h(o.inputSchema),
217
- name: r,
218
- title: i.title
219
- });
220
- }
221
- return a.sort((r, i) => r.name.localeCompare(i.name));
324
+ function h(e) {
325
+ let t = p(e.context), n = [];
326
+ for (let [i, a] of Object.entries(t)) {
327
+ if (!(i in r) || !u(e.scopes, i)) continue;
328
+ let t = l(i);
329
+ t && n.push({
330
+ annotations: t,
331
+ description: a.description ?? `Cortex AI ${d(i)} tool.`,
332
+ inputSchema: f(a.inputSchema),
333
+ name: i,
334
+ title: d(i)
335
+ });
336
+ }
337
+ for (let [r, i] of Object.entries(o)) {
338
+ let a = t[i.canonical];
339
+ if (!a || !u(e.scopes, r)) continue;
340
+ let o = l(r);
341
+ o && n.push({
342
+ annotations: o,
343
+ description: i.description,
344
+ inputSchema: f(a.inputSchema),
345
+ name: r,
346
+ title: i.title
347
+ });
348
+ }
349
+ return n.sort((e, t) => e.name.localeCompare(t.name));
222
350
  }
223
351
  function g(e, t) {
224
- return { content: [{ text: e, type: "text" }], isError: t };
225
- }
226
- function W(e) {
227
- return e.issues.map((t) => `${t.path.length > 0 ? t.path.join(".") : "(root)"}: ${t.message}`).join("; ");
228
- }
229
- class f extends Error {
230
- constructor(t) {
231
- super(`Unknown tool: ${t}`), this.name = "CortexMcpUnknownToolError";
232
- }
352
+ return {
353
+ content: [{
354
+ text: e,
355
+ type: "text"
356
+ }],
357
+ isError: t
358
+ };
233
359
  }
234
- class T extends Error {
235
- constructor(t) {
236
- super(
237
- `Tool "${t}" requires the "write" scope. This MCP token is read-only — mint a read+write token in CMS Settings → Cortex AI.`
238
- ), this.name = "CortexMcpForbiddenToolError";
239
- }
360
+ function _(e) {
361
+ return e.issues.map((e) => `${e.path.length > 0 ? e.path.join(".") : "(root)"}: ${e.message}`).join("; ");
240
362
  }
241
- async function A(e) {
242
- const t = p(e.name);
243
- if (!t)
244
- throw new f(e.name);
245
- if (!u(e.scopes, e.name))
246
- throw new T(e.name);
247
- const r = c(e.context)[t];
248
- if (!r || typeof r.execute != "function")
249
- throw new f(e.name);
250
- const i = e.args && typeof e.args == "object" ? e.args : {};
251
- if (r.inputSchema && typeof r.inputSchema.safeParse == "function") {
252
- const o = r.inputSchema.safeParse(i);
253
- if (!o.success)
254
- return g(
255
- `Invalid arguments for "${e.name}": ${W(o.error)}`,
256
- !0
257
- );
258
- }
259
- try {
260
- const o = await r.execute(i), n = JSON.stringify(o ?? { success: !0 }, null, 2), l = o && typeof o == "object" && !Array.isArray(o) ? o : null, b = l?.success === !1;
261
- return {
262
- content: [{ text: n, type: "text" }],
263
- isError: b,
264
- ...l ? { structuredContent: l } : {}
265
- };
266
- } catch (o) {
267
- const n = o instanceof Error ? o.message : String(o);
268
- return g(`Tool "${e.name}" failed: ${n}`, !0);
269
- }
363
+ var v = class extends Error {
364
+ constructor(e) {
365
+ super(`Unknown tool: ${e}`), this.name = "CortexMcpUnknownToolError";
366
+ }
367
+ }, y = class extends Error {
368
+ constructor(e) {
369
+ super(`Tool "${e}" requires the "write" scope. This MCP token is read-only — mint a read+write token in CMS Settings → Cortex AI.`), this.name = "CortexMcpForbiddenToolError";
370
+ }
371
+ };
372
+ async function b(e) {
373
+ let t = s(e.name);
374
+ if (!t) throw new v(e.name);
375
+ if (!u(e.scopes, e.name)) throw new y(e.name);
376
+ let n = p(e.context)[t];
377
+ if (!n || typeof n.execute != "function") throw new v(e.name);
378
+ let r = e.args && typeof e.args == "object" ? e.args : {};
379
+ if (n.inputSchema && typeof n.inputSchema.safeParse == "function") {
380
+ let t = n.inputSchema.safeParse(r);
381
+ if (!t.success) return g(`Invalid arguments for "${e.name}": ${_(t.error)}`, !0);
382
+ }
383
+ try {
384
+ let e = await n.execute(r), t = JSON.stringify(e ?? { success: !0 }, null, 2), i = e && typeof e == "object" && !Array.isArray(e) ? e : null, a = i?.success === !1;
385
+ return {
386
+ content: [{
387
+ text: t,
388
+ type: "text"
389
+ }],
390
+ isError: a,
391
+ ...i ? { structuredContent: i } : {}
392
+ };
393
+ } catch (t) {
394
+ let n = t instanceof Error ? t.message : String(t);
395
+ return g(`Tool "${e.name}" failed: ${n}`, !0);
396
+ }
270
397
  }
271
- const P = [
272
- {
273
- description: "The CMS database structure Cortex AI can read and mutate: tables, columns, primary keys, and read-only flags.",
274
- mimeType: "application/json",
275
- name: "database-schema",
276
- title: "NextBlock database schema",
277
- uri: "cortex://schema/database"
278
- },
279
- {
280
- description: "The built-in NextBlock block types available when composing page, post, and product layouts.",
281
- mimeType: "application/json",
282
- name: "block-types",
283
- title: "NextBlock block types",
284
- uri: "cortex://schema/blocks"
285
- },
286
- {
287
- description: "Data-defined custom block definitions registered in this workspace, keyed by the slug used as a block instance `block_type`.",
288
- mimeType: "application/json",
289
- name: "custom-blocks",
290
- title: "NextBlock custom block definitions",
291
- uri: "cortex://schema/custom-blocks"
292
- }
398
+ var x = [
399
+ {
400
+ description: "The CMS database structure Cortex AI can read and mutate: tables, columns, primary keys, and read-only flags.",
401
+ mimeType: "application/json",
402
+ name: "database-schema",
403
+ title: "NextBlock database schema",
404
+ uri: "cortex://schema/database"
405
+ },
406
+ {
407
+ description: "The built-in NextBlock block types available when composing page, post, and product layouts.",
408
+ mimeType: "application/json",
409
+ name: "block-types",
410
+ title: "NextBlock block types",
411
+ uri: "cortex://schema/blocks"
412
+ },
413
+ {
414
+ description: "Data-defined custom block definitions registered in this workspace, keyed by the slug used as a block instance `block_type`.",
415
+ mimeType: "application/json",
416
+ name: "custom-blocks",
417
+ title: "NextBlock custom block definitions",
418
+ uri: "cortex://schema/custom-blocks"
419
+ }
293
420
  ];
294
- async function L(e) {
295
- const t = c(e.context);
296
- if (e.uri === "cortex://schema/database") {
297
- const a = await t.describe_database_schema?.execute?.({ includeReadOnly: !0 });
298
- return {
299
- mimeType: "application/json",
300
- text: JSON.stringify(a ?? {}, null, 2),
301
- uri: e.uri
302
- };
303
- }
304
- if (e.uri === "cortex://schema/blocks")
305
- return {
306
- mimeType: "application/json",
307
- text: JSON.stringify({ blockTypes: v }, null, 2),
308
- uri: e.uri
309
- };
310
- if (e.uri === "cortex://schema/custom-blocks") {
311
- const a = await t.list_custom_blocks?.execute?.({});
312
- return {
313
- mimeType: "application/json",
314
- text: JSON.stringify(a ?? {}, null, 2),
315
- uri: e.uri
316
- };
317
- }
318
- return null;
421
+ async function S(e) {
422
+ let n = p(e.context);
423
+ if (e.uri === "cortex://schema/database") {
424
+ let t = await n.describe_database_schema?.execute?.({ includeReadOnly: !0 });
425
+ return {
426
+ mimeType: "application/json",
427
+ text: JSON.stringify(t ?? {}, null, 2),
428
+ uri: e.uri
429
+ };
430
+ }
431
+ if (e.uri === "cortex://schema/blocks") return {
432
+ mimeType: "application/json",
433
+ text: JSON.stringify({ blockTypes: t }, null, 2),
434
+ uri: e.uri
435
+ };
436
+ if (e.uri === "cortex://schema/custom-blocks") {
437
+ let t = await n.list_custom_blocks?.execute?.({});
438
+ return {
439
+ mimeType: "application/json",
440
+ text: JSON.stringify(t ?? {}, null, 2),
441
+ uri: e.uri
442
+ };
443
+ }
444
+ return null;
319
445
  }
320
- const S = [
321
- {
322
- arguments: [
323
- {
324
- description: 'Everything known about the client and the site they want: business, audience, goals, pages (or "one landing page"), languages, brand, contact details. Leave blank to be asked.',
325
- name: "brief",
326
- required: !1
327
- }
328
- ],
329
- description: "Build (or rebuild) the whole NextBlock site from a brief: remove the sample content, set the identity and theme, create and publish every page, the menus, the footer, and the translations.",
330
- name: "build-site",
331
- title: "Build the whole site"
332
- },
333
- {
334
- arguments: [
335
- { description: "What the page is for, and any brand or tone notes.", name: "brief", required: !0 },
336
- { description: 'Slug of the page or post to rewrite, e.g. "home".', name: "slug", required: !0 }
337
- ],
338
- description: "Build or redesign a NextBlock page from a brief, following the section-based layout recipe, and stage it as a reviewable Live Draft.",
339
- name: "build-page",
340
- title: "Build a NextBlock page"
341
- },
342
- {
343
- arguments: [
344
- { description: "Source URL to draw structure and copy from.", name: "url", required: !0 },
345
- { description: "Slug of the page to write the result into.", name: "slug", required: !0 }
346
- ],
347
- description: "Read an external page and rebuild an equivalent NextBlock page from it, reusing its imagery where available.",
348
- name: "clone-from-url",
349
- title: "Rebuild a page from a URL"
350
- },
351
- {
352
- arguments: [
353
- { description: 'Target language code, e.g. "fr".', name: "languageCode", required: !0 },
354
- { description: "Slug of the page or post to translate.", name: "slug", required: !0 }
355
- ],
356
- description: "Translate an existing page or post into another language, preserving its layout and imagery.",
357
- name: "translate-content",
358
- title: "Translate a page or post"
359
- }
360
- ], O = {
361
- "build-site": (e) => [
362
- "Build the whole NextBlock site for this client.",
363
- "",
364
- e.brief?.trim() ? `Brief:
365
- ${e.brief}` : "A site brief may already be saved (get_site_overview returns it under `brief`): if it is, use it and skip the questions; otherwise ask, in one short numbered list, about the business and what it does, the audience and the one action visitors should take, the site shape (one landing page or which pages), the languages, brand colours and tone, contact details, and whether existing content is kept.",
366
- "",
367
- "Process:",
368
- "1. Call get_site_overview to see what exists, the active languages, and whether the NextBlock demo content is still present. Record what you know with save_site_brief.",
369
- "2. Present the plan (what is removed, every page with its sections, menus, footer, theme, languages) and call start_site_build with `summary`, `brief`, and `reset` (keepLanguages = the languages wanted) unless existing content is kept. Over MCP the host approves the call; there is no chat confirmation.",
370
- '3. Build: update_site_identity (title, description, keywords, copyright, and social_image for the share preview of pages without a feature image); manage_language as needed; manage_site_theme with the brand colours; search_stock_media for imagery when available; rewrite the empty "home" page with generate_jsonb_layout then publish_content_draft; create_cms_page (status "published") for every other page; update_site_navigation (mode "replace") and update_footer for every language; translate_content_bulk for each extra language.',
371
- "4. Call finish_site_build with a summary, then report every page with its URL.",
372
- "Write real copy from the brief, never placeholders. Every page must exist in every active language.",
373
- "Conventions: mark each page's opening section is_hero:true (priority image loading, centred content); slider:true with a slides array makes a rotating banner; NEVER set feature_image_id on the home page or on a page that opens with a hero section — on a page it renders a full-width title banner above the blocks — but give every post one."
374
- ].join(`
375
- `),
376
- "build-page": (e) => [
377
- `Build the NextBlock page with slug "${e.slug ?? "<slug>"}" from this brief:`,
378
- "",
379
- e.brief ?? "<brief>",
380
- "",
381
- "Process:",
382
- "1. Call get_database_schema and read_current_cms_item (or read_database_records on `pages`) to ground yourself in what exists.",
383
- '2. Compose the page from `section` blocks: one column entry per grid track, the first section a hero (is_hero:true), alternating none / theme:"muted" / theme:"primary" backgrounds for rhythm. Use discrete heading blocks rather than <h2> inside text HTML. Do not set feature_image_id on a page that opens with a hero: on a page it renders a full-width title banner above the blocks.',
384
- "3. Call search_stock_media for real photography; copy each photo's attribution fields onto the image block.",
385
- "4. Write the result with generate_jsonb_layout. It stages a Live Draft — tell the user to preview and publish it."
386
- ].join(`
387
- `),
388
- "clone-from-url": (e) => [
389
- `Rebuild the NextBlock page "${e.slug ?? "<slug>"}" based on ${e.url ?? "<url>"}.`,
390
- "",
391
- "Process:",
392
- "1. Call fetch_url_content on the URL first. Use its headings, text, and mainImage — never invent an image URL.",
393
- "2. Map the source structure onto NextBlock `section` blocks; do not copy its markup verbatim.",
394
- "3. Write the result with generate_jsonb_layout so it lands as a reviewable Live Draft."
395
- ].join(`
396
- `),
397
- "translate-content": (e) => [
398
- `Translate the page or post "${e.slug ?? "<slug>"}" into "${e.languageCode ?? "<languageCode>"}".`,
399
- "",
400
- "Use the translate_page tool: it copies layout, structure, and imagery automatically and links the copy to the original translation group. Supply only the text translations — every visible string, including headings, paragraph text, button labels, image alt text, and captions. Do not rebuild the layout and do not search for new imagery."
401
- ].join(`
402
- `)
446
+ var C = [
447
+ {
448
+ arguments: [{
449
+ description: "Everything known about the client and the site they want: business, audience, goals, pages (or \"one landing page\"), languages, brand, contact details. Leave blank to be asked.",
450
+ name: "brief",
451
+ required: !1
452
+ }],
453
+ description: "Build (or rebuild) the whole NextBlock site from a brief: remove the sample content, set the identity and theme, create and publish every page, the menus, the footer, and the translations.",
454
+ name: "build-site",
455
+ title: "Build the whole site"
456
+ },
457
+ {
458
+ arguments: [{
459
+ description: "What the page is for, and any brand or tone notes.",
460
+ name: "brief",
461
+ required: !0
462
+ }, {
463
+ description: "Slug of the page or post to rewrite, e.g. \"home\".",
464
+ name: "slug",
465
+ required: !0
466
+ }],
467
+ description: "Build or redesign a NextBlock page from a brief, following the section-based layout recipe, and stage it as a reviewable Live Draft.",
468
+ name: "build-page",
469
+ title: "Build a NextBlock page"
470
+ },
471
+ {
472
+ arguments: [{
473
+ description: "Source URL to draw structure and copy from.",
474
+ name: "url",
475
+ required: !0
476
+ }, {
477
+ description: "Slug of the page to write the result into.",
478
+ name: "slug",
479
+ required: !0
480
+ }],
481
+ description: "Read an external page and rebuild an equivalent NextBlock page from it, reusing its imagery where available.",
482
+ name: "clone-from-url",
483
+ title: "Rebuild a page from a URL"
484
+ },
485
+ {
486
+ arguments: [{
487
+ description: "Target language code, e.g. \"fr\".",
488
+ name: "languageCode",
489
+ required: !0
490
+ }, {
491
+ description: "Slug of the page or post to translate.",
492
+ name: "slug",
493
+ required: !0
494
+ }],
495
+ description: "Translate an existing page or post into another language, preserving its layout and imagery.",
496
+ name: "translate-content",
497
+ title: "Translate a page or post"
498
+ }
499
+ ], w = {
500
+ "build-site": (e) => [
501
+ "Build the whole NextBlock site for this client.",
502
+ "",
503
+ e.brief?.trim() ? `Brief:\n${e.brief}` : "A site brief may already be saved (get_site_overview returns it under `brief`): if it is, use it and skip the questions; otherwise ask, in one short numbered list, about the business and what it does, the audience and the one action visitors should take, the site shape (one landing page or which pages), the languages, brand colours and tone, contact details, and whether existing content is kept.",
504
+ "",
505
+ "Process:",
506
+ "1. Call get_site_overview to see what exists, the active languages, and whether the NextBlock demo content is still present. Record what you know with save_site_brief.",
507
+ "2. Present the plan (what is removed, every page with its sections, menus, footer, theme, languages) and call start_site_build with `summary`, `brief`, and `reset` (keepLanguages = the languages wanted) unless existing content is kept. Over MCP the host approves the call; there is no chat confirmation.",
508
+ "3. Build: update_site_identity (title, description, keywords, copyright, and social_image for the share preview of pages without a feature image); manage_language as needed; manage_site_theme with the brand colours; search_stock_media for imagery when available; rewrite the empty \"home\" page with generate_jsonb_layout then publish_content_draft; create_cms_page (status \"published\") for every other page; update_site_navigation (mode \"replace\") and update_footer for every language; translate_content_bulk for each extra language.",
509
+ "4. Call finish_site_build with a summary, then report every page with its URL.",
510
+ "Write real copy from the brief, never placeholders. Every page must exist in every active language.",
511
+ "Conventions: mark each page's opening section is_hero:true (priority image loading, centred content); slider:true with a slides array makes a rotating banner; NEVER set feature_image_id on the home page or on a page that opens with a hero section — on a page it renders a full-width title banner above the blocks — but give every post one."
512
+ ].join("\n"),
513
+ "build-page": (e) => [
514
+ `Build the NextBlock page with slug "${e.slug ?? "<slug>"}" from this brief:`,
515
+ "",
516
+ e.brief ?? "<brief>",
517
+ "",
518
+ "Process:",
519
+ "1. Call get_database_schema and read_current_cms_item (or read_database_records on `pages`) to ground yourself in what exists.",
520
+ "2. Compose the page from `section` blocks: one column entry per grid track, the first section a hero (is_hero:true), alternating none / theme:\"muted\" / theme:\"primary\" backgrounds for rhythm. Use discrete heading blocks rather than <h2> inside text HTML. Do not set feature_image_id on a page that opens with a hero: on a page it renders a full-width title banner above the blocks.",
521
+ "3. Call search_stock_media for real photography; copy each photo's attribution fields onto the image block.",
522
+ "4. Write the result with generate_jsonb_layout. It stages a Live Draft — tell the user to preview and publish it."
523
+ ].join("\n"),
524
+ "clone-from-url": (e) => [
525
+ `Rebuild the NextBlock page "${e.slug ?? "<slug>"}" based on ${e.url ?? "<url>"}.`,
526
+ "",
527
+ "Process:",
528
+ "1. Call fetch_url_content on the URL first. Use its headings, text, and mainImage — never invent an image URL.",
529
+ "2. Map the source structure onto NextBlock `section` blocks; do not copy its markup verbatim.",
530
+ "3. Write the result with generate_jsonb_layout so it lands as a reviewable Live Draft."
531
+ ].join("\n"),
532
+ "translate-content": (e) => [
533
+ `Translate the page or post "${e.slug ?? "<slug>"}" into "${e.languageCode ?? "<languageCode>"}".`,
534
+ "",
535
+ "Use the translate_page tool: it copies layout, structure, and imagery automatically and links the copy to the original translation group. Supply only the text translations — every visible string, including headings, paragraph text, button labels, image alt text, and captions. Do not rebuild the layout and do not search for new imagery."
536
+ ].join("\n")
403
537
  };
404
- function U(e) {
405
- const t = S.find((r) => r.name === e.name), a = O[e.name];
406
- return !t || !a ? null : {
407
- description: t.description,
408
- messages: [
409
- { content: { text: a(e.args ?? {}), type: "text" }, role: "user" }
410
- ]
411
- };
538
+ function T(e) {
539
+ let t = C.find((t) => t.name === e.name), n = w[e.name];
540
+ return !t || !n ? null : {
541
+ description: t.description,
542
+ messages: [{
543
+ content: {
544
+ text: n(e.args ?? {}),
545
+ type: "text"
546
+ },
547
+ role: "user"
548
+ }]
549
+ };
412
550
  }
413
- export {
414
- S as CORTEX_MCP_PROMPTS,
415
- P as CORTEX_MCP_RESOURCES,
416
- d as CORTEX_MCP_TOOL_ALIASES,
417
- s as CORTEX_MCP_TOOL_KINDS,
418
- k as CORTEX_MCP_WRITE_TOOL_BEHAVIOURS,
419
- T as CortexMcpForbiddenToolError,
420
- f as CortexMcpUnknownToolError,
421
- N as assertCortexMcpToolCoverage,
422
- E as buildCortexMcpToolDefinitions,
423
- A as callCortexMcpTool,
424
- u as cortexMcpScopesAllow,
425
- U as getCortexMcpPrompt,
426
- _ as getCortexMcpToolAnnotations,
427
- C as getCortexMcpToolKind,
428
- L as readCortexMcpResource,
429
- p as resolveCortexMcpToolName
430
- };
551
+ //#endregion
552
+ export { C as CORTEX_MCP_PROMPTS, x as CORTEX_MCP_RESOURCES, o as CORTEX_MCP_TOOL_ALIASES, r as CORTEX_MCP_TOOL_KINDS, i as CORTEX_MCP_WRITE_TOOL_BEHAVIOURS, y as CortexMcpForbiddenToolError, v as CortexMcpUnknownToolError, m as assertCortexMcpToolCoverage, h as buildCortexMcpToolDefinitions, b as callCortexMcpTool, u as cortexMcpScopesAllow, T as getCortexMcpPrompt, l as getCortexMcpToolAnnotations, c as getCortexMcpToolKind, S as readCortexMcpResource, s as resolveCortexMcpToolName };