@ema.co/mcp-toolkit 2026.2.23 → 2026.2.27
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.
Potentially problematic release.
This version of @ema.co/mcp-toolkit might be problematic. Click here for more details.
- package/dist/mcp/demo-generator.js +177 -0
- package/dist/mcp/domain/validation-rules.js +13 -0
- package/dist/mcp/domain/workflow-graph-optimizer.js +96 -14
- package/dist/mcp/domain/workflow-graph-transforms.js +50 -54
- package/dist/mcp/domain/workflow-graph.js +39 -17
- package/dist/mcp/handlers/data/index.js +74 -15
- package/dist/mcp/handlers/persona/update.js +34 -8
- package/dist/mcp/handlers/reference/index.js +34 -11
- package/dist/mcp/handlers/workflow/adapter.js +7 -4
- package/dist/mcp/handlers/workflow/deploy.js +3 -0
- package/dist/mcp/handlers/workflow/optimize.js +9 -5
- package/dist/mcp/handlers/workflow/validation.js +20 -4
- package/dist/mcp/knowledge.js +174 -13
- package/dist/mcp/resources-dynamic.js +5 -0
- package/dist/mcp/tools.js +10 -4
- package/dist/sdk/client-adapter.js +2 -0
- package/dist/sdk/ema-client.js +2 -0
- package/dist/sdk/generated/api-client/client/client.gen.js +3 -3
- package/dist/sdk/generated/api-client/client/index.js +5 -5
- package/dist/sdk/generated/api-client/client/utils.gen.js +4 -4
- package/dist/sdk/generated/api-client/client.gen.js +1 -1
- package/dist/sdk/generated/api-client/core/utils.gen.js +1 -1
- package/dist/sdk/generated/api-client/index.js +1 -1
- package/dist/sdk/generated/api-client/sdk.gen.js +2 -2
- package/package.json +2 -2
- package/dist/mcp/domain/workflow-optimizer.js +0 -671
- package/dist/mcp/handlers/workflow/fix.js +0 -587
|
@@ -1523,8 +1523,13 @@ persona(method="update", id="<ID>", config={widgets: [...]})
|
|
|
1523
1523
|
|
|
1524
1524
|
### 6. Upload Knowledge
|
|
1525
1525
|
\`\`\`
|
|
1526
|
+
# Default widget ('fileUpload') — exists on every chat/voice persona
|
|
1526
1527
|
persona(id="<ID>", data={method:"upload", path:"your-data.txt"})
|
|
1528
|
+
|
|
1529
|
+
# Custom widget — auto-created in proto_config on first upload (widget_created: true in response)
|
|
1530
|
+
persona(id="<ID>", data={method:"upload", path:"policies.pdf", widget_name:"policies"})
|
|
1527
1531
|
\`\`\`
|
|
1532
|
+
Wire any custom widget to a search node: \`search/v2\` → \`datastore_configs\` → \`widgetConfig: { widgetName: "<widget_name>" }\`.
|
|
1528
1533
|
|
|
1529
1534
|
## Hard Requirements
|
|
1530
1535
|
|
package/dist/mcp/tools.js
CHANGED
|
@@ -45,6 +45,8 @@ export function generateTools(envNames, defaultEnv) {
|
|
|
45
45
|
|
|
46
46
|
## Update
|
|
47
47
|
- \`persona(method="update", id="abc", config={...})\` - update config (name, description, widgets)
|
|
48
|
+
- \`persona(method="update", id="abc", enabled=true)\` - activate persona
|
|
49
|
+
- \`persona(method="update", id="abc", enabled=false)\` - deactivate persona
|
|
48
50
|
|
|
49
51
|
**IMPORTANT (strict)**:
|
|
50
52
|
- Always fetch latest state immediately before changing: \`persona(method="get", id="abc", include_fingerprint=true)\`
|
|
@@ -183,6 +185,10 @@ persona(
|
|
|
183
185
|
type: "object",
|
|
184
186
|
description: "Proto config to update - name, description, widgets (for method=update)"
|
|
185
187
|
},
|
|
188
|
+
enabled: {
|
|
189
|
+
type: "boolean",
|
|
190
|
+
description: "Enable/disable persona (for method=update). Set to true to activate, false to deactivate.",
|
|
191
|
+
},
|
|
186
192
|
base_fingerprint: {
|
|
187
193
|
type: "string",
|
|
188
194
|
description: "Fingerprint from persona(method='get', include_fingerprint=true). REQUIRED for method=update unless force=true (stale-state protection).",
|
|
@@ -278,7 +284,7 @@ persona(
|
|
|
278
284
|
// Especially important for Document Generation personas with multiple upload widgets
|
|
279
285
|
widget_name: {
|
|
280
286
|
type: "string",
|
|
281
|
-
description: "Target widget for upload OR filter for stats. For Document Proposal Manager: 'upload' (Content Repository), 'upload1' (Service Line Docs), 'upload2' (Style Guide).
|
|
287
|
+
description: "Target widget for upload OR filter for stats. Default: 'fileUpload'. If the named widget doesn't exist in the persona's proto_config, it is auto-created (type 3, fileUpload). Use a custom name to create a second knowledge base alongside the default one. For Document Proposal Manager: 'upload' (Content Repository), 'upload1' (Service Line Docs), 'upload2' (Style Guide). See catalog(type='widgets') for reference."
|
|
282
288
|
},
|
|
283
289
|
// delete params
|
|
284
290
|
file_id: { type: "string", description: "File/item ID to delete (for method=delete)" },
|
|
@@ -704,9 +710,9 @@ persona(
|
|
|
704
710
|
type: "number",
|
|
705
711
|
description: "Max results to return (for method=conversations)",
|
|
706
712
|
},
|
|
707
|
-
|
|
708
|
-
type: "
|
|
709
|
-
description: "Pagination
|
|
713
|
+
pagination_token: {
|
|
714
|
+
type: "string",
|
|
715
|
+
description: "Pagination token from previous response (for method=conversations)",
|
|
710
716
|
},
|
|
711
717
|
channel: {
|
|
712
718
|
type: "string",
|
package/dist/sdk/ema-client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { createSseClient } from '../core/serverSentEvents.gen';
|
|
3
|
-
import { getValidRequestBody } from '../core/utils.gen';
|
|
4
|
-
import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from './utils.gen';
|
|
2
|
+
import { createSseClient } from '../core/serverSentEvents.gen.js';
|
|
3
|
+
import { getValidRequestBody } from '../core/utils.gen.js';
|
|
4
|
+
import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams, } from './utils.gen.js';
|
|
5
5
|
export const createClient = (config = {}) => {
|
|
6
6
|
let _config = mergeConfigs(createConfig(), config);
|
|
7
7
|
const getConfig = () => ({ ..._config });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen';
|
|
3
|
-
export { buildClientParams } from '../core/params.gen';
|
|
4
|
-
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
|
|
5
|
-
export { createClient } from './client.gen';
|
|
6
|
-
export { createConfig, mergeHeaders } from './utils.gen';
|
|
2
|
+
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen.js';
|
|
3
|
+
export { buildClientParams } from '../core/params.gen.js';
|
|
4
|
+
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';
|
|
5
|
+
export { createClient } from './client.gen.js';
|
|
6
|
+
export { createConfig, mergeHeaders } from './utils.gen.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { getAuthToken } from '../core/auth.gen';
|
|
3
|
-
import { jsonBodySerializer } from '../core/bodySerializer.gen';
|
|
4
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from '../core/pathSerializer.gen';
|
|
5
|
-
import { getUrl } from '../core/utils.gen';
|
|
2
|
+
import { getAuthToken } from '../core/auth.gen.js';
|
|
3
|
+
import { jsonBodySerializer } from '../core/bodySerializer.gen.js';
|
|
4
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from '../core/pathSerializer.gen.js';
|
|
5
|
+
import { getUrl } from '../core/utils.gen.js';
|
|
6
6
|
export const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
7
7
|
const querySerializer = (queryParams) => {
|
|
8
8
|
const search = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen';
|
|
2
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen.js';
|
|
3
3
|
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
4
4
|
export const defaultPathSerializer = ({ path, url: _url }) => {
|
|
5
5
|
let url = _url;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { archiveProjectById, createChatbotConversation, createConversation, createDocument, createPersona, createPersonaTemplate, createProject, createProjectTemplate, deleteConversation, deletePersona, deletePersonaTemplate, deleteProjectTemplate, editChartSnippet, emailActionImage, emailActionLink, emailActionUnsubscribe, fetchTicketUpdates, getChatbotConfig, getChatHistory, getConversationMessages, getConversationMessagesPaginated, getDefaultPersonaTemplateAccessSettingsForTenant, getLinkedInAuthUrl, getLogoUploadUrl, getMailLoginUrlForPersona, getPersonaAccessLevelById, getPersonaById, getPersonaTemplateById, getProjectById, getProjectsForPersona, getProjectTemplateByPersonaId, getWelcomeMessage, grantPersonaTemplateAccess, healthBasicCheck, healthCheck, importPersona, linkedinAccountNotification, linkedinActionLink, listAllPersonaTemplates, listAvailablePhoneNumbers, listConversations, listConversationsForPersona, listConversationsPaginated, listPersonas, listPersonaTemplates, listPersonaTemplatesPost, listSavedSnippets, metrics, processWebPrompt, provisionPhoneNumber, regenerateDocument, retrieveDocument, revokePersonaTemplateAccess, saveSnippet, sendChatMessage, sendChatMessageAsync, setDefaultPersonaTemplateAccessSetting, setPersonaTemplateAccessSettingsForNewSubTenant, streamChatbotConversationsCsv, triggerProjectWorkflow, unsaveSnippet, updateConversationDisplayName, updateDataUploadStatus, updateDocument, updateMessageFeedback, updatePersona, updatePersonaTemplate, updateProject, updateProjectTemplate, uploadLogo, verifyLogoUpload } from './sdk.gen';
|
|
2
|
+
export { archiveProjectById, createChatbotConversation, createConversation, createDocument, createPersona, createPersonaTemplate, createProject, createProjectTemplate, deleteConversation, deletePersona, deletePersonaTemplate, deleteProjectTemplate, editChartSnippet, emailActionImage, emailActionLink, emailActionUnsubscribe, fetchTicketUpdates, getChatbotConfig, getChatHistory, getConversationMessages, getConversationMessagesPaginated, getDefaultPersonaTemplateAccessSettingsForTenant, getLinkedInAuthUrl, getLogoUploadUrl, getMailLoginUrlForPersona, getPersonaAccessLevelById, getPersonaById, getPersonaTemplateById, getProjectById, getProjectsForPersona, getProjectTemplateByPersonaId, getWelcomeMessage, grantPersonaTemplateAccess, healthBasicCheck, healthCheck, importPersona, linkedinAccountNotification, linkedinActionLink, listAllPersonaTemplates, listAvailablePhoneNumbers, listConversations, listConversationsForPersona, listConversationsPaginated, listPersonas, listPersonaTemplates, listPersonaTemplatesPost, listSavedSnippets, metrics, processWebPrompt, provisionPhoneNumber, regenerateDocument, retrieveDocument, revokePersonaTemplateAccess, saveSnippet, sendChatMessage, sendChatMessageAsync, setDefaultPersonaTemplateAccessSetting, setPersonaTemplateAccessSettingsForNewSubTenant, streamChatbotConversationsCsv, triggerProjectWorkflow, unsaveSnippet, updateConversationDisplayName, updateDataUploadStatus, updateDocument, updateMessageFeedback, updatePersona, updatePersonaTemplate, updateProject, updateProjectTemplate, uploadLogo, verifyLogoUpload } from './sdk.gen.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { formDataBodySerializer } from './client';
|
|
3
|
-
import { client } from './client.gen';
|
|
2
|
+
import { formDataBodySerializer } from './client/index.js';
|
|
3
|
+
import { client } from './client.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Metrics
|
|
6
6
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ema.co/mcp-toolkit",
|
|
3
|
-
"version": "2026.2.
|
|
3
|
+
"version": "2026.2.27",
|
|
4
4
|
"description": "Ema AI Employee toolkit - MCP server, CLI, and SDK for managing AI Employees across environments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"check:publish": "tsx scripts/check-publish-content.ts",
|
|
57
57
|
"prepublishOnly": "npm run build && npm run test && npm run check:publish",
|
|
58
58
|
"generate:types": "tsx scripts/generate-types.ts",
|
|
59
|
-
"generate:api-client": "npx @hey-api/openapi-ts -i src/sdk/generated/openapi.json -o src/sdk/generated/api-client -c @hey-api/client-fetch",
|
|
59
|
+
"generate:api-client": "npx @hey-api/openapi-ts -i src/sdk/generated/openapi.json -o src/sdk/generated/api-client -c @hey-api/client-fetch && tsx scripts/fix-generated-esm-imports.ts",
|
|
60
60
|
"generate:protos": "buf generate ../ema-repos/protos --template buf.gen.yaml",
|
|
61
61
|
"generate:proto-fields": "tsx scripts/generate-proto-fields.ts",
|
|
62
62
|
"generate:deprecated-actions": "tsx scripts/generate-deprecated-actions.ts",
|