@ema.co/mcp-toolkit 2026.1.25 → 2026.1.26-4

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.

Files changed (87) hide show
  1. package/README.md +10 -2
  2. package/dist/mcp/handlers/action/index.js +3 -18
  3. package/dist/mcp/handlers/data/index.js +385 -41
  4. package/dist/mcp/handlers/data/templates.js +107 -0
  5. package/dist/mcp/handlers/deprecation.js +50 -0
  6. package/dist/mcp/handlers/env/index.js +8 -4
  7. package/dist/mcp/handlers/knowledge/index.js +44 -237
  8. package/dist/mcp/handlers/persona/create.js +47 -18
  9. package/dist/mcp/handlers/persona/index.js +14 -11
  10. package/dist/mcp/handlers/persona/update.js +4 -2
  11. package/dist/mcp/handlers/persona/version.js +234 -0
  12. package/dist/mcp/handlers/sync/index.js +3 -18
  13. package/dist/mcp/handlers/template/index.js +75 -10
  14. package/dist/mcp/handlers/workflow/analyze.js +171 -0
  15. package/dist/mcp/handlers/workflow/compare.js +70 -0
  16. package/dist/mcp/handlers/workflow/deploy.js +73 -0
  17. package/dist/mcp/handlers/workflow/generate.js +350 -0
  18. package/dist/mcp/handlers/workflow/index.js +294 -0
  19. package/dist/mcp/handlers/workflow/modify.js +456 -0
  20. package/dist/mcp/handlers/workflow/optimize.js +136 -0
  21. package/dist/mcp/handlers/workflow/types.js +4 -0
  22. package/dist/mcp/handlers/workflow/utils.js +30 -0
  23. package/dist/mcp/handlers-consolidated.js +73 -2696
  24. package/dist/mcp/prompts.js +83 -43
  25. package/dist/mcp/resources.js +382 -57
  26. package/dist/mcp/server.js +199 -391
  27. package/dist/mcp/{tools-v2.js → tools.js} +20 -54
  28. package/dist/mcp/workflow-operations.js +2 -2
  29. package/dist/sdk/client-adapter.js +267 -32
  30. package/dist/sdk/client.js +45 -16
  31. package/dist/sdk/ema-client.js +183 -0
  32. package/dist/sdk/generated/deprecated-actions.js +171 -0
  33. package/dist/sdk/generated/template-fallbacks.js +123 -0
  34. package/dist/sdk/guidance.js +65 -11
  35. package/dist/sdk/index.js +3 -1
  36. package/dist/sdk/knowledge.js +139 -86
  37. package/dist/sdk/workflow-intent.js +27 -0
  38. package/dist/sdk/workflow-transformer.js +0 -342
  39. package/docs/mcp-tools-guide.md +37 -45
  40. package/package.json +10 -4
  41. package/dist/mcp/handlers/persona/analyze.js +0 -275
  42. package/dist/mcp/handlers/persona/compare.js +0 -32
  43. package/dist/mcp/tools-consolidated.js +0 -875
  44. package/dist/mcp/tools-legacy.js +0 -736
  45. package/docs/CODEBASE-ANALYSIS-2026-01-23.md +0 -936
  46. package/docs/CODEBASE-ANALYSIS-PRIORITIZED.md +0 -774
  47. package/docs/api-contracts.md +0 -216
  48. package/docs/auto-builder-analysis.md +0 -271
  49. package/docs/blog/mcp-tool-design-lessons.md +0 -309
  50. package/docs/data-architecture.md +0 -166
  51. package/docs/demos/ap-invoice-generation.md +0 -347
  52. package/docs/demos/ap-invoice-processing.md +0 -271
  53. package/docs/ema-auto-builder-guide.html +0 -394
  54. package/docs/lessons-learned.md +0 -209
  55. package/docs/llm-native-workflow-design.md +0 -252
  56. package/docs/local-generation.md +0 -508
  57. package/docs/mcp-flow-diagram.md +0 -135
  58. package/docs/migration/action-composition-migration.md +0 -270
  59. package/docs/naming-conventions.md +0 -278
  60. package/docs/proposals/HANDOFF-tool-restructure.md +0 -526
  61. package/docs/proposals/action-composition.md +0 -490
  62. package/docs/proposals/explicit-method-restructure.md +0 -328
  63. package/docs/proposals/mcp-tool-restructure-2026-01.md +0 -366
  64. package/docs/proposals/self-contained-guidance.md +0 -427
  65. package/docs/proto-sdk-generation.md +0 -242
  66. package/docs/release-impact.md +0 -102
  67. package/docs/release-process.md +0 -157
  68. package/docs/staging.RULE.md +0 -142
  69. package/docs/test-persona-creation.md +0 -196
  70. package/docs/tool-consolidation-v2.md +0 -225
  71. package/docs/tool-response-standards.md +0 -256
  72. package/resources/demo-kits/README.md +0 -175
  73. package/resources/demo-kits/finance-ap/manifest.json +0 -150
  74. package/resources/demo-kits/tags.json +0 -91
  75. package/resources/docs/getting-started.md +0 -97
  76. package/resources/templates/auto-builder-rules.md +0 -224
  77. package/resources/templates/chat-ai/README.md +0 -119
  78. package/resources/templates/chat-ai/persona-config.json +0 -111
  79. package/resources/templates/dashboard-ai/README.md +0 -156
  80. package/resources/templates/dashboard-ai/persona-config.json +0 -180
  81. package/resources/templates/demo-scenarios/README.md +0 -63
  82. package/resources/templates/demo-scenarios/test-published-package.md +0 -116
  83. package/resources/templates/document-gen-ai/README.md +0 -132
  84. package/resources/templates/document-gen-ai/persona-config.json +0 -316
  85. package/resources/templates/voice-ai/README.md +0 -123
  86. package/resources/templates/voice-ai/persona-config.json +0 -74
  87. package/resources/templates/voice-ai/workflow-prompt.md +0 -121
