@ema.co/mcp-toolkit 2026.2.13 → 2026.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.context/public/guides/ema-user-guide.md +12 -16
  2. package/.context/public/guides/mcp-tools-guide.md +203 -334
  3. package/dist/cli/index.js +2 -2
  4. package/dist/mcp/domain/loop-detection.js +89 -0
  5. package/dist/mcp/domain/sanitizer.js +1 -1
  6. package/dist/mcp/domain/structural-rules.js +4 -5
  7. package/dist/mcp/domain/validation-rules.js +5 -5
  8. package/dist/mcp/domain/workflow-graph.js +3 -5
  9. package/dist/mcp/domain/workflow-path-enumerator.js +7 -4
  10. package/dist/mcp/guidance.js +62 -29
  11. package/dist/mcp/handlers/debug/adapter.js +15 -0
  12. package/dist/mcp/handlers/debug/formatters.js +282 -0
  13. package/dist/mcp/handlers/debug/index.js +133 -0
  14. package/dist/mcp/handlers/demo/adapter.js +180 -0
  15. package/dist/mcp/handlers/env/config.js +2 -2
  16. package/dist/mcp/handlers/feedback/index.js +1 -1
  17. package/dist/mcp/handlers/index.js +0 -1
  18. package/dist/mcp/handlers/persona/adapter.js +135 -0
  19. package/dist/mcp/handlers/persona/index.js +237 -8
  20. package/dist/mcp/handlers/persona/schema.js +27 -0
  21. package/dist/mcp/handlers/reference/index.js +6 -4
  22. package/dist/mcp/handlers/sync/adapter.js +200 -0
  23. package/dist/mcp/handlers/workflow/adapter.js +174 -0
  24. package/dist/mcp/handlers/workflow/fix.js +11 -12
  25. package/dist/mcp/handlers/workflow/index.js +12 -40
  26. package/dist/mcp/handlers/workflow/validation.js +1 -1
  27. package/dist/mcp/knowledge-guidance-topics.js +615 -0
  28. package/dist/mcp/knowledge-types.js +7 -0
  29. package/dist/mcp/knowledge.js +75 -1403
  30. package/dist/mcp/resources-dynamic.js +2395 -0
  31. package/dist/mcp/resources-validation.js +408 -0
  32. package/dist/mcp/resources.js +72 -2508
  33. package/dist/mcp/server.js +69 -2825
  34. package/dist/mcp/tools.js +106 -5
  35. package/dist/sdk/client-adapter.js +265 -24
  36. package/dist/sdk/ema-client.js +100 -9
  37. package/dist/sdk/generated/agent-catalog.js +615 -0
  38. package/dist/sdk/generated/well-known-types.js +99 -0
  39. package/dist/sdk/generated/widget-catalog.js +60 -0
  40. package/dist/sdk/grpc-client.js +115 -1
  41. package/dist/sync/sdk.js +2 -2
  42. package/dist/sync.js +4 -3
  43. package/docs/README.md +17 -9
  44. package/package.json +3 -2
  45. package/.context/public/guides/dashboard-operations.md +0 -349
  46. package/.context/public/guides/email-patterns.md +0 -125
  47. package/.context/public/guides/workflow-builder-patterns.md +0 -708
  48. package/dist/mcp/domain/intent-architect.js +0 -914
  49. package/dist/mcp/domain/quality-gates.js +0 -110
  50. package/dist/mcp/domain/workflow-execution-analyzer.js +0 -412
  51. package/dist/mcp/domain/workflow-intent.js +0 -1806
  52. package/dist/mcp/domain/workflow-merge.js +0 -449
  53. package/dist/mcp/domain/workflow-tracer.js +0 -648
  54. package/dist/mcp/domain/workflow-transformer.js +0 -742
  55. package/dist/mcp/handlers/knowledge/index.js +0 -54
  56. package/dist/mcp/handlers/persona/intent.js +0 -141
  57. package/dist/mcp/handlers/workflow/analyze.js +0 -119
  58. package/dist/mcp/handlers/workflow/compare.js +0 -70
  59. package/dist/mcp/handlers/workflow/generate.js +0 -384
  60. package/dist/mcp/handlers-consolidated.js +0 -333
@@ -98,7 +98,7 @@ audience: public
98
98
  |------------|---------|
