@ema.co/mcp-toolkit 0.2.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/LICENSE +21 -0
- package/README.md +321 -0
- package/config.example.yaml +32 -0
- package/dist/cli/index.js +333 -0
- package/dist/config.js +136 -0
- package/dist/emaClient.js +398 -0
- package/dist/index.js +109 -0
- package/dist/mcp/handlers-consolidated.js +851 -0
- package/dist/mcp/index.js +15 -0
- package/dist/mcp/prompts.js +1753 -0
- package/dist/mcp/resources.js +624 -0
- package/dist/mcp/server.js +4723 -0
- package/dist/mcp/tools-consolidated.js +590 -0
- package/dist/mcp/tools-legacy.js +736 -0
- package/dist/models.js +8 -0
- package/dist/scheduler.js +21 -0
- package/dist/sdk/client.js +788 -0
- package/dist/sdk/config.js +136 -0
- package/dist/sdk/contracts.js +429 -0
- package/dist/sdk/generation-schema.js +189 -0
- package/dist/sdk/index.js +39 -0
- package/dist/sdk/knowledge.js +2780 -0
- package/dist/sdk/models.js +8 -0
- package/dist/sdk/state.js +88 -0
- package/dist/sdk/sync-options.js +216 -0
- package/dist/sdk/sync.js +220 -0
- package/dist/sdk/validation-rules.js +355 -0
- package/dist/sdk/workflow-generator.js +291 -0
- package/dist/sdk/workflow-intent.js +1585 -0
- package/dist/state.js +88 -0
- package/dist/sync.js +416 -0
- package/dist/syncOptions.js +216 -0
- package/dist/ui.js +334 -0
- package/docs/advisor-comms-assistant-fixes.md +175 -0
- package/docs/api-contracts.md +216 -0
- package/docs/auto-builder-analysis.md +271 -0
- package/docs/data-architecture.md +166 -0
- package/docs/ema-auto-builder-guide.html +394 -0
- package/docs/ema-user-guide.md +1121 -0
- package/docs/mcp-tools-guide.md +149 -0
- package/docs/naming-conventions.md +218 -0
- package/docs/tool-consolidation-proposal.md +427 -0
- package/package.json +98 -0
- package/resources/templates/chat-ai/README.md +119 -0
- package/resources/templates/chat-ai/persona-config.json +111 -0
- package/resources/templates/dashboard-ai/README.md +156 -0
- package/resources/templates/dashboard-ai/persona-config.json +180 -0
- package/resources/templates/voice-ai/README.md +123 -0
- package/resources/templates/voice-ai/persona-config.json +74 -0
- package/resources/templates/voice-ai/workflow-prompt.md +120 -0
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
- trigger_when: category::{Category1}
|
|
35
|
+
- inputs: {specify inputs}
|
|
36
|
+
- outputs: {specify outputs}
|
|
37
|
+
- description: "{What this node does}"
|
|
38
|
+
|
|
39
|
+
4. {category1_response} (call_llm)
|
|
40
|
+
- trigger_when: {category1_processor} completes
|
|
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
|
+
- trigger_when: 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
|
+
intent_classifier.category_{Category1} → {category1_processor}.trigger_when
|
|
65
|
+
intent_classifier.category_{Category2} → {category2_processor}.trigger_when
|
|
66
|
+
intent_classifier.category_{Category3} → {category3_processor}.trigger_when
|
|
67
|
+
intent_classifier.category_Fallback → fallback_response.trigger_when
|
|
68
|
+
|
|
69
|
+
{category1_processor}.{output} → {category1_response}.named_inputs_{Category1}_Data
|
|
70
|
+
trigger.user_query → {category1_response}.query
|
|
71
|
+
|
|
72
|
+
{Repeat for all connections...}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
## RESULTS MAPPING
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
Results:
|
|
79
|
+
- {category1_response}.response_with_sources → WORKFLOW_OUTPUT
|
|
80
|
+
- {category2_response}.response_with_sources → WORKFLOW_OUTPUT
|
|
81
|
+
- {category3_response}.response_with_sources → WORKFLOW_OUTPUT
|
|
82
|
+
- fallback_response.response_with_sources → WORKFLOW_OUTPUT
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
## VALIDATION ASSERTIONS
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
Assertions:
|
|
89
|
+
- [ ] intent_classifier has edges for ALL categories: {Category1}, {Category2}, {Category3}, Fallback
|
|
90
|
+
- [ ] Each category has exactly one routing path to a response node
|
|
91
|
+
- [ ] All search/data nodes receive TEXT_WITH_SOURCES input from trigger.user_query
|
|
92
|
+
- [ ] All call_llm nodes have explicit instructions
|
|
93
|
+
- [ ] Fallback provides examples of valid queries
|
|
94
|
+
- [ ] All response nodes map to WORKFLOW_OUTPUT
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Safeguard Checklist (Verify Before Pasting)
|
|
100
|
+
|
|
101
|
+
### Structure Safeguards
|
|
102
|
+
|
|
103
|
+
- [ ] **Trigger specified**: `voice_call` or `chat_trigger`
|
|
104
|
+
- [ ] **All categories listed**: Including `Fallback`
|
|
105
|
+
- [ ] **Explicit node definitions**: Each node has name, type, inputs, outputs
|
|
106
|
+
- [ ] **Explicit connections**: Using `source.output → target.input` format
|
|
107
|
+
- [ ] **Results mapping**: All outputs map to `WORKFLOW_OUTPUT`
|
|
108
|
+
|
|
109
|
+
### Type Compatibility Safeguards
|
|
110
|
+
|
|
111
|
+
- [ ] `chat_trigger.chat_conversation` → `chat_categorizer.conversation` ✓
|
|
112
|
+
- [ ] `chat_trigger.user_query` → `call_llm.query` ✓
|
|
113
|
+
- [ ] `search.search_results` → `respond_with_sources.search_results` ✓
|
|
114
|
+
- [ ] `external_action_caller.tool_execution_result` → `call_llm.named_inputs_*` ✓
|
|
115
|
+
|
|
116
|
+
### Category Routing Safeguards
|
|
117
|
+
|
|
118
|
+
- [ ] Every category has **exactly one** outgoing edge
|
|
119
|
+
- [ ] Edge format: `category_<Name>` (not `category::<Name>`)
|
|
120
|
+
- [ ] Target input: `trigger_when`
|