@nextblock-cms/cortex 0.14.5 → 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.
- package/index.cjs.js +1 -1
- package/index.d.ts +3 -0
- package/index.es.js +190 -138
- package/lib/ai-global-agent-content-ops-tools.cjs.js +1 -0
- package/lib/ai-global-agent-content-ops-tools.d.ts +175 -0
- package/lib/ai-global-agent-content-ops-tools.es.js +211 -0
- package/lib/ai-global-agent-custom-block-tools.cjs.js +1 -1
- package/lib/ai-global-agent-custom-block-tools.es.js +69 -59
- package/lib/ai-global-agent-db-tools.cjs.js +1 -1
- package/lib/ai-global-agent-db-tools.d.ts +8 -8
- package/lib/ai-global-agent-db-tools.es.js +143 -127
- package/lib/ai-global-agent-theming-tools.cjs.js +3 -0
- package/lib/ai-global-agent-theming-tools.d.ts +264 -0
- package/lib/ai-global-agent-theming-tools.es.js +412 -0
- package/lib/ai-global-agent-tools.cjs.js +2 -2
- package/lib/ai-global-agent-tools.d.ts +688 -63
- package/lib/ai-global-agent-tools.es.js +2180 -1758
- package/lib/cortex-widget-schema.cjs.js +1 -1
- package/lib/cortex-widget-schema.d.ts +10 -0
- package/lib/cortex-widget-schema.es.js +1 -1
- package/lib/mcp-server.cjs.js +1 -0
- package/lib/mcp-server.d.ts +76 -0
- package/lib/mcp-server.es.js +157 -0
- package/lib/mcp-tokens.cjs.js +1 -0
- package/lib/mcp-tokens.d.ts +95 -0
- package/lib/mcp-tokens.es.js +104 -0
- package/lib/mcp-tool-registry.cjs.js +4 -0
- package/lib/mcp-tool-registry.d.ts +249 -0
- package/lib/mcp-tool-registry.es.js +315 -0
- package/package.json +4 -4
package/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./lib/ai-block-generation.cjs.js"),n=require("./lib/ai-client.cjs.js"),t=require("./lib/ai-config.cjs.js"),l=require("./lib/ai-cortex-widget-builder.cjs.js"),a=require("./lib/ai-global-agent-custom-block-tools.cjs.js"),i=require("./lib/ai-global-agent-db-tools.cjs.js"),e=require("./lib/ai-global-agent-tools.cjs.js"),c=require("./lib/ai-key-crypto.cjs.js"),s=require("./lib/ai-model-catalog.cjs.js"),o=require("./lib/ai-model-registry.cjs.js"),C=require("./lib/cortex-widget-registry.cjs.js"),r=require("./lib/cortex-widget-schema.cjs.js");require("./lib/zod-config.cjs.js");const m=require("zod");exports.INLINE_HTML_ASSISTANT_SYSTEM_PROMPT=u.INLINE_HTML_ASSISTANT_SYSTEM_PROMPT;exports.generateEditorBlocksRequestSchema=u.generateEditorBlocksRequestSchema;exports.generateEditorHtmlFragment=u.generateEditorHtmlFragment;exports.validateGeneratedEditorHtmlFragment=u.validateGeneratedEditorHtmlFragment;exports.createCortexAiOpenRouterClient=n.createCortexAiOpenRouterClient;exports.createCortexAiOpenRouterProvider=n.createCortexAiOpenRouterProvider;exports.generateCortexAiText=n.generateCortexAiText;exports.getStoredCortexAiModelSelection=n.getStoredCortexAiModelSelection;exports.resolveCortexAiOpenRouterCredential=n.resolveCortexAiOpenRouterCredential;exports.CORTEX_AI_AGENT_SETTINGS_BOUNDS=t.CORTEX_AI_AGENT_SETTINGS_BOUNDS;exports.CORTEX_AI_AGENT_SETTINGS_DEFAULTS=t.CORTEX_AI_AGENT_SETTINGS_DEFAULTS;exports.CORTEX_AI_AGENT_SETTINGS_KEY=t.CORTEX_AI_AGENT_SETTINGS_KEY;exports.CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY=t.CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY;exports.CORTEX_AI_OPENROUTER_SETTING_KEY=t.CORTEX_AI_OPENROUTER_SETTING_KEY;exports.CORTEX_AI_PACKAGE_ID=t.CORTEX_AI_PACKAGE_ID;exports.CORTEX_AI_PACKAGE_NAME=t.CORTEX_AI_PACKAGE_NAME;exports.CORTEX_AI_PEXELS_SETTING_KEY=t.CORTEX_AI_PEXELS_SETTING_KEY;exports.CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY=t.CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY;exports.CORTEX_AI_UNSPLASH_SETTING_KEY=t.CORTEX_AI_UNSPLASH_SETTING_KEY;exports.decryptStoredOpenRouterApiKey=t.decryptStoredOpenRouterApiKey;exports.encryptStoredOpenRouterApiKey=t.encryptStoredOpenRouterApiKey;exports.getCortexAiEnvConfig=t.getCortexAiEnvConfig;exports.getEnvOpenRouterKeyStatus=t.getEnvOpenRouterKeyStatus;exports.getOpenRouterEnvApiKey=t.getOpenRouterEnvApiKey;exports.getPexelsEnvApiKey=t.getPexelsEnvApiKey;exports.getStoredOpenRouterKeyStatus=t.getStoredOpenRouterKeyStatus;exports.getUnsplashEnvApiKey=t.getUnsplashEnvApiKey;exports.normalizeCortexAiAgentSettings=t.normalizeCortexAiAgentSettings;exports.resolveCortexAiAgentSettings=t.resolveCortexAiAgentSettings;exports.generateCortexWidgetDefinition=l.generateCortexWidgetDefinition;exports.createCortexCustomBlockTools=a.createCortexCustomBlockTools;exports.createCustomBlockInputSchema=a.createCustomBlockInputSchema;exports.deleteCustomBlockInputSchema=a.deleteCustomBlockInputSchema;exports.executeCreateCustomBlock=a.executeCreateCustomBlock;exports.executeDeleteCustomBlock=a.executeDeleteCustomBlock;exports.executeListCustomBlocks=a.executeListCustomBlocks;exports.executeUpdateCustomBlock=a.executeUpdateCustomBlock;exports.listCustomBlocksInputSchema=a.listCustomBlocksInputSchema;exports.updateCustomBlockInputSchema=a.updateCustomBlockInputSchema;exports.createCortexDatabaseAgentTools=i.createCortexDatabaseAgentTools;exports.describeDatabaseSchemaInputSchema=i.describeDatabaseSchemaInputSchema;exports.executeDatabaseActionPlan=i.executeDatabaseActionPlan;exports.executeDatabaseActionPlanInputSchema=i.executeDatabaseActionPlanInputSchema;exports.executeDatabaseMutation=i.executeDatabaseMutation;exports.executeDatabaseMutationInputSchema=i.executeDatabaseMutationInputSchema;exports.executeDescribeDatabaseSchema=i.executeDescribeDatabaseSchema;exports.executeReadDatabaseRecords=i.executeReadDatabaseRecords;exports.readDatabaseRecordsInputSchema=i.readDatabaseRecordsInputSchema;exports.availableCortexAiBlockTypes=e.availableCortexAiBlockTypes;exports.buildVisibleContactIntroActionPlan=e.buildVisibleContactIntroActionPlan;exports.cortexAiPageContextSchema=e.cortexAiPageContextSchema;exports.createCmsPageInputSchema=e.createCmsPageInputSchema;exports.createCmsPostInputSchema=e.createCmsPostInputSchema;exports.createCmsProductInputSchema=e.createCmsProductInputSchema;exports.createCortexGlobalAgentTools=e.createCortexGlobalAgentTools;exports.deleteCmsItemInputSchema=e.deleteCmsItemInputSchema;exports.executeCmsActionPlan=e.executeCmsActionPlan;exports.executeCmsActionPlanInputSchema=e.executeCmsActionPlanInputSchema;exports.executeCreateCmsPage=e.executeCreateCmsPage;exports.executeCreateCmsPost=e.executeCreateCmsPost;exports.executeCreateCmsProduct=e.executeCreateCmsProduct;exports.executeDeleteCmsItem=e.executeDeleteCmsItem;exports.executeFetchEcommerceStats=e.executeFetchEcommerceStats;exports.executeFetchUrlContent=e.executeFetchUrlContent;exports.executeInsertContentBlock=e.executeInsertContentBlock;exports.executePrepareDeleteCmsItem=e.executePrepareDeleteCmsItem;exports.executeReadCurrentCmsItem=e.executeReadCurrentCmsItem;exports.executeRewritePageDraft=e.executeRewritePageDraft;exports.executeSearchDocumentation=e.executeSearchDocumentation;exports.executeSearchDocumentationWithTimeout=e.executeSearchDocumentationWithTimeout;exports.executeSearchStockPhotos=e.executeSearchStockPhotos;exports.executeSetContentImages=e.executeSetContentImages;exports.executeTranslatePage=e.executeTranslatePage;exports.executeUpdateCmsItemField=e.executeUpdateCmsItemField;exports.executeUpdateContentBlock=e.executeUpdateContentBlock;exports.executeUpdateCurrentCmsFields=e.executeUpdateCurrentCmsFields;exports.executeUpdateFooter=e.executeUpdateFooter;exports.executeUpdateNavigationBar=e.executeUpdateNavigationBar;exports.executeUpdateSectionColumnBlock=e.executeUpdateSectionColumnBlock;exports.fetchEcommerceStatsInputSchema=e.fetchEcommerceStatsInputSchema;exports.fetchUrlContentInputSchema=e.fetchUrlContentInputSchema;exports.insertContentBlockInputSchema=e.insertContentBlockInputSchema;exports.maybeTriggerStockPhotoDownloads=e.maybeTriggerStockPhotoDownloads;exports.navigationItemInputSchema=e.navigationItemInputSchema;exports.prepareDeleteCmsItemInputSchema=e.prepareDeleteCmsItemInputSchema;exports.readCurrentCmsItemInputSchema=e.readCurrentCmsItemInputSchema;exports.resolveCortexAiStockPhotoProvider=e.resolveCortexAiStockPhotoProvider;exports.resolveCortexAiStockPhotoProviders=e.resolveCortexAiStockPhotoProviders;exports.rewritePageDraftInputSchema=e.rewritePageDraftInputSchema;exports.searchDocumentationInputSchema=e.searchDocumentationInputSchema;exports.searchStockPhotosInputSchema=e.searchStockPhotosInputSchema;exports.setContentImagesInputSchema=e.setContentImagesInputSchema;exports.translatePageInputSchema=e.translatePageInputSchema;exports.updateCmsItemFieldInputSchema=e.updateCmsItemFieldInputSchema;exports.updateContentBlockInputSchema=e.updateContentBlockInputSchema;exports.updateCurrentCmsFieldsInputSchema=e.updateCurrentCmsFieldsInputSchema;exports.updateFooterInputSchema=e.updateFooterInputSchema;exports.updateNavigationBarInputSchema=e.updateNavigationBarInputSchema;exports.updateSectionColumnBlockInputSchema=e.updateSectionColumnBlockInputSchema;exports.CORTEX_AI_KEY_ALGORITHM=c.CORTEX_AI_KEY_ALGORITHM;exports.CORTEX_AI_KEY_ENVELOPE_VERSION=c.CORTEX_AI_KEY_ENVELOPE_VERSION;exports.decryptOpenRouterApiKey=c.decryptOpenRouterApiKey;exports.encryptOpenRouterApiKey=c.encryptOpenRouterApiKey;exports.getMaskedOpenRouterKey=c.getMaskedOpenRouterKey;exports.getOpenRouterKeyEnvelopeStatus=c.getOpenRouterKeyEnvelopeStatus;exports.listCortexAiCompatibleOpenRouterModels=s.listCortexAiCompatibleOpenRouterModels;exports.CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY=o.CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY;exports.CORTEX_AI_MODEL_REGISTRY=o.CORTEX_AI_MODEL_REGISTRY;exports.CORTEX_AI_OPENROUTER_BASE_URL=o.CORTEX_AI_OPENROUTER_BASE_URL;exports.CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL=o.CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL;exports.CORTEX_AI_REQUIRED_MODEL_PARAMETERS=o.CORTEX_AI_REQUIRED_MODEL_PARAMETERS;exports.CortexAiRoutingError=o.CortexAiRoutingError;exports.buildCortexAiModelFallbackChain=o.buildCortexAiModelFallbackChain;exports.buildCortexAiRoutingPolicy=o.buildCortexAiRoutingPolicy;exports.createCortexAiStoredModelSelection=o.createCortexAiStoredModelSelection;exports.filterCortexAiCompatibleOpenRouterModels=o.filterCortexAiCompatibleOpenRouterModels;exports.getHttpStatusCode=o.getHttpStatusCode;exports.isCortexAiFreeModelId=o.isCortexAiFreeModelId;exports.isOpenRouterRateLimitError=o.isOpenRouterRateLimitError;exports.isOpenRouterRecoverableRoutingError=o.isOpenRouterRecoverableRoutingError;exports.omitUnsupportedCortexAiModelOptions=o.omitUnsupportedCortexAiModelOptions;exports.runWithCortexAiModelFallback=o.runWithCortexAiModelFallback;exports.safeParseCortexAiModelSelection=o.safeParseCortexAiModelSelection;exports.summarizeCortexAiRoutingError=o.summarizeCortexAiRoutingError;exports.CORTEX_WIDGET_DEFINITION_SELECT=C.CORTEX_WIDGET_DEFINITION_SELECT;exports.CortexWidgetRegistryInsertError=C.CortexWidgetRegistryInsertError;exports.buildCortexWidgetDefinitionInsertPayload=C.buildCortexWidgetDefinitionInsertPayload;exports.insertCortexWidgetDefinition=C.insertCortexWidgetDefinition;exports.CORTEX_WIDGET_ALLOWED_RELATION_TABLES=r.CORTEX_WIDGET_ALLOWED_RELATION_TABLES;exports.buildCortexProfileCardVerificationDefinition=r.buildCortexProfileCardVerificationDefinition;exports.buildCortexWidgetBuilderPrompt=r.buildCortexWidgetBuilderPrompt;exports.buildCortexWidgetBuilderSystemPrompt=r.buildCortexWidgetBuilderSystemPrompt;exports.cortexWidgetBuildRequestSchema=r.cortexWidgetBuildRequestSchema;exports.cortexWidgetDbRelationFieldSchema=r.cortexWidgetDbRelationFieldSchema;exports.cortexWidgetDefinitionSchema=r.cortexWidgetDefinitionSchema;exports.cortexWidgetFieldSchema=r.cortexWidgetFieldSchema;exports.cortexWidgetImageR2FieldSchema=r.cortexWidgetImageR2FieldSchema;exports.cortexWidgetLayoutNodeSchema=r.cortexWidgetLayoutNodeSchema;exports.cortexWidgetRichTextFieldSchema=r.cortexWidgetRichTextFieldSchema;exports.cortexWidgetTextFieldSchema=r.cortexWidgetTextFieldSchema;exports.validateCortexWidgetDefinitionOutput=r.validateCortexWidgetDefinitionOutput;Object.defineProperty(exports,"z",{enumerable:!0,get:()=>m.z});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./lib/ai-block-generation.cjs.js"),E=require("./lib/ai-client.cjs.js"),t=require("./lib/ai-config.cjs.js"),S=require("./lib/ai-cortex-widget-builder.cjs.js"),n=require("./lib/ai-global-agent-custom-block-tools.cjs.js"),C=require("./lib/ai-global-agent-db-tools.cjs.js"),e=require("./lib/ai-global-agent-tools.cjs.js"),u=require("./lib/ai-key-crypto.cjs.js"),l=require("./lib/ai-model-catalog.cjs.js"),o=require("./lib/ai-model-registry.cjs.js"),s=require("./lib/cortex-widget-registry.cjs.js"),i=require("./lib/cortex-widget-schema.cjs.js"),r=require("./lib/mcp-server.cjs.js"),a=require("./lib/mcp-tokens.cjs.js"),c=require("./lib/mcp-tool-registry.cjs.js");require("./lib/zod-config.cjs.js");const R=require("zod");exports.INLINE_HTML_ASSISTANT_SYSTEM_PROMPT=_.INLINE_HTML_ASSISTANT_SYSTEM_PROMPT;exports.generateEditorBlocksRequestSchema=_.generateEditorBlocksRequestSchema;exports.generateEditorHtmlFragment=_.generateEditorHtmlFragment;exports.validateGeneratedEditorHtmlFragment=_.validateGeneratedEditorHtmlFragment;exports.createCortexAiOpenRouterClient=E.createCortexAiOpenRouterClient;exports.createCortexAiOpenRouterProvider=E.createCortexAiOpenRouterProvider;exports.generateCortexAiText=E.generateCortexAiText;exports.getStoredCortexAiModelSelection=E.getStoredCortexAiModelSelection;exports.resolveCortexAiOpenRouterCredential=E.resolveCortexAiOpenRouterCredential;exports.CORTEX_AI_AGENT_SETTINGS_BOUNDS=t.CORTEX_AI_AGENT_SETTINGS_BOUNDS;exports.CORTEX_AI_AGENT_SETTINGS_DEFAULTS=t.CORTEX_AI_AGENT_SETTINGS_DEFAULTS;exports.CORTEX_AI_AGENT_SETTINGS_KEY=t.CORTEX_AI_AGENT_SETTINGS_KEY;exports.CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY=t.CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY;exports.CORTEX_AI_OPENROUTER_SETTING_KEY=t.CORTEX_AI_OPENROUTER_SETTING_KEY;exports.CORTEX_AI_PACKAGE_ID=t.CORTEX_AI_PACKAGE_ID;exports.CORTEX_AI_PACKAGE_NAME=t.CORTEX_AI_PACKAGE_NAME;exports.CORTEX_AI_PEXELS_SETTING_KEY=t.CORTEX_AI_PEXELS_SETTING_KEY;exports.CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY=t.CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY;exports.CORTEX_AI_UNSPLASH_SETTING_KEY=t.CORTEX_AI_UNSPLASH_SETTING_KEY;exports.decryptStoredOpenRouterApiKey=t.decryptStoredOpenRouterApiKey;exports.encryptStoredOpenRouterApiKey=t.encryptStoredOpenRouterApiKey;exports.getCortexAiEnvConfig=t.getCortexAiEnvConfig;exports.getEnvOpenRouterKeyStatus=t.getEnvOpenRouterKeyStatus;exports.getOpenRouterEnvApiKey=t.getOpenRouterEnvApiKey;exports.getPexelsEnvApiKey=t.getPexelsEnvApiKey;exports.getStoredOpenRouterKeyStatus=t.getStoredOpenRouterKeyStatus;exports.getUnsplashEnvApiKey=t.getUnsplashEnvApiKey;exports.normalizeCortexAiAgentSettings=t.normalizeCortexAiAgentSettings;exports.resolveCortexAiAgentSettings=t.resolveCortexAiAgentSettings;exports.generateCortexWidgetDefinition=S.generateCortexWidgetDefinition;exports.createCortexCustomBlockTools=n.createCortexCustomBlockTools;exports.createCustomBlockInputSchema=n.createCustomBlockInputSchema;exports.deleteCustomBlockInputSchema=n.deleteCustomBlockInputSchema;exports.executeCreateCustomBlock=n.executeCreateCustomBlock;exports.executeDeleteCustomBlock=n.executeDeleteCustomBlock;exports.executeListCustomBlocks=n.executeListCustomBlocks;exports.executeUpdateCustomBlock=n.executeUpdateCustomBlock;exports.listCustomBlocksInputSchema=n.listCustomBlocksInputSchema;exports.updateCustomBlockInputSchema=n.updateCustomBlockInputSchema;exports.createCortexDatabaseAgentTools=C.createCortexDatabaseAgentTools;exports.describeDatabaseSchemaInputSchema=C.describeDatabaseSchemaInputSchema;exports.executeDatabaseActionPlan=C.executeDatabaseActionPlan;exports.executeDatabaseActionPlanInputSchema=C.executeDatabaseActionPlanInputSchema;exports.executeDatabaseMutation=C.executeDatabaseMutation;exports.executeDatabaseMutationInputSchema=C.executeDatabaseMutationInputSchema;exports.executeDescribeDatabaseSchema=C.executeDescribeDatabaseSchema;exports.executeReadDatabaseRecords=C.executeReadDatabaseRecords;exports.readDatabaseRecordsInputSchema=C.readDatabaseRecordsInputSchema;exports.availableCortexAiBlockTypes=e.availableCortexAiBlockTypes;exports.buildVisibleContactIntroActionPlan=e.buildVisibleContactIntroActionPlan;exports.cortexAiPageContextSchema=e.cortexAiPageContextSchema;exports.createCmsPageInputSchema=e.createCmsPageInputSchema;exports.createCmsPostInputSchema=e.createCmsPostInputSchema;exports.createCmsProductInputSchema=e.createCmsProductInputSchema;exports.createCortexGlobalAgentTools=e.createCortexGlobalAgentTools;exports.deleteCmsItemInputSchema=e.deleteCmsItemInputSchema;exports.executeCmsActionPlan=e.executeCmsActionPlan;exports.executeCmsActionPlanInputSchema=e.executeCmsActionPlanInputSchema;exports.executeCreateCmsPage=e.executeCreateCmsPage;exports.executeCreateCmsPost=e.executeCreateCmsPost;exports.executeCreateCmsProduct=e.executeCreateCmsProduct;exports.executeDeleteCmsItem=e.executeDeleteCmsItem;exports.executeFetchEcommerceStats=e.executeFetchEcommerceStats;exports.executeFetchUrlContent=e.executeFetchUrlContent;exports.executeInsertContentBlock=e.executeInsertContentBlock;exports.executeManageProductVariants=e.executeManageProductVariants;exports.executePrepareDeleteCmsItem=e.executePrepareDeleteCmsItem;exports.executePublishContentDraft=e.executePublishContentDraft;exports.executeReadCurrentCmsItem=e.executeReadCurrentCmsItem;exports.executeRewritePageDraft=e.executeRewritePageDraft;exports.executeSearchDocumentation=e.executeSearchDocumentation;exports.executeSearchDocumentationWithTimeout=e.executeSearchDocumentationWithTimeout;exports.executeSearchStockPhotos=e.executeSearchStockPhotos;exports.executeSetContentImages=e.executeSetContentImages;exports.executeTranslateContentBulk=e.executeTranslateContentBulk;exports.executeTranslatePage=e.executeTranslatePage;exports.executeUpdateCmsItemField=e.executeUpdateCmsItemField;exports.executeUpdateContentBlock=e.executeUpdateContentBlock;exports.executeUpdateCurrentCmsFields=e.executeUpdateCurrentCmsFields;exports.executeUpdateFooter=e.executeUpdateFooter;exports.executeUpdateNavigationBar=e.executeUpdateNavigationBar;exports.executeUpdateSectionColumnBlock=e.executeUpdateSectionColumnBlock;exports.fetchEcommerceStatsInputSchema=e.fetchEcommerceStatsInputSchema;exports.fetchUrlContentInputSchema=e.fetchUrlContentInputSchema;exports.insertContentBlockInputSchema=e.insertContentBlockInputSchema;exports.isBlockedFetchHost=e.isBlockedFetchHost;exports.manageProductVariantsInputSchema=e.manageProductVariantsInputSchema;exports.maybeTriggerStockPhotoDownloads=e.maybeTriggerStockPhotoDownloads;exports.navigationItemInputSchema=e.navigationItemInputSchema;exports.prepareDeleteCmsItemInputSchema=e.prepareDeleteCmsItemInputSchema;exports.publishContentDraftInputSchema=e.publishContentDraftInputSchema;exports.readCurrentCmsItemInputSchema=e.readCurrentCmsItemInputSchema;exports.resolveCortexAiStockPhotoProvider=e.resolveCortexAiStockPhotoProvider;exports.resolveCortexAiStockPhotoProviders=e.resolveCortexAiStockPhotoProviders;exports.rewritePageDraftInputSchema=e.rewritePageDraftInputSchema;exports.searchDocumentationInputSchema=e.searchDocumentationInputSchema;exports.searchStockPhotosInputSchema=e.searchStockPhotosInputSchema;exports.setContentImagesInputSchema=e.setContentImagesInputSchema;exports.translateContentBulkInputSchema=e.translateContentBulkInputSchema;exports.translatePageInputSchema=e.translatePageInputSchema;exports.updateCmsItemFieldInputSchema=e.updateCmsItemFieldInputSchema;exports.updateContentBlockInputSchema=e.updateContentBlockInputSchema;exports.updateCurrentCmsFieldsInputSchema=e.updateCurrentCmsFieldsInputSchema;exports.updateFooterInputSchema=e.updateFooterInputSchema;exports.updateNavigationBarInputSchema=e.updateNavigationBarInputSchema;exports.updateSectionColumnBlockInputSchema=e.updateSectionColumnBlockInputSchema;exports.CORTEX_AI_KEY_ALGORITHM=u.CORTEX_AI_KEY_ALGORITHM;exports.CORTEX_AI_KEY_ENVELOPE_VERSION=u.CORTEX_AI_KEY_ENVELOPE_VERSION;exports.decryptOpenRouterApiKey=u.decryptOpenRouterApiKey;exports.encryptOpenRouterApiKey=u.encryptOpenRouterApiKey;exports.getMaskedOpenRouterKey=u.getMaskedOpenRouterKey;exports.getOpenRouterKeyEnvelopeStatus=u.getOpenRouterKeyEnvelopeStatus;exports.listCortexAiCompatibleOpenRouterModels=l.listCortexAiCompatibleOpenRouterModels;exports.CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY=o.CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY;exports.CORTEX_AI_MODEL_REGISTRY=o.CORTEX_AI_MODEL_REGISTRY;exports.CORTEX_AI_OPENROUTER_BASE_URL=o.CORTEX_AI_OPENROUTER_BASE_URL;exports.CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL=o.CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL;exports.CORTEX_AI_REQUIRED_MODEL_PARAMETERS=o.CORTEX_AI_REQUIRED_MODEL_PARAMETERS;exports.CortexAiRoutingError=o.CortexAiRoutingError;exports.buildCortexAiModelFallbackChain=o.buildCortexAiModelFallbackChain;exports.buildCortexAiRoutingPolicy=o.buildCortexAiRoutingPolicy;exports.createCortexAiStoredModelSelection=o.createCortexAiStoredModelSelection;exports.filterCortexAiCompatibleOpenRouterModels=o.filterCortexAiCompatibleOpenRouterModels;exports.getHttpStatusCode=o.getHttpStatusCode;exports.isCortexAiFreeModelId=o.isCortexAiFreeModelId;exports.isOpenRouterRateLimitError=o.isOpenRouterRateLimitError;exports.isOpenRouterRecoverableRoutingError=o.isOpenRouterRecoverableRoutingError;exports.omitUnsupportedCortexAiModelOptions=o.omitUnsupportedCortexAiModelOptions;exports.runWithCortexAiModelFallback=o.runWithCortexAiModelFallback;exports.safeParseCortexAiModelSelection=o.safeParseCortexAiModelSelection;exports.summarizeCortexAiRoutingError=o.summarizeCortexAiRoutingError;exports.CORTEX_WIDGET_DEFINITION_SELECT=s.CORTEX_WIDGET_DEFINITION_SELECT;exports.CortexWidgetRegistryInsertError=s.CortexWidgetRegistryInsertError;exports.buildCortexWidgetDefinitionInsertPayload=s.buildCortexWidgetDefinitionInsertPayload;exports.insertCortexWidgetDefinition=s.insertCortexWidgetDefinition;exports.CORTEX_WIDGET_ALLOWED_RELATION_TABLES=i.CORTEX_WIDGET_ALLOWED_RELATION_TABLES;exports.buildCortexProfileCardVerificationDefinition=i.buildCortexProfileCardVerificationDefinition;exports.buildCortexWidgetBuilderPrompt=i.buildCortexWidgetBuilderPrompt;exports.buildCortexWidgetBuilderSystemPrompt=i.buildCortexWidgetBuilderSystemPrompt;exports.cortexWidgetBuildRequestSchema=i.cortexWidgetBuildRequestSchema;exports.cortexWidgetDbRelationFieldSchema=i.cortexWidgetDbRelationFieldSchema;exports.cortexWidgetDefinitionSchema=i.cortexWidgetDefinitionSchema;exports.cortexWidgetFieldSchema=i.cortexWidgetFieldSchema;exports.cortexWidgetImageR2FieldSchema=i.cortexWidgetImageR2FieldSchema;exports.cortexWidgetLayoutNodeSchema=i.cortexWidgetLayoutNodeSchema;exports.cortexWidgetRichTextFieldSchema=i.cortexWidgetRichTextFieldSchema;exports.cortexWidgetTextFieldSchema=i.cortexWidgetTextFieldSchema;exports.validateCortexWidgetDefinitionOutput=i.validateCortexWidgetDefinitionOutput;exports.CORTEX_MCP_DEFAULT_PROTOCOL_VERSION=r.CORTEX_MCP_DEFAULT_PROTOCOL_VERSION;exports.CORTEX_MCP_LATEST_LEGACY_PROTOCOL_VERSION=r.CORTEX_MCP_LATEST_LEGACY_PROTOCOL_VERSION;exports.CORTEX_MCP_MODERN_PROTOCOL_VERSION=r.CORTEX_MCP_MODERN_PROTOCOL_VERSION;exports.CORTEX_MCP_SERVER_NAME=r.CORTEX_MCP_SERVER_NAME;exports.CORTEX_MCP_SERVER_TITLE=r.CORTEX_MCP_SERVER_TITLE;exports.CORTEX_MCP_SUPPORTED_PROTOCOL_VERSIONS=r.CORTEX_MCP_SUPPORTED_PROTOCOL_VERSIONS;exports.JSON_RPC_INTERNAL_ERROR=r.JSON_RPC_INTERNAL_ERROR;exports.JSON_RPC_INVALID_PARAMS=r.JSON_RPC_INVALID_PARAMS;exports.JSON_RPC_INVALID_REQUEST=r.JSON_RPC_INVALID_REQUEST;exports.JSON_RPC_METHOD_NOT_FOUND=r.JSON_RPC_METHOD_NOT_FOUND;exports.JSON_RPC_PARSE_ERROR=r.JSON_RPC_PARSE_ERROR;exports.handleCortexMcpMessage=r.handleCortexMcpMessage;exports.isJsonRpcNotification=r.isJsonRpcNotification;exports.isModernEraMessage=r.isModernEraMessage;exports.CORTEX_AI_MCP_SCOPES=a.CORTEX_AI_MCP_SCOPES;exports.CORTEX_AI_MCP_SETTINGS_DEFAULTS=a.CORTEX_AI_MCP_SETTINGS_DEFAULTS;exports.CORTEX_AI_MCP_SETTINGS_KEY=a.CORTEX_AI_MCP_SETTINGS_KEY;exports.CORTEX_AI_MCP_TOKENS_TABLE=a.CORTEX_AI_MCP_TOKENS_TABLE;exports.CORTEX_AI_MCP_TOKEN_PREFIX=a.CORTEX_AI_MCP_TOKEN_PREFIX;exports.hashCortexAiMcpToken=a.hashCortexAiMcpToken;exports.isLocalhostHost=a.isLocalhostHost;exports.mintCortexAiMcpToken=a.mintCortexAiMcpToken;exports.normalizeCortexAiMcpSettings=a.normalizeCortexAiMcpSettings;exports.parseBearerToken=a.parseBearerToken;exports.resolveCortexAiMcpSettings=a.resolveCortexAiMcpSettings;exports.shouldTrustLocalMcpRequest=a.shouldTrustLocalMcpRequest;exports.touchCortexAiMcpToken=a.touchCortexAiMcpToken;exports.verifyCortexAiMcpToken=a.verifyCortexAiMcpToken;exports.CORTEX_MCP_PROMPTS=c.CORTEX_MCP_PROMPTS;exports.CORTEX_MCP_RESOURCES=c.CORTEX_MCP_RESOURCES;exports.CORTEX_MCP_TOOL_ALIASES=c.CORTEX_MCP_TOOL_ALIASES;exports.CORTEX_MCP_TOOL_KINDS=c.CORTEX_MCP_TOOL_KINDS;exports.CortexMcpForbiddenToolError=c.CortexMcpForbiddenToolError;exports.CortexMcpUnknownToolError=c.CortexMcpUnknownToolError;exports.assertCortexMcpToolCoverage=c.assertCortexMcpToolCoverage;exports.buildCortexMcpToolDefinitions=c.buildCortexMcpToolDefinitions;exports.callCortexMcpTool=c.callCortexMcpTool;exports.cortexMcpScopesAllow=c.cortexMcpScopesAllow;exports.getCortexMcpPrompt=c.getCortexMcpPrompt;exports.getCortexMcpToolKind=c.getCortexMcpToolKind;exports.readCortexMcpResource=c.readCortexMcpResource;exports.resolveCortexMcpToolName=c.resolveCortexMcpToolName;Object.defineProperty(exports,"z",{enumerable:!0,get:()=>R.z});
|
package/index.d.ts
CHANGED
|
@@ -10,4 +10,7 @@ export * from './lib/ai-model-catalog';
|
|
|
10
10
|
export * from './lib/ai-model-registry';
|
|
11
11
|
export * from './lib/cortex-widget-registry';
|
|
12
12
|
export * from './lib/cortex-widget-schema';
|
|
13
|
+
export * from './lib/mcp-server';
|
|
14
|
+
export * from './lib/mcp-tokens';
|
|
15
|
+
export * from './lib/mcp-tool-registry';
|
|
13
16
|
export * from './lib/zod-config';
|
package/index.es.js
CHANGED
|
@@ -1,158 +1,210 @@
|
|
|
1
|
-
import { INLINE_HTML_ASSISTANT_SYSTEM_PROMPT as r, generateEditorBlocksRequestSchema as a, generateEditorHtmlFragment as c, validateGeneratedEditorHtmlFragment as
|
|
2
|
-
import { createCortexAiOpenRouterClient as
|
|
3
|
-
import { CORTEX_AI_AGENT_SETTINGS_BOUNDS as
|
|
4
|
-
import { generateCortexWidgetDefinition as
|
|
5
|
-
import { createCortexCustomBlockTools as
|
|
6
|
-
import { createCortexDatabaseAgentTools as
|
|
7
|
-
import { availableCortexAiBlockTypes as re, buildVisibleContactIntroActionPlan as ae, cortexAiPageContextSchema as ce, createCmsPageInputSchema as
|
|
8
|
-
import { CORTEX_AI_KEY_ALGORITHM as
|
|
9
|
-
import { listCortexAiCompatibleOpenRouterModels as
|
|
10
|
-
import { CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY as
|
|
11
|
-
import { CORTEX_WIDGET_DEFINITION_SELECT as
|
|
12
|
-
import { CORTEX_WIDGET_ALLOWED_RELATION_TABLES as
|
|
1
|
+
import { INLINE_HTML_ASSISTANT_SYSTEM_PROMPT as r, generateEditorBlocksRequestSchema as a, generateEditorHtmlFragment as c, validateGeneratedEditorHtmlFragment as n } from "./lib/ai-block-generation.es.js";
|
|
2
|
+
import { createCortexAiOpenRouterClient as C, createCortexAiOpenRouterProvider as E, generateCortexAiText as u, getStoredCortexAiModelSelection as _, resolveCortexAiOpenRouterCredential as S } from "./lib/ai-client.es.js";
|
|
3
|
+
import { CORTEX_AI_AGENT_SETTINGS_BOUNDS as m, CORTEX_AI_AGENT_SETTINGS_DEFAULTS as p, CORTEX_AI_AGENT_SETTINGS_KEY as l, CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY as R, CORTEX_AI_OPENROUTER_SETTING_KEY as T, CORTEX_AI_PACKAGE_ID as x, CORTEX_AI_PACKAGE_NAME as O, CORTEX_AI_PEXELS_SETTING_KEY as I, CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY as A, CORTEX_AI_UNSPLASH_SETTING_KEY as d, decryptStoredOpenRouterApiKey as P, encryptStoredOpenRouterApiKey as h, getCortexAiEnvConfig as g, getEnvOpenRouterKeyStatus as M, getOpenRouterEnvApiKey as N, getPexelsEnvApiKey as D, getStoredOpenRouterKeyStatus as L, getUnsplashEnvApiKey as f, normalizeCortexAiAgentSettings as X, resolveCortexAiAgentSettings as k } from "./lib/ai-config.es.js";
|
|
4
|
+
import { generateCortexWidgetDefinition as B } from "./lib/ai-cortex-widget-builder.es.js";
|
|
5
|
+
import { createCortexCustomBlockTools as U, createCustomBlockInputSchema as K, deleteCustomBlockInputSchema as v, executeCreateCustomBlock as y, executeDeleteCustomBlock as G, executeListCustomBlocks as W, executeUpdateCustomBlock as V, listCustomBlocksInputSchema as Y, updateCustomBlockInputSchema as H } from "./lib/ai-global-agent-custom-block-tools.es.js";
|
|
6
|
+
import { createCortexDatabaseAgentTools as w, describeDatabaseSchemaInputSchema as z, executeDatabaseActionPlan as q, executeDatabaseActionPlanInputSchema as Q, executeDatabaseMutation as j, executeDatabaseMutationInputSchema as Z, executeDescribeDatabaseSchema as $, executeReadDatabaseRecords as ee, readDatabaseRecordsInputSchema as te } from "./lib/ai-global-agent-db-tools.es.js";
|
|
7
|
+
import { availableCortexAiBlockTypes as re, buildVisibleContactIntroActionPlan as ae, cortexAiPageContextSchema as ce, createCmsPageInputSchema as ne, createCmsPostInputSchema as ie, createCmsProductInputSchema as Ce, createCortexGlobalAgentTools as Ee, deleteCmsItemInputSchema as ue, executeCmsActionPlan as _e, executeCmsActionPlanInputSchema as Se, executeCreateCmsPage as se, executeCreateCmsPost as me, executeCreateCmsProduct as pe, executeDeleteCmsItem as le, executeFetchEcommerceStats as Re, executeFetchUrlContent as Te, executeInsertContentBlock as xe, executeManageProductVariants as Oe, executePrepareDeleteCmsItem as Ie, executePublishContentDraft as Ae, executeReadCurrentCmsItem as de, executeRewritePageDraft as Pe, executeSearchDocumentation as he, executeSearchDocumentationWithTimeout as ge, executeSearchStockPhotos as Me, executeSetContentImages as Ne, executeTranslateContentBulk as De, executeTranslatePage as Le, executeUpdateCmsItemField as fe, executeUpdateContentBlock as Xe, executeUpdateCurrentCmsFields as ke, executeUpdateFooter as be, executeUpdateNavigationBar as Be, executeUpdateSectionColumnBlock as Fe, fetchEcommerceStatsInputSchema as Ue, fetchUrlContentInputSchema as Ke, insertContentBlockInputSchema as ve, isBlockedFetchHost as ye, manageProductVariantsInputSchema as Ge, maybeTriggerStockPhotoDownloads as We, navigationItemInputSchema as Ve, prepareDeleteCmsItemInputSchema as Ye, publishContentDraftInputSchema as He, readCurrentCmsItemInputSchema as Je, resolveCortexAiStockPhotoProvider as we, resolveCortexAiStockPhotoProviders as ze, rewritePageDraftInputSchema as qe, searchDocumentationInputSchema as Qe, searchStockPhotosInputSchema as je, setContentImagesInputSchema as Ze, translateContentBulkInputSchema as $e, translatePageInputSchema as et, updateCmsItemFieldInputSchema as tt, updateContentBlockInputSchema as ot, updateCurrentCmsFieldsInputSchema as rt, updateFooterInputSchema as at, updateNavigationBarInputSchema as ct, updateSectionColumnBlockInputSchema as nt } from "./lib/ai-global-agent-tools.es.js";
|
|
8
|
+
import { CORTEX_AI_KEY_ALGORITHM as Ct, CORTEX_AI_KEY_ENVELOPE_VERSION as Et, decryptOpenRouterApiKey as ut, encryptOpenRouterApiKey as _t, getMaskedOpenRouterKey as St, getOpenRouterKeyEnvelopeStatus as st } from "./lib/ai-key-crypto.es.js";
|
|
9
|
+
import { listCortexAiCompatibleOpenRouterModels as pt } from "./lib/ai-model-catalog.es.js";
|
|
10
|
+
import { CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY as Rt, CORTEX_AI_MODEL_REGISTRY as Tt, CORTEX_AI_OPENROUTER_BASE_URL as xt, CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL as Ot, CORTEX_AI_REQUIRED_MODEL_PARAMETERS as It, CortexAiRoutingError as At, buildCortexAiModelFallbackChain as dt, buildCortexAiRoutingPolicy as Pt, createCortexAiStoredModelSelection as ht, filterCortexAiCompatibleOpenRouterModels as gt, getHttpStatusCode as Mt, isCortexAiFreeModelId as Nt, isOpenRouterRateLimitError as Dt, isOpenRouterRecoverableRoutingError as Lt, omitUnsupportedCortexAiModelOptions as ft, runWithCortexAiModelFallback as Xt, safeParseCortexAiModelSelection as kt, summarizeCortexAiRoutingError as bt } from "./lib/ai-model-registry.es.js";
|
|
11
|
+
import { CORTEX_WIDGET_DEFINITION_SELECT as Ft, CortexWidgetRegistryInsertError as Ut, buildCortexWidgetDefinitionInsertPayload as Kt, insertCortexWidgetDefinition as vt } from "./lib/cortex-widget-registry.es.js";
|
|
12
|
+
import { CORTEX_WIDGET_ALLOWED_RELATION_TABLES as Gt, buildCortexProfileCardVerificationDefinition as Wt, buildCortexWidgetBuilderPrompt as Vt, buildCortexWidgetBuilderSystemPrompt as Yt, cortexWidgetBuildRequestSchema as Ht, cortexWidgetDbRelationFieldSchema as Jt, cortexWidgetDefinitionSchema as wt, cortexWidgetFieldSchema as zt, cortexWidgetImageR2FieldSchema as qt, cortexWidgetLayoutNodeSchema as Qt, cortexWidgetRichTextFieldSchema as jt, cortexWidgetTextFieldSchema as Zt, validateCortexWidgetDefinitionOutput as $t } from "./lib/cortex-widget-schema.es.js";
|
|
13
|
+
import { CORTEX_MCP_DEFAULT_PROTOCOL_VERSION as to, CORTEX_MCP_LATEST_LEGACY_PROTOCOL_VERSION as oo, CORTEX_MCP_MODERN_PROTOCOL_VERSION as ro, CORTEX_MCP_SERVER_NAME as ao, CORTEX_MCP_SERVER_TITLE as co, CORTEX_MCP_SUPPORTED_PROTOCOL_VERSIONS as no, JSON_RPC_INTERNAL_ERROR as io, JSON_RPC_INVALID_PARAMS as Co, JSON_RPC_INVALID_REQUEST as Eo, JSON_RPC_METHOD_NOT_FOUND as uo, JSON_RPC_PARSE_ERROR as _o, handleCortexMcpMessage as So, isJsonRpcNotification as so, isModernEraMessage as mo } from "./lib/mcp-server.es.js";
|
|
14
|
+
import { CORTEX_AI_MCP_SCOPES as lo, CORTEX_AI_MCP_SETTINGS_DEFAULTS as Ro, CORTEX_AI_MCP_SETTINGS_KEY as To, CORTEX_AI_MCP_TOKENS_TABLE as xo, CORTEX_AI_MCP_TOKEN_PREFIX as Oo, hashCortexAiMcpToken as Io, isLocalhostHost as Ao, mintCortexAiMcpToken as Po, normalizeCortexAiMcpSettings as ho, parseBearerToken as go, resolveCortexAiMcpSettings as Mo, shouldTrustLocalMcpRequest as No, touchCortexAiMcpToken as Do, verifyCortexAiMcpToken as Lo } from "./lib/mcp-tokens.es.js";
|
|
15
|
+
import { CORTEX_MCP_PROMPTS as Xo, CORTEX_MCP_RESOURCES as ko, CORTEX_MCP_TOOL_ALIASES as bo, CORTEX_MCP_TOOL_KINDS as Bo, CortexMcpForbiddenToolError as Fo, CortexMcpUnknownToolError as Uo, assertCortexMcpToolCoverage as Ko, buildCortexMcpToolDefinitions as vo, callCortexMcpTool as yo, cortexMcpScopesAllow as Go, getCortexMcpPrompt as Wo, getCortexMcpToolKind as Vo, readCortexMcpResource as Yo, resolveCortexMcpToolName as Ho } from "./lib/mcp-tool-registry.es.js";
|
|
13
16
|
import "./lib/zod-config.es.js";
|
|
14
|
-
import { z as
|
|
17
|
+
import { z as wo } from "zod";
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
m as CORTEX_AI_AGENT_SETTINGS_BOUNDS,
|
|
17
20
|
p as CORTEX_AI_AGENT_SETTINGS_DEFAULTS,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
T as
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
l as CORTEX_AI_AGENT_SETTINGS_KEY,
|
|
22
|
+
Rt as CORTEX_AI_FREE_MODEL_FALLBACK_REGISTRY,
|
|
23
|
+
Ct as CORTEX_AI_KEY_ALGORITHM,
|
|
24
|
+
Et as CORTEX_AI_KEY_ENVELOPE_VERSION,
|
|
25
|
+
lo as CORTEX_AI_MCP_SCOPES,
|
|
26
|
+
Ro as CORTEX_AI_MCP_SETTINGS_DEFAULTS,
|
|
27
|
+
To as CORTEX_AI_MCP_SETTINGS_KEY,
|
|
28
|
+
xo as CORTEX_AI_MCP_TOKENS_TABLE,
|
|
29
|
+
Oo as CORTEX_AI_MCP_TOKEN_PREFIX,
|
|
30
|
+
Tt as CORTEX_AI_MODEL_REGISTRY,
|
|
31
|
+
xt as CORTEX_AI_OPENROUTER_BASE_URL,
|
|
32
|
+
Ot as CORTEX_AI_OPENROUTER_FREE_ROUTER_MODEL,
|
|
33
|
+
R as CORTEX_AI_OPENROUTER_MODEL_SELECTION_SETTING_KEY,
|
|
34
|
+
T as CORTEX_AI_OPENROUTER_SETTING_KEY,
|
|
35
|
+
x as CORTEX_AI_PACKAGE_ID,
|
|
36
|
+
O as CORTEX_AI_PACKAGE_NAME,
|
|
37
|
+
I as CORTEX_AI_PEXELS_SETTING_KEY,
|
|
38
|
+
It as CORTEX_AI_REQUIRED_MODEL_PARAMETERS,
|
|
39
|
+
A as CORTEX_AI_UNSPLASH_APP_NAME_SETTING_KEY,
|
|
40
|
+
d as CORTEX_AI_UNSPLASH_SETTING_KEY,
|
|
41
|
+
to as CORTEX_MCP_DEFAULT_PROTOCOL_VERSION,
|
|
42
|
+
oo as CORTEX_MCP_LATEST_LEGACY_PROTOCOL_VERSION,
|
|
43
|
+
ro as CORTEX_MCP_MODERN_PROTOCOL_VERSION,
|
|
44
|
+
Xo as CORTEX_MCP_PROMPTS,
|
|
45
|
+
ko as CORTEX_MCP_RESOURCES,
|
|
46
|
+
ao as CORTEX_MCP_SERVER_NAME,
|
|
47
|
+
co as CORTEX_MCP_SERVER_TITLE,
|
|
48
|
+
no as CORTEX_MCP_SUPPORTED_PROTOCOL_VERSIONS,
|
|
49
|
+
bo as CORTEX_MCP_TOOL_ALIASES,
|
|
50
|
+
Bo as CORTEX_MCP_TOOL_KINDS,
|
|
51
|
+
Gt as CORTEX_WIDGET_ALLOWED_RELATION_TABLES,
|
|
52
|
+
Ft as CORTEX_WIDGET_DEFINITION_SELECT,
|
|
53
|
+
At as CortexAiRoutingError,
|
|
54
|
+
Fo as CortexMcpForbiddenToolError,
|
|
55
|
+
Uo as CortexMcpUnknownToolError,
|
|
56
|
+
Ut as CortexWidgetRegistryInsertError,
|
|
37
57
|
r as INLINE_HTML_ASSISTANT_SYSTEM_PROMPT,
|
|
58
|
+
io as JSON_RPC_INTERNAL_ERROR,
|
|
59
|
+
Co as JSON_RPC_INVALID_PARAMS,
|
|
60
|
+
Eo as JSON_RPC_INVALID_REQUEST,
|
|
61
|
+
uo as JSON_RPC_METHOD_NOT_FOUND,
|
|
62
|
+
_o as JSON_RPC_PARSE_ERROR,
|
|
63
|
+
Ko as assertCortexMcpToolCoverage,
|
|
38
64
|
re as availableCortexAiBlockTypes,
|
|
39
65
|
dt as buildCortexAiModelFallbackChain,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
66
|
+
Pt as buildCortexAiRoutingPolicy,
|
|
67
|
+
vo as buildCortexMcpToolDefinitions,
|
|
68
|
+
Wt as buildCortexProfileCardVerificationDefinition,
|
|
69
|
+
Vt as buildCortexWidgetBuilderPrompt,
|
|
70
|
+
Yt as buildCortexWidgetBuilderSystemPrompt,
|
|
71
|
+
Kt as buildCortexWidgetDefinitionInsertPayload,
|
|
45
72
|
ae as buildVisibleContactIntroActionPlan,
|
|
73
|
+
yo as callCortexMcpTool,
|
|
46
74
|
ce as cortexAiPageContextSchema,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ne as
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
Go as cortexMcpScopesAllow,
|
|
76
|
+
Ht as cortexWidgetBuildRequestSchema,
|
|
77
|
+
Jt as cortexWidgetDbRelationFieldSchema,
|
|
78
|
+
wt as cortexWidgetDefinitionSchema,
|
|
79
|
+
zt as cortexWidgetFieldSchema,
|
|
80
|
+
qt as cortexWidgetImageR2FieldSchema,
|
|
81
|
+
Qt as cortexWidgetLayoutNodeSchema,
|
|
82
|
+
jt as cortexWidgetRichTextFieldSchema,
|
|
83
|
+
Zt as cortexWidgetTextFieldSchema,
|
|
84
|
+
ne as createCmsPageInputSchema,
|
|
85
|
+
ie as createCmsPostInputSchema,
|
|
86
|
+
Ce as createCmsProductInputSchema,
|
|
87
|
+
C as createCortexAiOpenRouterClient,
|
|
88
|
+
E as createCortexAiOpenRouterProvider,
|
|
89
|
+
ht as createCortexAiStoredModelSelection,
|
|
90
|
+
U as createCortexCustomBlockTools,
|
|
91
|
+
w as createCortexDatabaseAgentTools,
|
|
92
|
+
Ee as createCortexGlobalAgentTools,
|
|
93
|
+
K as createCustomBlockInputSchema,
|
|
94
|
+
ut as decryptOpenRouterApiKey,
|
|
95
|
+
P as decryptStoredOpenRouterApiKey,
|
|
96
|
+
ue as deleteCmsItemInputSchema,
|
|
68
97
|
v as deleteCustomBlockInputSchema,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
z as describeDatabaseSchemaInputSchema,
|
|
99
|
+
_t as encryptOpenRouterApiKey,
|
|
100
|
+
h as encryptStoredOpenRouterApiKey,
|
|
101
|
+
_e as executeCmsActionPlan,
|
|
102
|
+
Se as executeCmsActionPlanInputSchema,
|
|
74
103
|
se as executeCreateCmsPage,
|
|
75
|
-
|
|
104
|
+
me as executeCreateCmsPost,
|
|
76
105
|
pe as executeCreateCmsProduct,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
106
|
+
y as executeCreateCustomBlock,
|
|
107
|
+
q as executeDatabaseActionPlan,
|
|
108
|
+
Q as executeDatabaseActionPlanInputSchema,
|
|
109
|
+
j as executeDatabaseMutation,
|
|
81
110
|
Z as executeDatabaseMutationInputSchema,
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
le as executeDeleteCmsItem,
|
|
112
|
+
G as executeDeleteCustomBlock,
|
|
84
113
|
$ as executeDescribeDatabaseSchema,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
114
|
+
Re as executeFetchEcommerceStats,
|
|
115
|
+
Te as executeFetchUrlContent,
|
|
116
|
+
xe as executeInsertContentBlock,
|
|
117
|
+
W as executeListCustomBlocks,
|
|
118
|
+
Oe as executeManageProductVariants,
|
|
119
|
+
Ie as executePrepareDeleteCmsItem,
|
|
120
|
+
Ae as executePublishContentDraft,
|
|
121
|
+
de as executeReadCurrentCmsItem,
|
|
91
122
|
ee as executeReadDatabaseRecords,
|
|
92
|
-
|
|
123
|
+
Pe as executeRewritePageDraft,
|
|
93
124
|
he as executeSearchDocumentation,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
De as
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
125
|
+
ge as executeSearchDocumentationWithTimeout,
|
|
126
|
+
Me as executeSearchStockPhotos,
|
|
127
|
+
Ne as executeSetContentImages,
|
|
128
|
+
De as executeTranslateContentBulk,
|
|
129
|
+
Le as executeTranslatePage,
|
|
130
|
+
fe as executeUpdateCmsItemField,
|
|
131
|
+
Xe as executeUpdateContentBlock,
|
|
132
|
+
ke as executeUpdateCurrentCmsFields,
|
|
133
|
+
V as executeUpdateCustomBlock,
|
|
134
|
+
be as executeUpdateFooter,
|
|
135
|
+
Be as executeUpdateNavigationBar,
|
|
136
|
+
Fe as executeUpdateSectionColumnBlock,
|
|
137
|
+
Ue as fetchEcommerceStatsInputSchema,
|
|
138
|
+
Ke as fetchUrlContentInputSchema,
|
|
139
|
+
gt as filterCortexAiCompatibleOpenRouterModels,
|
|
140
|
+
u as generateCortexAiText,
|
|
141
|
+
B as generateCortexWidgetDefinition,
|
|
110
142
|
a as generateEditorBlocksRequestSchema,
|
|
111
143
|
c as generateEditorHtmlFragment,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
144
|
+
g as getCortexAiEnvConfig,
|
|
145
|
+
Wo as getCortexMcpPrompt,
|
|
146
|
+
Vo as getCortexMcpToolKind,
|
|
147
|
+
M as getEnvOpenRouterKeyStatus,
|
|
148
|
+
Mt as getHttpStatusCode,
|
|
149
|
+
St as getMaskedOpenRouterKey,
|
|
116
150
|
N as getOpenRouterEnvApiKey,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
151
|
+
st as getOpenRouterKeyEnvelopeStatus,
|
|
152
|
+
D as getPexelsEnvApiKey,
|
|
153
|
+
_ as getStoredCortexAiModelSelection,
|
|
154
|
+
L as getStoredOpenRouterKeyStatus,
|
|
155
|
+
f as getUnsplashEnvApiKey,
|
|
156
|
+
So as handleCortexMcpMessage,
|
|
157
|
+
Io as hashCortexAiMcpToken,
|
|
158
|
+
ve as insertContentBlockInputSchema,
|
|
159
|
+
vt as insertCortexWidgetDefinition,
|
|
160
|
+
ye as isBlockedFetchHost,
|
|
161
|
+
Nt as isCortexAiFreeModelId,
|
|
162
|
+
so as isJsonRpcNotification,
|
|
163
|
+
Ao as isLocalhostHost,
|
|
164
|
+
mo as isModernEraMessage,
|
|
165
|
+
Dt as isOpenRouterRateLimitError,
|
|
166
|
+
Lt as isOpenRouterRecoverableRoutingError,
|
|
167
|
+
pt as listCortexAiCompatibleOpenRouterModels,
|
|
168
|
+
Y as listCustomBlocksInputSchema,
|
|
169
|
+
Ge as manageProductVariantsInputSchema,
|
|
170
|
+
We as maybeTriggerStockPhotoDownloads,
|
|
171
|
+
Po as mintCortexAiMcpToken,
|
|
172
|
+
Ve as navigationItemInputSchema,
|
|
173
|
+
X as normalizeCortexAiAgentSettings,
|
|
174
|
+
ho as normalizeCortexAiMcpSettings,
|
|
175
|
+
ft as omitUnsupportedCortexAiModelOptions,
|
|
176
|
+
go as parseBearerToken,
|
|
177
|
+
Ye as prepareDeleteCmsItemInputSchema,
|
|
178
|
+
He as publishContentDraftInputSchema,
|
|
179
|
+
Yo as readCortexMcpResource,
|
|
180
|
+
Je as readCurrentCmsItemInputSchema,
|
|
135
181
|
te as readDatabaseRecordsInputSchema,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
182
|
+
k as resolveCortexAiAgentSettings,
|
|
183
|
+
Mo as resolveCortexAiMcpSettings,
|
|
184
|
+
S as resolveCortexAiOpenRouterCredential,
|
|
185
|
+
we as resolveCortexAiStockPhotoProvider,
|
|
186
|
+
ze as resolveCortexAiStockPhotoProviders,
|
|
187
|
+
Ho as resolveCortexMcpToolName,
|
|
188
|
+
qe as rewritePageDraftInputSchema,
|
|
189
|
+
Xt as runWithCortexAiModelFallback,
|
|
190
|
+
kt as safeParseCortexAiModelSelection,
|
|
191
|
+
Qe as searchDocumentationInputSchema,
|
|
192
|
+
je as searchStockPhotosInputSchema,
|
|
193
|
+
Ze as setContentImagesInputSchema,
|
|
194
|
+
No as shouldTrustLocalMcpRequest,
|
|
195
|
+
bt as summarizeCortexAiRoutingError,
|
|
196
|
+
Do as touchCortexAiMcpToken,
|
|
197
|
+
$e as translateContentBulkInputSchema,
|
|
198
|
+
et as translatePageInputSchema,
|
|
199
|
+
tt as updateCmsItemFieldInputSchema,
|
|
200
|
+
ot as updateContentBlockInputSchema,
|
|
201
|
+
rt as updateCurrentCmsFieldsInputSchema,
|
|
202
|
+
H as updateCustomBlockInputSchema,
|
|
203
|
+
at as updateFooterInputSchema,
|
|
204
|
+
ct as updateNavigationBarInputSchema,
|
|
205
|
+
nt as updateSectionColumnBlockInputSchema,
|
|
206
|
+
$t as validateCortexWidgetDefinitionOutput,
|
|
207
|
+
n as validateGeneratedEditorHtmlFragment,
|
|
208
|
+
Lo as verifyCortexAiMcpToken,
|
|
209
|
+
wo as z
|
|
158
210
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("ai");require("./zod-config.cjs.js");const r=require("zod"),v="id, file_name, object_key, file_type, width, height, description, folder, created_at";function f(e){if(!e?.supabase)throw new Error("No database connection is available for this tool.");return e.supabase}function c(e){return e?e instanceof Error?e.message:typeof e=="object"&&"message"in e?String(e.message):String(e):"unknown error"}function S(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80)}const y=r.z.strictObject({limit:r.z.number().int().min(1).max(100).default(30),query:r.z.string().trim().max(120).optional().describe('Filter on file name or alt text, e.g. "wormwood" or "laboratory".')}),b=r.z.strictObject({altText:r.z.string().trim().max(300).optional().describe("Alt text describing the image. Write real alt text — it is what screen readers announce and what search engines index."),url:r.z.string().trim().min(1).max(2048).describe("Public https URL of the image to bring into the media library.")});async function z(e,i){const t=y.parse(e);let a=f(i).from("media").select(v).order("created_at",{ascending:!1}).limit(t.limit);if(t.query){const s=`%${t.query}%`;a=a.or(`file_name.ilike.${s},description.ilike.${s}`)}const{data:d,error:l}=await a;if(l)throw new Error(`Could not read the media library: ${c(l)}`);return{count:(d??[]).length,media:d??[],success:!0}}async function $(e,i){const t=b.parse(e),o=i?.importExternalImage;if(!o)throw new Error("Media import is not available on this connection.");const a=await o({...t.altText?{altText:t.altText}:{},url:t.url});if("error"in a)throw new Error(`Could not import that image: ${a.error}`);return{mediaId:a.id,mutationExecuted:!0,success:!0}}const x=r.z.strictObject({code:r.z.string().trim().min(2).max(10).describe('Locale code, e.g. "fr", "es", "de". Re-using an existing code updates that language.'),is_active:r.z.boolean().default(!0).describe("Inactive languages are hidden from the public switcher."),is_default:r.z.boolean().default(!1).describe("Make this the site default. Only one language can be default; setting it clears the others."),name:r.z.string().trim().min(1).max(80).describe('Display name, e.g. "Français".')});async function I(e,i){const t=x.parse(e),o=f(i),a=t.code.toLowerCase(),{data:d}=await o.from("languages").select("id, code").eq("code",a).maybeSingle(),l={code:a,is_active:t.is_active,name:t.name};let s=d?.id;if(s){const{error:u}=await o.from("languages").update(l).eq("id",s);if(u)throw new Error(`Could not update the "${a}" language: ${c(u)}`)}else{const{data:u,error:n}=await o.from("languages").insert(l).select("id").single();if(n||!u?.id)throw new Error(`Could not create the "${a}" language: ${c(n)}`);s=u.id}if(t.is_default){const{error:u}=await o.from("languages").update({is_default:!1}).neq("id",s);if(u)throw new Error(`Could not clear the previous default language: ${c(u)}`);const{error:n}=await o.from("languages").update({is_default:!0}).eq("id",s);if(n)throw new Error(`Could not set the default language: ${c(n)}`)}try{i?.revalidatePath?.("/","layout")}catch{}return{code:a,created:!d,languageId:s,mutationExecuted:!0,success:!0}}const _=r.z.strictObject({action:r.z.enum(["upsert","delete"]).default("upsert"),description:r.z.string().max(1e3).nullable().optional(),name:r.z.string().trim().min(1).max(120).describe('Category name, e.g. "Digestive Health".'),name_translations:r.z.record(r.z.string(),r.z.string()).optional().describe('Translated names keyed by locale code, e.g. { "fr": "Santé digestive" }.'),productSlugs:r.z.array(r.z.string().trim().min(1).max(300)).max(100).optional().describe("Product slugs to place in this category. Replaces the category's current membership."),slug:r.z.string().trim().min(1).max(120).optional().describe("URL slug. Derived from the name when omitted. Re-using a slug updates that category.")});async function L(e,i){const t=_.parse(e),o=f(i),a=t.slug?S(t.slug):S(t.name),{data:d}=await o.from("categories").select("id, name, slug").eq("slug",a).maybeSingle();if(t.action==="delete"){if(!d?.id)return{message:`No category with slug "${a}".`,mutationExecuted:!1,success:!1};const{error:n}=await o.from("categories").delete().eq("id",d.id);if(n)throw new Error(`Could not delete the category: ${c(n)}`);return{action:"delete",mutationExecuted:!0,slug:a,success:!0}}const l={name:t.name,slug:a,...t.description!==void 0?{description:t.description}:{},...t.name_translations?{name_translations:t.name_translations}:{}};let s=d?.id;if(s){const{error:n}=await o.from("categories").update(l).eq("id",s);if(n)throw new Error(`Could not update the category: ${c(n)}`)}else{const{data:n,error:g}=await o.from("categories").insert(l).select("id").single();if(g||!n?.id)throw new Error(`Could not create the category: ${c(g)}`);s=n.id}let u=0;if(t.productSlugs){const{data:n,error:g}=await o.from("products").select("id, slug").in("slug",t.productSlugs);if(g)throw new Error(`Could not resolve those products: ${c(g)}`);const p=n??[],C=t.productSlugs.filter(h=>!p.some(w=>w.slug===h));if(C.length>0)throw new Error(`No product found for slug(s): ${C.join(", ")}.`);const{error:E}=await o.from("product_categories").delete().eq("category_id",s);if(E)throw new Error(`Could not clear the category's products: ${c(E)}`);if(p.length>0){const{error:h}=await o.from("product_categories").insert(p.map(w=>({category_id:s,product_id:w.id})));if(h)throw new Error(`Could not add products to the category: ${c(h)}`);u=p.length}}return{categoryId:s,created:!d,linkedProducts:u,mutationExecuted:!0,slug:a,success:!0}}const M=r.z.strictObject({});async function q(e,i){const t=f(i),{data:o,error:a}=await t.from("categories").select("id, name, slug, description, name_translations").order("name");if(a)throw new Error(`Could not read the categories: ${c(a)}`);return{categories:o??[],count:(o??[]).length,success:!0}}function P(e){return{list_media:m.tool({description:"Browse the media library: file names, alt text, dimensions, and media ids. Read-only. Call this BEFORE importing an image so you reuse what is already stored instead of creating a duplicate — the returned `id` can be passed anywhere a media id or image reference is accepted (feature_image_id, product images, an image block).",execute:i=>z(i,e),inputSchema:y,strict:!0}),list_product_categories:m.tool({description:"List the product categories, with their slugs and translated names. Read-only. Use before creating one so an existing category is reused, and to get ids for a product_grid block filtered by category.",execute:i=>q(i,e),inputSchema:M,strict:!0}),manage_language:m.tool({description:"Add or update a site language, so the CMS can hold content in that locale. Creating the language is the FIRST step of making a site multilingual — translate_page cannot target a locale that does not exist yet. Re-using a code updates that language; set is_default to change the site default.",execute:i=>I(i,e),inputSchema:x,strict:!0}),manage_product_category:m.tool({description:"Create, update, or delete a product category, and optionally set exactly which products belong to it by slug. Categories are what a product_grid block filters on, so create these before building a shop page that shows one section of the catalogue. Passing productSlugs REPLACES the category's membership.",execute:i=>L(i,e),inputSchema:_,strict:!0}),upload_media:m.tool({description:"Import an image from a public https URL into the media library and return its media id, without attaching it to anything. Useful when you want one asset reused across several places — otherwise passing the URL straight to create_cms_product `images` or a page/post `feature_image_id` imports it in the same call. Check list_media first to avoid duplicates.",execute:i=>$(i,e),inputSchema:b,strict:!0})}}exports.createCortexContentOpsTools=P;exports.executeListMedia=z;exports.executeListProductCategories=q;exports.executeManageLanguage=I;exports.executeManageProductCategory=L;exports.executeUploadMedia=$;exports.listMediaInputSchema=y;exports.listProductCategoriesInputSchema=M;exports.manageLanguageInputSchema=x;exports.manageProductCategoryInputSchema=_;exports.uploadMediaInputSchema=b;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { z } from './zod-config';
|
|
2
|
+
/**
|
|
3
|
+
* The pieces a site needs before content can be built on top of it: media,
|
|
4
|
+
* locales, and product categories.
|
|
5
|
+
*
|
|
6
|
+
* Each of these existed in the CMS but had no tool, which made them hard floors on
|
|
7
|
+
* what could be produced in one pass — an agent could not reuse an image it had
|
|
8
|
+
* already imported, could not add a second language, and could not create the
|
|
9
|
+
* category a product grid filters by.
|
|
10
|
+
*/
|
|
11
|
+
type ContentOpsToolContext = {
|
|
12
|
+
actorFromOrphanedToken?: boolean;
|
|
13
|
+
actorUserId?: string | null;
|
|
14
|
+
importExternalImage?: (input: {
|
|
15
|
+
altText?: string;
|
|
16
|
+
url: string;
|
|
17
|
+
}) => Promise<{
|
|
18
|
+
id: string;
|
|
19
|
+
} | {
|
|
20
|
+
error: string;
|
|
21
|
+
}>;
|
|
22
|
+
latestUserMessage?: string | null;
|
|
23
|
+
revalidatePath?: (path: string, type?: 'layout' | 'page') => void;
|
|
24
|
+
skipConfirmation?: boolean;
|
|
25
|
+
supabase?: {
|
|
26
|
+
from: (table: string) => any;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const listMediaInputSchema: z.ZodObject<{
|
|
30
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
31
|
+
query: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const uploadMediaInputSchema: z.ZodObject<{
|
|
34
|
+
altText: z.ZodOptional<z.ZodString>;
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export declare function executeListMedia(input: z.infer<typeof listMediaInputSchema>, context?: ContentOpsToolContext): Promise<{
|
|
38
|
+
count: any;
|
|
39
|
+
media: any;
|
|
40
|
+
success: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function executeUploadMedia(input: z.infer<typeof uploadMediaInputSchema>, context?: ContentOpsToolContext): Promise<{
|
|
43
|
+
mediaId: string;
|
|
44
|
+
mutationExecuted: boolean;
|
|
45
|
+
success: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const manageLanguageInputSchema: z.ZodObject<{
|
|
48
|
+
code: z.ZodString;
|
|
49
|
+
is_active: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
is_default: z.ZodDefault<z.ZodBoolean>;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export declare function executeManageLanguage(input: z.infer<typeof manageLanguageInputSchema>, context?: ContentOpsToolContext): Promise<{
|
|
54
|
+
code: string;
|
|
55
|
+
created: boolean;
|
|
56
|
+
languageId: number;
|
|
57
|
+
mutationExecuted: boolean;
|
|
58
|
+
success: boolean;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const manageProductCategoryInputSchema: z.ZodObject<{
|
|
61
|
+
action: z.ZodDefault<z.ZodEnum<{
|
|
62
|
+
delete: "delete";
|
|
63
|
+
upsert: "upsert";
|
|
64
|
+
}>>;
|
|
65
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
name_translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
68
|
+
productSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
export declare function executeManageProductCategory(input: z.infer<typeof manageProductCategoryInputSchema>, context?: ContentOpsToolContext): Promise<{
|
|
72
|
+
message: string;
|
|
73
|
+
mutationExecuted: boolean;
|
|
74
|
+
success: boolean;
|
|
75
|
+
action?: undefined;
|
|
76
|
+
slug?: undefined;
|
|
77
|
+
categoryId?: undefined;
|
|
78
|
+
created?: undefined;
|
|
79
|
+
linkedProducts?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
action: string;
|
|
82
|
+
mutationExecuted: boolean;
|
|
83
|
+
slug: string;
|
|
84
|
+
success: boolean;
|
|
85
|
+
message?: undefined;
|
|
86
|
+
categoryId?: undefined;
|
|
87
|
+
created?: undefined;
|
|
88
|
+
linkedProducts?: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
categoryId: string;
|
|
91
|
+
created: boolean;
|
|
92
|
+
linkedProducts: number;
|
|
93
|
+
mutationExecuted: boolean;
|
|
94
|
+
slug: string;
|
|
95
|
+
success: boolean;
|
|
96
|
+
message?: undefined;
|
|
97
|
+
action?: undefined;
|
|
98
|
+
}>;
|
|
99
|
+
export declare const listProductCategoriesInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
100
|
+
export declare function executeListProductCategories(_input: unknown, context?: ContentOpsToolContext): Promise<{
|
|
101
|
+
categories: any;
|
|
102
|
+
count: any;
|
|
103
|
+
success: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
export declare function createCortexContentOpsTools(context?: ContentOpsToolContext): {
|
|
106
|
+
list_media: import('ai').Tool<{
|
|
107
|
+
limit: number;
|
|
108
|
+
query?: string | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
count: any;
|
|
111
|
+
media: any;
|
|
112
|
+
success: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
list_product_categories: import('ai').Tool<Record<string, never>, {
|
|
115
|
+
categories: any;
|
|
116
|
+
count: any;
|
|
117
|
+
success: boolean;
|
|
118
|
+
}>;
|
|
119
|
+
manage_language: import('ai').Tool<{
|
|
120
|
+
code: string;
|
|
121
|
+
is_active: boolean;
|
|
122
|
+
is_default: boolean;
|
|
123
|
+
name: string;
|
|
124
|
+
}, {
|
|
125
|
+
code: string;
|
|
126
|
+
created: boolean;
|
|
127
|
+
languageId: number;
|
|
128
|
+
mutationExecuted: boolean;
|
|
129
|
+
success: boolean;
|
|
130
|
+
}>;
|
|
131
|
+
manage_product_category: import('ai').Tool<{
|
|
132
|
+
action: "delete" | "upsert";
|
|
133
|
+
name: string;
|
|
134
|
+
description?: string | null | undefined;
|
|
135
|
+
name_translations?: Record<string, string> | undefined;
|
|
136
|
+
productSlugs?: string[] | undefined;
|
|
137
|
+
slug?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
message: string;
|
|
140
|
+
mutationExecuted: boolean;
|
|
141
|
+
success: boolean;
|
|
142
|
+
action?: undefined;
|
|
143
|
+
slug?: undefined;
|
|
144
|
+
categoryId?: undefined;
|
|
145
|
+
created?: undefined;
|
|
146
|
+
linkedProducts?: undefined;
|
|
147
|
+
} | {
|
|
148
|
+
action: string;
|
|
149
|
+
mutationExecuted: boolean;
|
|
150
|
+
slug: string;
|
|
151
|
+
success: boolean;
|
|
152
|
+
message?: undefined;
|
|
153
|
+
categoryId?: undefined;
|
|
154
|
+
created?: undefined;
|
|
155
|
+
linkedProducts?: undefined;
|
|
156
|
+
} | {
|
|
157
|
+
categoryId: string;
|
|
158
|
+
created: boolean;
|
|
159
|
+
linkedProducts: number;
|
|
160
|
+
mutationExecuted: boolean;
|
|
161
|
+
slug: string;
|
|
162
|
+
success: boolean;
|
|
163
|
+
message?: undefined;
|
|
164
|
+
action?: undefined;
|
|
165
|
+
}>;
|
|
166
|
+
upload_media: import('ai').Tool<{
|
|
167
|
+
url: string;
|
|
168
|
+
altText?: string | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
mediaId: string;
|
|
171
|
+
mutationExecuted: boolean;
|
|
172
|
+
success: boolean;
|
|
173
|
+
}>;
|
|
174
|
+
};
|
|
175
|
+
export {};
|