99
99
  | `chat_categorizer` | Classifies user intent |
100
100
  | `search` | Retrieves relevant documents |
101
- | `respond_with_sources` | Generates answer with citations |
101
+ | `respond_for_external_actions` | Generates answer with citations using search/tool results |
102
102
  | `external_action_caller` | Invokes external APIs/tools |
103
103
  | `call_llm` | Custom LLM response generation |
104
104
  | `generate_document` | Creates Word/PDF documents |
@@ -662,16 +662,14 @@ Generate answers using LLMs.
662
662
 
663
663
  ```yaml
664
664
  # Response Generation Example
665
- name: "respond_with_sources"
666
- action: "actions.emainternal.respond_with_sources"
665
+ name: "respond_for_external_actions"
666
+ action: "actions.emainternal.respond_for_external_actions"
667
667
  inputs:
668
- query: "{{search.query}}"
669
- search_results: "{{search.search_results}}"
668
+ query: "{{trigger.user_query}}"
669
+ external_action_result: "{{search.search_results}}"
670
670
  user_instructions: |
671
671
  You are an HR assistant. Answer questions using only
672
672
  the provided documents. Cite your sources.
673
- model_config:
674
- selectedModels: ["gpt-4o"]
675
673
  ```
676
674
 
677
675
  ##### 5. External Action Agents
@@ -878,7 +876,7 @@ humanInteractionConfig:
878
876
  [Knowledge Search] ─── Searches uploaded policy documents
879
877
 
880
878
 
881
- [Respond with Sources] ─── Generates answer with citations
879
+ [Respond] ─── Generates answer with citations
882
880
  ```
883
881
 
884
882
  #### 3. Add Knowledge
@@ -1066,8 +1064,8 @@ Workflows with `search` nodes require documents to be uploaded first:
1066
1064
 
1067
1065
  ```
1068
1066
  1. Upload: persona(id="...", data={method:"upload", path:"/docs/faq.pdf"})
1069
- 2. Verify: persona(id="...", data={method:"stats"}) // success > 0
1070
- 3. Deploy: workflow(mode="deploy", ...)
1067
+ 2. Verify: persona(id="...", data={method:"stats"}) // check success > 0
1068
+ 3. Deploy: workflow(mode="deploy", persona_id="...", base_fingerprint="...", workflow_def={...})
1071
1069
  ```
1072
1070
 
1073
1071
  Without documents, search returns empty results.
@@ -1114,7 +1112,7 @@ When an AI Employee isn't working correctly:
1114
1112
  # Graceful degradation example
1115
1113
  runIf:
1116
1114
  condition: "{{search.search_results.length}} > 0"
1117
- onTrue: "respond_with_sources"
1115
+ onTrue: "respond_for_external_actions"
1118
1116
  onFalse: "fallback_response"
1119
1117
 
1120
1118
  # Fallback configuration
@@ -1160,7 +1158,7 @@ Based on analysis, the following areas could benefit from clearer documentation:
1160
1158
  2. **Workflow Schema** — Full JSON schema for workflow definitions
1161
1159
  3. **Error Codes** — Comprehensive error code reference
1162
1160
  4. **Rate Limits** — API rate limiting documentation
1163
- 5. **MCP/A2A Protocols** — If/how these are implemented
1161
+ 5. **A2A Protocol** — If/how this is implemented
1164
1162
 
1165
1163
  ### Feedback
1166
1164
 
@@ -1179,9 +1177,7 @@ For documentation feedback or corrections, contact:
1179
1177
  Use the MCP tools to list templates for your tenant:
1180
1178
 
1181
1179
  ```
1182
- reference(type="templates")
1183
- # or
1184
- persona(templates=true)
1180
+ catalog(method="list", type="templates")
1185
1181
  ```
1186
1182
 
1187
1183
  This returns all templates with their:
@@ -1195,7 +1191,7 @@ This returns all templates with their:
1195
1191
  When creating a persona, specify `type` and the MCP will find a matching template:
1196
1192
 
1197
1193
  ```
1198
- persona(input="...", type="voice", name="My Voice AI", preview=false)
1194
+ persona(method="create", type="voice", name="My Voice AI")
1199
1195
  ```
1200
1196
 
1201
1197
  The MCP matches `type` against `trigger_type` from available templates.