@nextblock-cms/cortex 0.14.6 → 0.15.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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@nextblock-cms/utils/custom-blocks");require("./zod-config.cjs.js");const e=require("zod"),r=["pages","posts","products","media","categories","profiles","languages"],d=e.z.enum(["article","aside","blockquote","div","figure","figcaption","h2","h3","img","p","section","span"]).describe("A safe semantic element supported by the dynamic layout renderer."),c=e.z.string().trim().max(4e3).describe("Tailwind utility classes only. Do not include CSS, style tags, or JavaScript."),l=e.z.strictObject({description:e.z.string().trim().max(500).optional(),key:o.customBlockFieldKeySchema.describe("Lowercase snake_case field key."),label:e.z.string().trim().min(1).max(120),required:e.z.boolean().default(!1)}),m=l.extend({default_value:e.z.string().max(5e3).optional(),max_length:e.z.number().int().positive().max(1e4).optional(),min_length:e.z.number().int().min(0).max(1e4).optional(),placeholder:e.z.string().max(250).optional(),type:e.z.literal("text")}),u=l.extend({default_value:e.z.string().max(5e4).optional(),placeholder:e.z.string().max(250).optional(),type:e.z.literal("rich-text")}),p=l.extend({accept:e.z.array(e.z.string().trim().min(1).max(120)).max(20).optional(),default_value:e.z.strictObject({alt:e.z.string().max(300).optional(),file_name:e.z.string().trim().min(1).max(255).optional(),file_type:e.z.string().trim().min(1).max(120).optional(),height:e.z.number().int().positive().optional(),object_key:e.z.string().trim().min(1).max(1024),size_bytes:e.z.number().int().positive().optional(),url:e.z.string().trim().min(1).max(2048),width:e.z.number().int().positive().optional()}).optional(),max_bytes:e.z.number().int().positive().max(50*1024*1024).optional(),type:e.z.literal("image_r2")}),f=l.extend({default_value:e.z.union([e.z.string(),e.z.array(e.z.string()),e.z.null()]).optional(),display_column:e.z.string().trim().min(1).max(80).default("title"),filters:e.z.record(e.z.string(),e.z.unknown()).optional(),multiple:e.z.boolean().default(!1),table:e.z.enum(r),type:e.z.literal("db_relation"),value_column:e.z.string().trim().min(1).max(80).default("id")}),y=e.z.discriminatedUnion("type",[m,u,p,f]).describe("A NextBlock custom block field. Allowed types: text, rich-text, image_r2, db_relation."),s=e.z.lazy(()=>e.z.discriminatedUnion("type",[e.z.strictObject({as:d.optional(),children:e.z.array(s).max(200).default([]),className:c.optional(),type:e.z.literal("container")}),e.z.strictObject({as:d.optional(),className:c.optional(),column:e.z.string().trim().min(1).max(80).optional().describe("For a db_relation field, the related record column to display (e.g. title, price)."),emptyFallback:e.z.string().max(300).optional(),field_key:o.customBlockFieldKeySchema,type:e.z.literal("field_render")})])),_=e.z.strictObject({context:e.z.string().trim().max(3e3).optional(),modelId:e.z.string().trim().min(1).max(200).optional(),prompt:e.z.string().trim().min(3).max(4e3)});function g(t){return t.type==="field_render"?[t.field_key]:t.children.flatMap(i=>g(i))}function k(t,i){const n=new Set;t.fields.forEach((a,b)=>{n.has(a.key)&&i.addIssue({code:"custom",message:`Duplicate field key "${a.key}".`,path:["fields",b,"key"]}),n.add(a.key)});for(const a of g(t.layout_schema))n.has(a)||i.addIssue({code:"custom",message:`Layout references unknown field "${a}".`,path:["layout_schema"]})}const h=e.z.strictObject({description:e.z.string().trim().max(1e3).default(""),fields:e.z.array(y).min(1).max(80),is_original:e.z.boolean().default(!0),layout_schema:s,name:e.z.string().trim().min(1).max(160),slug:o.customBlockSlugSchema.describe("Lowercase kebab-case slug.")}).superRefine(k).describe("A complete NextBlock custom block definition stored as database JSONB.");function x(t){const i=h.parse(t);return o.customBlockDefinitionCreateSchema.parse({...i,is_original:!0})}function z(){return["You are NextBlock Cortex, an expert web platform engineer building database-rendered custom CMS widgets.","Return ONLY one clean raw JSON object with the exact structure described in the user message. Do not include markdown fences, comments, prose, or explanatory text.","Never emit TSX, JSX, React components, JavaScript, CSS blocks, style attributes, script tags, or runtime code.","Use only these field types: text, rich-text, image_r2, db_relation.",`Use db_relation.table only from this allowlist: ${r.join(", ")}.`,"Use lowercase kebab-case for slug and lowercase snake_case for field keys.","Build layout_schema as a self-referential tree: container nodes may contain nested container or field_render nodes to any needed depth.","Use Tailwind utility classes in className strings. Use responsive utilities where helpful.",'The "as" property of any node MUST be exactly one of: article, aside, blockquote, div, figure, figcaption, h2, h3, img, p, section, span. Never use a, button, ul, ol, li, table, or any other tag. For a call-to-action or "more info" button, use a span or p styled with button-like Tailwind classes (rounded, padded, colored background).',"Every field_render.field_key must match one field key exactly.","For relation fields, set value_column to id and set display_column to a column that actually exists on the chosen table: use title for pages, posts, and products; sku for product_variants; full_name for profiles; name for categories and languages; file_name for media. Do not invent display columns.",`Entity images: when a block displays an image that belongs to a related product, page, or post (for example a product card photo or a post thumbnail), do NOT add an image_r2 upload field for it. Instead add a single db_relation field to that table (products, product_variants, pages, or posts) and add a field_render node that references it with "as": "img". The renderer automatically resolves the related record's primary image — a product or variant main_image/object_key, or a page/post feature image — so keep the table's normal display_column (for example title for a products relation).`,'You may reference the same db_relation field from more than one field_render node: for example one node with "as": "img" for the image and another text node for its title, plus the relation value to drive a "more info" link. This builds a product/page/post card from a single relation field.',`To display a SPECIFIC column of a related record (its title, price, sku, etc.), set the field_render node's "column" property to that column name. The "column" overrides the field display_column for that one node, so a single product relation can show its image (as "img"), title (column "title"), and price (column "price") from three field_render nodes.`,'Available record columns by table — only reference these in a node "column": products: title, sku, price, sale_price, stock, short_description, slug, status; product_variants: sku, price, sale_price, stock_quantity; pages: title, slug, status; posts: title, slug, excerpt, subtitle; profiles: full_name; categories: name, slug, description; media: file_name; languages: name, code. Use "as": "img" (no column) to show a record image.','Do NOT create a standalone text field for data that lives on a related record. For example, a product price must come from a products db_relation field rendered with column "price" — never a separate "text" field the editor types by hand.',"Monetary columns (price, sale_price, price_adjustment) are stored in integer cents and are automatically formatted as currency on display, so reference them directly; never multiply, divide, or add currency symbols yourself.","Only use image_r2 for standalone images uploaded directly by the editor that are not tied to any database record (for example a decorative banner or icon). Only use text or rich-text fields for free-form copy the editor writes, not for values that exist on a related record."].join(" ")}function v(t){return["Create a NextBlock custom block definition for this request:",t.prompt,t.context?`Additional CMS context:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@nextblock-cms/utils/custom-blocks");require("./zod-config.cjs.js");const e=require("zod"),r=["pages","posts","products","media","categories","profiles","languages"],d=e.z.enum(["article","aside","blockquote","div","figure","figcaption","h2","h3","img","p","section","span"]).describe("A safe semantic element supported by the dynamic layout renderer."),c=e.z.string().trim().max(4e3).describe("Tailwind utility classes only. Do not include CSS, style tags, or JavaScript."),l=e.z.strictObject({description:e.z.string().trim().max(500).optional(),key:o.customBlockFieldKeySchema.describe("Lowercase snake_case field key."),label:e.z.string().trim().min(1).max(120),required:e.z.boolean().default(!1)}),m=l.extend({default_value:e.z.string().max(5e3).optional(),max_length:e.z.number().int().positive().max(1e4).optional(),min_length:e.z.number().int().min(0).max(1e4).optional(),placeholder:e.z.string().max(250).optional(),type:e.z.literal("text")}),u=l.extend({default_value:e.z.string().max(5e4).optional(),placeholder:e.z.string().max(250).optional(),type:e.z.literal("rich-text")}),p=l.extend({accept:e.z.array(e.z.string().trim().min(1).max(120)).max(20).optional(),default_value:e.z.strictObject({alt:e.z.string().max(300).optional(),file_name:e.z.string().trim().min(1).max(255).optional(),file_type:e.z.string().trim().min(1).max(120).optional(),height:e.z.number().int().positive().optional(),object_key:e.z.string().trim().min(1).max(1024),size_bytes:e.z.number().int().positive().optional(),url:e.z.string().trim().min(1).max(2048),width:e.z.number().int().positive().optional()}).optional(),max_bytes:e.z.number().int().positive().max(50*1024*1024).optional(),type:e.z.literal("image_r2")}),f=l.extend({default_value:e.z.union([e.z.string(),e.z.array(e.z.string()),e.z.null()]).optional(),display_column:e.z.string().trim().min(1).max(80).default("title"),filters:e.z.record(e.z.string(),e.z.unknown()).optional(),multiple:e.z.boolean().default(!1),table:e.z.enum(r),type:e.z.literal("db_relation"),value_column:e.z.string().trim().min(1).max(80).default("id")}),y=e.z.discriminatedUnion("type",[m,u,p,f]).describe("A NextBlock custom block field. Allowed types: text, rich-text, image_r2, db_relation."),s=e.z.lazy(()=>e.z.discriminatedUnion("type",[e.z.strictObject({as:d.optional(),children:e.z.array(s).max(200).default([]),className:c.optional(),type:e.z.literal("container")}),e.z.strictObject({as:d.optional(),className:c.optional(),column:e.z.string().trim().min(1).max(80).optional().describe("For a db_relation field, the related record column to display (e.g. title, price)."),emptyFallback:e.z.string().max(300).optional(),field_key:o.customBlockFieldKeySchema,type:e.z.literal("field_render")})])),_=e.z.strictObject({context:e.z.string().trim().max(24e3).optional(),modelId:e.z.string().trim().min(1).max(200).optional(),prompt:e.z.string().trim().min(3).max(4e3)});function g(t){return t.type==="field_render"?[t.field_key]:t.children.flatMap(i=>g(i))}function k(t,i){const n=new Set;t.fields.forEach((a,b)=>{n.has(a.key)&&i.addIssue({code:"custom",message:`Duplicate field key "${a.key}".`,path:["fields",b,"key"]}),n.add(a.key)});for(const a of g(t.layout_schema))n.has(a)||i.addIssue({code:"custom",message:`Layout references unknown field "${a}".`,path:["layout_schema"]})}const h=e.z.strictObject({description:e.z.string().trim().max(1e3).default(""),fields:e.z.array(y).min(1).max(80),is_original:e.z.boolean().default(!0),layout_schema:s,name:e.z.string().trim().min(1).max(160),slug:o.customBlockSlugSchema.describe("Lowercase kebab-case slug.")}).superRefine(k).describe("A complete NextBlock custom block definition stored as database JSONB.");function x(t){const i=h.parse(t);return o.customBlockDefinitionCreateSchema.parse({...i,is_original:!0})}function z(){return["You are NextBlock Cortex, an expert web platform engineer building database-rendered custom CMS widgets.","Return ONLY one clean raw JSON object with the exact structure described in the user message. Do not include markdown fences, comments, prose, or explanatory text.","Never emit TSX, JSX, React components, JavaScript, CSS blocks, style attributes, script tags, or runtime code.","Use only these field types: text, rich-text, image_r2, db_relation.",`Use db_relation.table only from this allowlist: ${r.join(", ")}.`,"Use lowercase kebab-case for slug and lowercase snake_case for field keys.","Build layout_schema as a self-referential tree: container nodes may contain nested container or field_render nodes to any needed depth.","Use Tailwind utility classes in className strings. Use responsive utilities where helpful.",'The "as" property of any node MUST be exactly one of: article, aside, blockquote, div, figure, figcaption, h2, h3, img, p, section, span. Never use a, button, ul, ol, li, table, or any other tag. For a call-to-action or "more info" button, use a span or p styled with button-like Tailwind classes (rounded, padded, colored background).',"Every field_render.field_key must match one field key exactly.","For relation fields, set value_column to id and set display_column to a column that actually exists on the chosen table: use title for pages, posts, and products; sku for product_variants; full_name for profiles; name for categories and languages; file_name for media. Do not invent display columns.",`Entity images: when a block displays an image that belongs to a related product, page, or post (for example a product card photo or a post thumbnail), do NOT add an image_r2 upload field for it. Instead add a single db_relation field to that table (products, product_variants, pages, or posts) and add a field_render node that references it with "as": "img". The renderer automatically resolves the related record's primary image — a product or variant main_image/object_key, or a page/post feature image — so keep the table's normal display_column (for example title for a products relation).`,'You may reference the same db_relation field from more than one field_render node: for example one node with "as": "img" for the image and another text node for its title, plus the relation value to drive a "more info" link. This builds a product/page/post card from a single relation field.',`To display a SPECIFIC column of a related record (its title, price, sku, etc.), set the field_render node's "column" property to that column name. The "column" overrides the field display_column for that one node, so a single product relation can show its image (as "img"), title (column "title"), and price (column "price") from three field_render nodes.`,'Available record columns by table — only reference these in a node "column": products: title, sku, price, sale_price, stock, short_description, slug, status; product_variants: sku, price, sale_price, stock_quantity; pages: title, slug, status; posts: title, slug, excerpt, subtitle; profiles: full_name; categories: name, slug, description; media: file_name; languages: name, code. Use "as": "img" (no column) to show a record image.','Do NOT create a standalone text field for data that lives on a related record. For example, a product price must come from a products db_relation field rendered with column "price" — never a separate "text" field the editor types by hand.',"Monetary columns (price, sale_price, price_adjustment) are stored in integer cents and are automatically formatted as currency on display, so reference them directly; never multiply, divide, or add currency symbols yourself.","Only use image_r2 for standalone images uploaded directly by the editor that are not tied to any database record (for example a decorative banner or icon). Only use text or rich-text fields for free-form copy the editor writes, not for values that exist on a related record."].join(" ")}function v(t){return["Create a NextBlock custom block definition for this request:",t.prompt,t.context?`Additional CMS context:
2
2
  ${t.context}`:null,["Return ONLY a JSON object with EXACTLY these top-level keys:",'- "name": string (human-friendly block name).','- "slug": lowercase kebab-case string.','- "description": short string.','- "is_original": true.','- "fields": a non-empty array of field objects. Each field is { "key": lowercase snake_case string, "label": string, "required": boolean, "type": one of "text" | "rich-text" | "image_r2" | "db_relation" }.',` For "db_relation" fields also include "table" (one of: ${r.join(", ")}), "display_column" (e.g. title, name, full_name, file_name, code), "value_column": "id", and "multiple": boolean.`,'- "layout_schema": a single root layout node (a tree). Every node is one of:',' container: { "type": "container", "as": an HTML tag like div/section/article/figure, "className": Tailwind utility classes, "children": array of nodes }.',' field render: { "type": "field_render", "field_key": one of the field keys above, "as": an HTML tag like p/span/img/h2/h3/div, "className": Tailwind utility classes, "emptyFallback": optional placeholder string }.',' Containers may nest other containers to any depth. Every field_render.field_key MUST match one of the fields. Render image_r2 fields with "as": "img".'].join(`
3
3
  `)].filter(Boolean).join(`
4
4
 
@@ -146,6 +146,16 @@ export type CortexWidgetLayoutNode = {
146
146
  type: 'field_render';
147
147
  };
148
148
  export declare const cortexWidgetLayoutNodeSchema: z.ZodType<CortexWidgetLayoutNode>;
149
+ /**
150
+ * `context` is sized for a serialized block definition, not just a style note.
151
+ *
152
+ * `update_custom_block` regenerates a block by feeding the *existing* definition
153
+ * back in as context, and a definition with a dozen fields plus its layout schema
154
+ * runs well past a few thousand characters — the old 3000 cap made editing any
155
+ * non-trivial block fail validation before it ever reached the model. The route
156
+ * that accepts this is ADMIN/WRITER-gated, so the cap is a sanity bound rather
157
+ * than an abuse control; `prompt` still carries the tighter limit.
158
+ */
149
159
  export declare const cortexWidgetBuildRequestSchema: z.ZodObject<{
150
160
  context: z.ZodOptional<z.ZodString>;
151
161
  modelId: z.ZodOptional<z.ZodString>;
@@ -82,7 +82,7 @@ const l = [
82
82
  })
83
83
  ])
84
84
  ), T = e.strictObject({
85
- context: e.string().trim().max(3e3).optional(),
85
+ context: e.string().trim().max(24e3).optional(),
86
86
  modelId: e.string().trim().min(1).max(200).optional(),
87
87
  prompt: e.string().trim().min(3).max(4e3)
88
88
  });
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./ai-global-agent-tools.cjs.js");require("./zod-config.cjs.js");const w=require("zod"),i={create_cms_page:"write",create_cms_post:"write",create_cms_product:"write",create_custom_block:"write",delete_cms_item:"write",delete_custom_block:"write",describe_database_schema:"read",execute_cms_action_plan:"write",execute_database_action_plan:"write",execute_database_mutation:"write",fetch_ecommerce_stats:"read",fetch_url_content:"read",insert_content_block:"write",list_custom_blocks:"read",prepare_delete_cms_item:"read",read_current_cms_item:"read",read_database_records:"read",rewrite_page_draft:"write",search_documentation:"read",search_stock_photos:"read",set_content_images:"write",translate_page:"write",update_cms_item_field:"write",update_content_block:"write",update_current_cms_fields:"write",update_custom_block:"write",update_footer:"write",update_navigation_bar:"write",update_section_column_block:"write"},s={generate_jsonb_layout:{canonical:"rewrite_page_draft",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`.",title:"Generate JSONB layout"},get_database_schema:{canonical:"describe_database_schema",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`.",title:"Get database schema"},query_site_analytics:{canonical:"fetch_ecommerce_stats",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`.",title:"Query site analytics"},search_stock_media:{canonical:"search_stock_photos",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`.",title:"Search stock media"},update_site_navigation:{canonical:"update_navigation_bar",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`.',title:"Update site navigation"}};function g(e){return e in s?s[e].canonical:e in i?e:null}function b(e){const t=g(e);return t?i[t]:null}function c(e,t){const o=b(t);return o?o==="read"?e.length>0:e.includes("write"):!1}function m(e){return e.split("_").map((o,r)=>r===0?o.charAt(0).toUpperCase()+o.slice(1):o).join(" ")}function h(e){const t={additionalProperties:!1,type:"object"};if(!e||typeof e!="object")return t;try{const o=w.z.toJSONSchema(e,{cycles:"ref",io:"input",reused:"inline",target:"draft-2020-12",unrepresentable:"any"});return delete o.$schema,o.type==="object"?o:t}catch{return t}}function l(e){return f.createCortexGlobalAgentTools(e)}function C(e){const t=Object.keys(l(e)),o=Object.keys(i);return{missingFromRegistry:o.filter(r=>!t.includes(r)),unclassified:t.filter(r=>!o.includes(r))}}function T(e){const t=l(e.context),o=[];for(const[r,a]of Object.entries(t))!(r in i)||!c(e.scopes,r)||o.push({description:a.description??`Cortex AI ${m(r)} tool.`,inputSchema:h(a.inputSchema),name:r,title:m(r)});for(const[r,a]of Object.entries(s)){const n=t[a.canonical];!n||!c(e.scopes,r)||o.push({description:a.description,inputSchema:h(n.inputSchema),name:r,title:a.title})}return o.sort((r,a)=>r.name.localeCompare(a.name))}function _(e,t){return{content:[{text:e,type:"text"}],isError:t}}function S(e){return e.issues.map(t=>`${t.path.length>0?t.path.join("."):"(root)"}: ${t.message}`).join("; ")}class p extends Error{constructor(t){super(`Unknown tool: ${t}`),this.name="CortexMcpUnknownToolError"}}class y extends Error{constructor(t){super(`Tool "${t}" requires the "write" scope. This MCP token is read-only — mint a read+write token in CMS Settings → Cortex AI.`),this.name="CortexMcpForbiddenToolError"}}async function v(e){const t=g(e.name);if(!t)throw new p(e.name);if(!c(e.scopes,e.name))throw new y(e.name);const r=l(e.context)[t];if(!r||typeof r.execute!="function")throw new p(e.name);const a=e.args&&typeof e.args=="object"?e.args:{};if(r.inputSchema&&typeof r.inputSchema.safeParse=="function"){const n=r.inputSchema.safeParse(a);if(!n.success)return _(`Invalid arguments for "${e.name}": ${S(n.error)}`,!0)}try{const n=await r.execute(a),u=JSON.stringify(n??{success:!0},null,2),d=n&&typeof n=="object"&&!Array.isArray(n)?n:null,k=d?.success===!1;return{content:[{text:u,type:"text"}],isError:k,...d?{structuredContent:d}:{}}}catch(n){const u=n instanceof Error?n.message:String(n);return _(`Tool "${e.name}" failed: ${u}`,!0)}}const M=[{description:"The CMS database structure Cortex AI can read and mutate: tables, columns, primary keys, and read-only flags.",mimeType:"application/json",name:"database-schema",title:"NextBlock database schema",uri:"cortex://schema/database"},{description:"The built-in NextBlock block types available when composing page, post, and product layouts.",mimeType:"application/json",name:"block-types",title:"NextBlock block types",uri:"cortex://schema/blocks"},{description:"Data-defined custom block definitions registered in this workspace, keyed by the slug used as a block instance `block_type`.",mimeType:"application/json",name:"custom-blocks",title:"NextBlock custom block definitions",uri:"cortex://schema/custom-blocks"}];async function O(e){const t=l(e.context);if(e.uri==="cortex://schema/database"){const o=await t.describe_database_schema?.execute?.({includeReadOnly:!0});return{mimeType:"application/json",text:JSON.stringify(o??{},null,2),uri:e.uri}}if(e.uri==="cortex://schema/blocks")return{mimeType:"application/json",text:JSON.stringify({blockTypes:f.availableCortexAiBlockTypes},null,2),uri:e.uri};if(e.uri==="cortex://schema/custom-blocks"){const o=await t.list_custom_blocks?.execute?.({});return{mimeType:"application/json",text:JSON.stringify(o??{},null,2),uri:e.uri}}return null}const x=[{arguments:[{description:"What the page is for, and any brand or tone notes.",name:"brief",required:!0},{description:'Slug of the page or post to rewrite, e.g. "home".',name:"slug",required:!0}],description:"Build or redesign a NextBlock page from a brief, following the section-based layout recipe, and stage it as a reviewable Live Draft.",name:"build-page",title:"Build a NextBlock page"},{arguments:[{description:"Source URL to draw structure and copy from.",name:"url",required:!0},{description:"Slug of the page to write the result into.",name:"slug",required:!0}],description:"Read an external page and rebuild an equivalent NextBlock page from it, reusing its imagery where available.",name:"clone-from-url",title:"Rebuild a page from a URL"},{arguments:[{description:'Target language code, e.g. "fr".',name:"languageCode",required:!0},{description:"Slug of the page or post to translate.",name:"slug",required:!0}],description:"Translate an existing page or post into another language, preserving its layout and imagery.",name:"translate-content",title:"Translate a page or post"}],R={"build-page":e=>[`Build the NextBlock page with slug "${e.slug??"<slug>"}" from this brief:`,"",e.brief??"<brief>","","Process:","1. Call get_database_schema and read_current_cms_item (or read_database_records on `pages`) to ground yourself in what exists.",'2. Compose the page from `section` blocks: one column entry per grid track, the first section a hero, alternating none / theme:"muted" / theme:"primary" backgrounds for rhythm. Use discrete heading blocks rather than <h2> inside text HTML.',"3. Call search_stock_media for real photography; copy each photo's attribution fields onto the image block.","4. Write the result with generate_jsonb_layout. It stages a Live Draft — tell the user to preview and publish it."].join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./ai-global-agent-tools.cjs.js");require("./zod-config.cjs.js");const w=require("zod"),i={create_cms_page:"write",create_cms_post:"write",create_cms_product:"write",create_custom_block:"write",delete_cms_item:"write",delete_custom_block:"write",describe_database_schema:"read",execute_cms_action_plan:"write",execute_database_action_plan:"write",execute_database_mutation:"write",fetch_ecommerce_stats:"read",fetch_url_content:"read",insert_content_block:"write",list_custom_blocks:"read",list_media:"read",list_product_categories:"read",list_site_script_revisions:"read",list_site_scripts:"read",list_site_themes:"read",manage_language:"write",manage_product_category:"write",manage_product_variants:"write",manage_site_script:"write",manage_site_theme:"write",prepare_delete_cms_item:"read",publish_content_draft:"write",read_current_cms_item:"read",read_database_records:"read",revert_site_script:"write",rewrite_page_draft:"write",search_documentation:"read",search_stock_photos:"read",set_content_images:"write",translate_content_bulk:"write",translate_page:"write",update_cms_item_field:"write",upload_media:"write",update_content_block:"write",update_current_cms_fields:"write",update_custom_block:"write",update_footer:"write",update_global_css:"write",update_navigation_bar:"write",update_section_column_block:"write"},s={generate_jsonb_layout:{canonical:"rewrite_page_draft",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`.",title:"Generate JSONB layout"},get_database_schema:{canonical:"describe_database_schema",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`.",title:"Get database schema"},query_site_analytics:{canonical:"fetch_ecommerce_stats",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`.",title:"Query site analytics"},search_stock_media:{canonical:"search_stock_photos",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`.",title:"Search stock media"},update_site_navigation:{canonical:"update_navigation_bar",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`.',title:"Update site navigation"}};function g(e){return e in s?s[e].canonical:e in i?e:null}function b(e){const t=g(e);return t?i[t]:null}function c(e,t){const r=b(t);return r?r==="read"?e.length>0:e.includes("write"):!1}function _(e){return e.split("_").map((r,o)=>o===0?r.charAt(0).toUpperCase()+r.slice(1):r).join(" ")}function m(e){const t={additionalProperties:!1,type:"object"};if(!e||typeof e!="object")return t;try{const r=w.z.toJSONSchema(e,{cycles:"ref",io:"input",reused:"inline",target:"draft-2020-12",unrepresentable:"any"});return delete r.$schema,r.type==="object"?r:t}catch{return t}}function l(e){return f.createCortexGlobalAgentTools(e)}function C(e){const t=Object.keys(l(e)),r=Object.keys(i);return{missingFromRegistry:r.filter(o=>!t.includes(o)),unclassified:t.filter(o=>!r.includes(o))}}function T(e){const t=l(e.context),r=[];for(const[o,n]of Object.entries(t))!(o in i)||!c(e.scopes,o)||r.push({description:n.description??`Cortex AI ${_(o)} tool.`,inputSchema:m(n.inputSchema),name:o,title:_(o)});for(const[o,n]of Object.entries(s)){const a=t[n.canonical];!a||!c(e.scopes,o)||r.push({description:n.description,inputSchema:m(a.inputSchema),name:o,title:n.title})}return r.sort((o,n)=>o.name.localeCompare(n.name))}function h(e,t){return{content:[{text:e,type:"text"}],isError:t}}function v(e){return e.issues.map(t=>`${t.path.length>0?t.path.join("."):"(root)"}: ${t.message}`).join("; ")}class p extends Error{constructor(t){super(`Unknown tool: ${t}`),this.name="CortexMcpUnknownToolError"}}class y extends Error{constructor(t){super(`Tool "${t}" requires the "write" scope. This MCP token is read-only — mint a read+write token in CMS Settings → Cortex AI.`),this.name="CortexMcpForbiddenToolError"}}async function S(e){const t=g(e.name);if(!t)throw new p(e.name);if(!c(e.scopes,e.name))throw new y(e.name);const o=l(e.context)[t];if(!o||typeof o.execute!="function")throw new p(e.name);const n=e.args&&typeof e.args=="object"?e.args:{};if(o.inputSchema&&typeof o.inputSchema.safeParse=="function"){const a=o.inputSchema.safeParse(n);if(!a.success)return h(`Invalid arguments for "${e.name}": ${v(a.error)}`,!0)}try{const a=await o.execute(n),u=JSON.stringify(a??{success:!0},null,2),d=a&&typeof a=="object"&&!Array.isArray(a)?a:null,k=d?.success===!1;return{content:[{text:u,type:"text"}],isError:k,...d?{structuredContent:d}:{}}}catch(a){const u=a instanceof Error?a.message:String(a);return h(`Tool "${e.name}" failed: ${u}`,!0)}}const M=[{description:"The CMS database structure Cortex AI can read and mutate: tables, columns, primary keys, and read-only flags.",mimeType:"application/json",name:"database-schema",title:"NextBlock database schema",uri:"cortex://schema/database"},{description:"The built-in NextBlock block types available when composing page, post, and product layouts.",mimeType:"application/json",name:"block-types",title:"NextBlock block types",uri:"cortex://schema/blocks"},{description:"Data-defined custom block definitions registered in this workspace, keyed by the slug used as a block instance `block_type`.",mimeType:"application/json",name:"custom-blocks",title:"NextBlock custom block definitions",uri:"cortex://schema/custom-blocks"}];async function O(e){const t=l(e.context);if(e.uri==="cortex://schema/database"){const r=await t.describe_database_schema?.execute?.({includeReadOnly:!0});return{mimeType:"application/json",text:JSON.stringify(r??{},null,2),uri:e.uri}}if(e.uri==="cortex://schema/blocks")return{mimeType:"application/json",text:JSON.stringify({blockTypes:f.availableCortexAiBlockTypes},null,2),uri:e.uri};if(e.uri==="cortex://schema/custom-blocks"){const r=await t.list_custom_blocks?.execute?.({});return{mimeType:"application/json",text:JSON.stringify(r??{},null,2),uri:e.uri}}return null}const x=[{arguments:[{description:"What the page is for, and any brand or tone notes.",name:"brief",required:!0},{description:'Slug of the page or post to rewrite, e.g. "home".',name:"slug",required:!0}],description:"Build or redesign a NextBlock page from a brief, following the section-based layout recipe, and stage it as a reviewable Live Draft.",name:"build-page",title:"Build a NextBlock page"},{arguments:[{description:"Source URL to draw structure and copy from.",name:"url",required:!0},{description:"Slug of the page to write the result into.",name:"slug",required:!0}],description:"Read an external page and rebuild an equivalent NextBlock page from it, reusing its imagery where available.",name:"clone-from-url",title:"Rebuild a page from a URL"},{arguments:[{description:'Target language code, e.g. "fr".',name:"languageCode",required:!0},{description:"Slug of the page or post to translate.",name:"slug",required:!0}],description:"Translate an existing page or post into another language, preserving its layout and imagery.",name:"translate-content",title:"Translate a page or post"}],R={"build-page":e=>[`Build the NextBlock page with slug "${e.slug??"<slug>"}" from this brief:`,"",e.brief??"<brief>","","Process:","1. Call get_database_schema and read_current_cms_item (or read_database_records on `pages`) to ground yourself in what exists.",'2. Compose the page from `section` blocks: one column entry per grid track, the first section a hero, alternating none / theme:"muted" / theme:"primary" backgrounds for rhythm. Use discrete heading blocks rather than <h2> inside text HTML.',"3. Call search_stock_media for real photography; copy each photo's attribution fields onto the image block.","4. Write the result with generate_jsonb_layout. It stages a Live Draft — tell the user to preview and publish it."].join(`
2
2
  `),"clone-from-url":e=>[`Rebuild the NextBlock page "${e.slug??"<slug>"}" based on ${e.url??"<url>"}.`,"","Process:","1. Call fetch_url_content on the URL first. Use its headings, text, and mainImage — never invent an image URL.","2. Map the source structure onto NextBlock `section` blocks; do not copy its markup verbatim.","3. Write the result with generate_jsonb_layout so it lands as a reviewable Live Draft."].join(`
3
3
  `),"translate-content":e=>[`Translate the page or post "${e.slug??"<slug>"}" into "${e.languageCode??"<languageCode>"}".`,"","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."].join(`
4
- `)};function j(e){const t=x.find(r=>r.name===e.name),o=R[e.name];return!t||!o?null:{description:t.description,messages:[{content:{text:o(e.args??{}),type:"text"},role:"user"}]}}exports.CORTEX_MCP_PROMPTS=x;exports.CORTEX_MCP_RESOURCES=M;exports.CORTEX_MCP_TOOL_ALIASES=s;exports.CORTEX_MCP_TOOL_KINDS=i;exports.CortexMcpForbiddenToolError=y;exports.CortexMcpUnknownToolError=p;exports.assertCortexMcpToolCoverage=C;exports.buildCortexMcpToolDefinitions=T;exports.callCortexMcpTool=v;exports.cortexMcpScopesAllow=c;exports.getCortexMcpPrompt=j;exports.getCortexMcpToolKind=b;exports.readCortexMcpResource=O;exports.resolveCortexMcpToolName=g;
4
+ `)};function j(e){const t=x.find(o=>o.name===e.name),r=R[e.name];return!t||!r?null:{description:t.description,messages:[{content:{text:r(e.args??{}),type:"text"},role:"user"}]}}exports.CORTEX_MCP_PROMPTS=x;exports.CORTEX_MCP_RESOURCES=M;exports.CORTEX_MCP_TOOL_ALIASES=s;exports.CORTEX_MCP_TOOL_KINDS=i;exports.CortexMcpForbiddenToolError=y;exports.CortexMcpUnknownToolError=p;exports.assertCortexMcpToolCoverage=C;exports.buildCortexMcpToolDefinitions=T;exports.callCortexMcpTool=S;exports.cortexMcpScopesAllow=c;exports.getCortexMcpPrompt=j;exports.getCortexMcpToolKind=b;exports.readCortexMcpResource=O;exports.resolveCortexMcpToolName=g;
@@ -41,19 +41,34 @@ export declare const CORTEX_MCP_TOOL_KINDS: {
41
41
  readonly fetch_url_content: "read";
42
42
  readonly insert_content_block: "write";
43
43
  readonly list_custom_blocks: "read";
44
+ readonly list_media: "read";
45
+ readonly list_product_categories: "read";
46
+ readonly list_site_script_revisions: "read";
47
+ readonly list_site_scripts: "read";
48
+ readonly list_site_themes: "read";
49
+ readonly manage_language: "write";
50
+ readonly manage_product_category: "write";
51
+ readonly manage_product_variants: "write";
52
+ readonly manage_site_script: "write";
53
+ readonly manage_site_theme: "write";
44
54
  readonly prepare_delete_cms_item: "read";
55
+ readonly publish_content_draft: "write";
45
56
  readonly read_current_cms_item: "read";
46
57
  readonly read_database_records: "read";
58
+ readonly revert_site_script: "write";
47
59
  readonly rewrite_page_draft: "write";
48
60
  readonly search_documentation: "read";
49
61
  readonly search_stock_photos: "read";
50
62
  readonly set_content_images: "write";
63
+ readonly translate_content_bulk: "write";
51
64
  readonly translate_page: "write";
52
65
  readonly update_cms_item_field: "write";
66
+ readonly upload_media: "write";
53
67
  readonly update_content_block: "write";
54
68
  readonly update_current_cms_fields: "write";
55
69
  readonly update_custom_block: "write";
56
70
  readonly update_footer: "write";
71
+ readonly update_global_css: "write";
57
72
  readonly update_navigation_bar: "write";
58
73
  readonly update_section_column_block: "write";
59
74
  };