@@ -1,121 +0,0 @@
1
- # Workflow Prompt: {Persona Name}
2
-
3
- > **IMPORTANT**: Copy the content in the "Auto Builder Prompt" section below into Ema Auto Builder.
4
- > The safeguards and validation sections help ensure correct interpretation.
5
-
6
- ---
7
-
8
- ## Auto Builder Prompt
9
-
10
- ```text
11
- Title: {Persona Name}
12
-
13
- Summary: {One sentence describing what this Voice AI does}
14
-
15
- Trigger: voice_call (inbound phone call)
16
-
17
- ---
18
- ## EXPLICIT NODE DEFINITIONS
19
- ---
20
-
21
- Agents/Nodes:
22
- 1. trigger (chat_trigger)
23
- - outputs: chat_conversation, user_query
24
-
25
- 2. intent_classifier (chat_categorizer)
26
- - input: trigger.chat_conversation
27
- - categories: [{Category1}, {Category2}, {Category3}, Fallback]
28
- - output: category
29
- - description: "Classifies caller intent"
30
-
31
- {For each category, define the processing nodes:}
32
-
33
- 3. {category1_processor} ({action_type})
34
- - runIf: intent_classifier.category == {Category1}
35
- - inputs: {specify inputs}
36
- - outputs: {specify outputs}
37
- - description: "{What this node does}"
38
-
39
- 4. {category1_response} (call_llm)
40
- - runIf: intent_classifier.category == {Category1}
41
- - inputs:
42
- - query: trigger.user_query
43
- - named_inputs_{Category1}_Data: {category1_processor}.{output}
44
- - instructions: "{Specific response instructions}"
45
-
46
- {Repeat for each category...}
47
-
48
- N. fallback_response (call_llm)
49
- - runIf: intent_classifier.category == Fallback
50
- - inputs: query: trigger.user_query
51
- - instructions: "Ask a clarifying question. Provide examples:
52
- 1. {Example query 1}
53
- 2. {Example query 2}
54
- 3. {Example query 3}"
55
-
56
- ---
57
- ## EXPLICIT CONNECTIONS
58
- ---
59
-
60
- Connections:
61
- trigger.chat_conversation → intent_classifier.conversation
62
- trigger.user_query → intent_classifier.query
63
-
64
- # Category routing via runIf (NOT edges):
65
- # {category1_processor} has runIf: intent_classifier.category == {Category1}
66
- # {category2_processor} has runIf: intent_classifier.category == {Category2}
67
- # {category3_processor} has runIf: intent_classifier.category == {Category3}
68
- # fallback_response has runIf: intent_classifier.category == Fallback
69
-
70
- {category1_processor}.{output} → {category1_response}.named_inputs_{Category1}_Data
71
- trigger.user_query → {category1_response}.query
72
-
73
- {Repeat for all connections...}
74
-
75
- ---
76
- ## RESULTS MAPPING
77
- ---
78
-
79
- Results:
80
- - {category1_response}.response_with_sources → WORKFLOW_OUTPUT
81
- - {category2_response}.response_with_sources → WORKFLOW_OUTPUT
82
- - {category3_response}.response_with_sources → WORKFLOW_OUTPUT
83
- - fallback_response.response_with_sources → WORKFLOW_OUTPUT
84
-
85
- ---
86
- ## VALIDATION ASSERTIONS
87
- ---
88
-
89
- Assertions:
90
- - [ ] intent_classifier has edges for ALL categories: {Category1}, {Category2}, {Category3}, Fallback
91
- - [ ] Each category has exactly one routing path to a response node
92
- - [ ] All search/data nodes receive TEXT_WITH_SOURCES input from trigger.user_query
93
- - [ ] All call_llm nodes have explicit instructions
94
- - [ ] Fallback provides examples of valid queries
95
- - [ ] All response nodes map to WORKFLOW_OUTPUT
96
- ```
97
-
98
- ---
99
-
100
- ## Safeguard Checklist (Verify Before Pasting)
101
-
102
- ### Structure Safeguards
103
-
104
- - [ ] **Trigger specified**: `voice_call` or `chat_trigger`
105
- - [ ] **All categories listed**: Including `Fallback`
106
- - [ ] **Explicit node definitions**: Each node has name, type, inputs, outputs
107
- - [ ] **Explicit connections**: Using `source.output → target.input` format
108
- - [ ] **Results mapping**: All outputs map to `WORKFLOW_OUTPUT`
109
-
110
- ### Type Compatibility Safeguards
111
-
112
- - [ ] `chat_trigger.chat_conversation` → `chat_categorizer.conversation` ✓
113
- - [ ] `chat_trigger.user_query` → `call_llm.query` ✓
114
- - [ ] `search.search_results` → `respond_with_sources.search_results` ✓
115
- - [ ] `external_action_caller.tool_execution_result` → `call_llm.named_inputs_*` ✓
116
-
117
- ### Category Routing Safeguards
118
-
119
- - [ ] Every category has a handler node with `runIf` condition
120
- - [ ] runIf format: `output: "category"` compared to `enumValue: "<CategoryName>"`
121
- - [ ] **DO NOT** use `category_<Name>` - use `output: "category"` with `enumValue`