@@ -16,19 +16,34 @@ const i = {
16
16
  fetch_url_content: "read",
17
17
  insert_content_block: "write",
18
18
  list_custom_blocks: "read",
19
+ list_media: "read",
20
+ list_product_categories: "read",
21
+ list_site_script_revisions: "read",
22
+ list_site_scripts: "read",
23
+ list_site_themes: "read",
24
+ manage_language: "write",
25
+ manage_product_category: "write",
26
+ manage_product_variants: "write",
27
+ manage_site_script: "write",
28
+ manage_site_theme: "write",
19
29
  prepare_delete_cms_item: "read",
30
+ publish_content_draft: "write",
20
31
  read_current_cms_item: "read",
21
32
  read_database_records: "read",
33
+ revert_site_script: "write",
22
34
  rewrite_page_draft: "write",
23
35
  search_documentation: "read",
24
36
  search_stock_photos: "read",
25
37
  set_content_images: "write",
38
+ translate_content_bulk: "write",
26
39
  translate_page: "write",
27
40
  update_cms_item_field: "write",
41
+ upload_media: "write",
28
42
  update_content_block: "write",
29
43
  update_current_cms_fields: "write",
30
44
  update_custom_block: "write",
31
45
  update_footer: "write",
46
+ update_global_css: "write",
32
47
  update_navigation_bar: "write",
33
48
  update_section_column_block: "write"
34
49
  }, u = {
@@ -58,33 +73,33 @@ const i = {
58
73
  title: "Update site navigation"
59
74
  }
60
75
  };
61
- function _(e) {
76
+ function h(e) {
62
77
  return e in u ? u[e].canonical : e in i ? e : null;
63
78
  }
64
- function x(e) {
65
- const t = _(e);
79
+ function w(e) {
80
+ const t = h(e);
66
81
  return t ? i[t] : null;
67
82
  }
68
83
  function d(e, t) {
69
- const o = x(t);
70
- return o ? o === "read" ? e.length > 0 : e.includes("write") : !1;
84
+ const r = w(t);
85
+ return r ? r === "read" ? e.length > 0 : e.includes("write") : !1;
71
86
  }
72
87
  function p(e) {
73
- return e.split("_").map((o, r) => r === 0 ? o.charAt(0).toUpperCase() + o.slice(1) : o).join(" ");
88
+ return e.split("_").map((r, o) => o === 0 ? r.charAt(0).toUpperCase() + r.slice(1) : r).join(" ");
74
89
  }
75
- function m(e) {
90
+ function g(e) {
76
91
  const t = { additionalProperties: !1, type: "object" };
77
92
  if (!e || typeof e != "object")
78
93
  return t;
79
94
  try {
80
- const o = k.toJSONSchema(e, {
95
+ const r = k.toJSONSchema(e, {
81
96
  cycles: "ref",
82
97
  io: "input",
83
98
  reused: "inline",
84
99
  target: "draft-2020-12",
85
100
  unrepresentable: "any"
86
101
  });
87
- return delete o.$schema, o.type === "object" ? o : t;
102
+ return delete r.$schema, r.type === "object" ? r : t;
88
103
  } catch {
89
104
  return t;
90
105
  }
@@ -93,39 +108,39 @@ function s(e) {
93
108
  return y(e);
94
109
  }
95
110
  function j(e) {
96
- const t = Object.keys(s(e)), o = Object.keys(i);
111
+ const t = Object.keys(s(e)), r = Object.keys(i);
97
112
  return {
98
- missingFromRegistry: o.filter((r) => !t.includes(r)),
99
- unclassified: t.filter((r) => !o.includes(r))
113
+ missingFromRegistry: r.filter((o) => !t.includes(o)),
114
+ unclassified: t.filter((o) => !r.includes(o))
100
115
  };
101
116
  }
102
117
  function O(e) {
103
- const t = s(e.context), o = [];
104
- for (const [r, a] of Object.entries(t))
105
- !(r in i) || !d(e.scopes, r) || o.push({
106
- description: a.description ?? `Cortex AI ${p(r)} tool.`,
107
- inputSchema: m(a.inputSchema),
108
- name: r,
109
- title: p(r)
118
+ const t = s(e.context), r = [];
119
+ for (const [o, n] of Object.entries(t))
120
+ !(o in i) || !d(e.scopes, o) || r.push({
121
+ description: n.description ?? `Cortex AI ${p(o)} tool.`,
122
+ inputSchema: g(n.inputSchema),
123
+ name: o,
124
+ title: p(o)
110
125
  });
111
- for (const [r, a] of Object.entries(u)) {
112
- const n = t[a.canonical];
113
- !n || !d(e.scopes, r) || o.push({
114
- description: a.description,
115
- inputSchema: m(n.inputSchema),
116
- name: r,
117
- title: a.title
126
+ for (const [o, n] of Object.entries(u)) {
127
+ const a = t[n.canonical];
128
+ !a || !d(e.scopes, o) || r.push({
129
+ description: n.description,
130
+ inputSchema: g(a.inputSchema),
131
+ name: o,
132
+ title: n.title
118
133
  });
119
134
  }
120
- return o.sort((r, a) => r.name.localeCompare(a.name));
135
+ return r.sort((o, n) => o.name.localeCompare(n.name));
121
136
  }
122
- function g(e, t) {
137
+ function m(e, t) {
123
138
  return { content: [{ text: e, type: "text" }], isError: t };
124
139
  }
125
- function w(e) {
140
+ function x(e) {
126
141
  return e.issues.map((t) => `${t.path.length > 0 ? t.path.join(".") : "(root)"}: ${t.message}`).join("; ");
127
142
  }
128
- class h extends Error {
143
+ class _ extends Error {
129
144
  constructor(t) {
130
145
  super(`Unknown tool: ${t}`), this.name = "CortexMcpUnknownToolError";
131
146
  }
@@ -138,33 +153,33 @@ class v extends Error {
138
153
  }
139
154
  }
140
155
  async function N(e) {
141
- const t = _(e.name);
156
+ const t = h(e.name);
142
157
  if (!t)
143
- throw new h(e.name);
158
+ throw new _(e.name);
144
159
  if (!d(e.scopes, e.name))
145
160
  throw new v(e.name);
146
- const r = s(e.context)[t];
147
- if (!r || typeof r.execute != "function")
148
- throw new h(e.name);
149
- const a = e.args && typeof e.args == "object" ? e.args : {};
150
- if (r.inputSchema && typeof r.inputSchema.safeParse == "function") {
151
- const n = r.inputSchema.safeParse(a);
152
- if (!n.success)
153
- return g(
154
- `Invalid arguments for "${e.name}": ${w(n.error)}`,
161
+ const o = s(e.context)[t];
162
+ if (!o || typeof o.execute != "function")
163
+ throw new _(e.name);
164
+ const n = e.args && typeof e.args == "object" ? e.args : {};
165
+ if (o.inputSchema && typeof o.inputSchema.safeParse == "function") {
166
+ const a = o.inputSchema.safeParse(n);
167
+ if (!a.success)
168
+ return m(
169
+ `Invalid arguments for "${e.name}": ${x(a.error)}`,
155
170
  !0
156
171
  );
157
172
  }
158
173
  try {
159
- const n = await r.execute(a), c = JSON.stringify(n ?? { success: !0 }, null, 2), l = n && typeof n == "object" && !Array.isArray(n) ? n : null, f = l?.success === !1;
174
+ const a = await o.execute(n), c = JSON.stringify(a ?? { success: !0 }, null, 2), l = a && typeof a == "object" && !Array.isArray(a) ? a : null, f = l?.success === !1;
160
175
  return {
161
176
  content: [{ text: c, type: "text" }],
162
177
  isError: f,
163
178
  ...l ? { structuredContent: l } : {}
164
179
  };
165
- } catch (n) {
166
- const c = n instanceof Error ? n.message : String(n);
167
- return g(`Tool "${e.name}" failed: ${c}`, !0);
180
+ } catch (a) {
181
+ const c = a instanceof Error ? a.message : String(a);
182
+ return m(`Tool "${e.name}" failed: ${c}`, !0);
168
183
  }
169
184
  }
170
185
  const A = [
@@ -193,10 +208,10 @@ const A = [
193
208
  async function B(e) {
194
209
  const t = s(e.context);
195
210
  if (e.uri === "cortex://schema/database") {
196
- const o = await t.describe_database_schema?.execute?.({ includeReadOnly: !0 });
211
+ const r = await t.describe_database_schema?.execute?.({ includeReadOnly: !0 });
197
212
  return {
198
213
  mimeType: "application/json",
199
- text: JSON.stringify(o ?? {}, null, 2),
214
+ text: JSON.stringify(r ?? {}, null, 2),
200
215
  uri: e.uri
201
216
  };
202
217
  }
@@ -207,10 +222,10 @@ async function B(e) {
207
222
  uri: e.uri
208
223
  };
209
224
  if (e.uri === "cortex://schema/custom-blocks") {
210
- const o = await t.list_custom_blocks?.execute?.({});
225
+ const r = await t.list_custom_blocks?.execute?.({});
211
226
  return {
212
227
  mimeType: "application/json",
213
- text: JSON.stringify(o ?? {}, null, 2),
228
+ text: JSON.stringify(r ?? {}, null, 2),
214
229
  uri: e.uri
215
230
  };
216
231
  }
@@ -274,11 +289,11 @@ const C = [
274
289
  `)
275
290
  };
276
291
  function P(e) {
277
- const t = C.find((r) => r.name === e.name), o = S[e.name];
278
- return !t || !o ? null : {
292
+ const t = C.find((o) => o.name === e.name), r = S[e.name];
293
+ return !t || !r ? null : {
279
294
  description: t.description,
280
295
  messages: [
281
- { content: { text: o(e.args ?? {}), type: "text" }, role: "user" }
296
+ { content: { text: r(e.args ?? {}), type: "text" }, role: "user" }
282
297
  ]
283
298
  };
284
299
  }
@@ -288,13 +303,13 @@ export {
288
303
  u as CORTEX_MCP_TOOL_ALIASES,
289
304
  i as CORTEX_MCP_TOOL_KINDS,
290
305
  v as CortexMcpForbiddenToolError,
291
- h as CortexMcpUnknownToolError,
306
+ _ as CortexMcpUnknownToolError,
292
307
  j as assertCortexMcpToolCoverage,
293
308
  O as buildCortexMcpToolDefinitions,
294
309
  N as callCortexMcpTool,
295
310
  d as cortexMcpScopesAllow,
296
311
  P as getCortexMcpPrompt,
297
- x as getCortexMcpToolKind,
312
+ w as getCortexMcpToolKind,
298
313
  B as readCortexMcpResource,
299
- _ as resolveCortexMcpToolName
314
+ h as resolveCortexMcpToolName
300
315
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextblock-cms/cortex",
3
- "version": "0.14.6",
3
+ "version": "0.15.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@ai-sdk/openai-compatible": "^2.0.42",
30
- "@nextblock-cms/db": "^0.14.6",
31
- "@nextblock-cms/ecommerce": "npm:@nextblock-cms/ecom@^0.14.6",
32
- "@nextblock-cms/utils": "^0.14.6",
30
+ "@nextblock-cms/db": "^0.15.0",
31
+ "@nextblock-cms/ecommerce": "npm:@nextblock-cms/ecom@^0.15.0",
32
+ "@nextblock-cms/utils": "^0.15.0",
33
33
  "ai": "^6.0.170",
34
34
  "zod": "^4.3.6"
35
35
  },