@ema.co/mcp-toolkit 2026.2.5 → 2026.2.13

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 (44) hide show
  1. package/.context/public/guides/dashboard-operations.md +63 -0
  2. package/.context/public/guides/workflow-builder-patterns.md +708 -0
  3. package/LICENSE +29 -21
  4. package/README.md +58 -35
  5. package/dist/mcp/domain/proto-constraints.js +284 -0
  6. package/dist/mcp/domain/structural-rules.js +8 -0
  7. package/dist/mcp/domain/validation-rules.js +102 -15
  8. package/dist/mcp/domain/workflow-graph-optimizer.js +235 -0
  9. package/dist/mcp/domain/workflow-graph-transforms.js +808 -0
  10. package/dist/mcp/domain/workflow-graph.js +376 -0
  11. package/dist/mcp/domain/workflow-optimizer.js +10 -4
  12. package/dist/mcp/guidance.js +45 -2
  13. package/dist/mcp/handlers/feedback/index.js +139 -0
  14. package/dist/mcp/handlers/feedback/store.js +262 -0
  15. package/dist/mcp/handlers/workflow/index.js +12 -11
  16. package/dist/mcp/handlers/workflow/optimize.js +73 -33
  17. package/dist/mcp/knowledge.js +87 -36
  18. package/dist/mcp/resources.js +393 -17
  19. package/dist/mcp/server.js +38 -4
  20. package/dist/mcp/tools.js +89 -2
  21. package/dist/sdk/generated/deprecated-actions.js +182 -96
  22. package/dist/sdk/generated/proto-fields.js +2 -1
  23. package/dist/sdk/generated/protos/service/agent_qa/v1/agent_qa_pb.js +460 -21
  24. package/dist/sdk/generated/protos/service/auth/v1/auth_pb.js +11 -1
  25. package/dist/sdk/generated/protos/service/dataingest/v1/dataingest_pb.js +173 -66
  26. package/dist/sdk/generated/protos/service/feedback/v1/feedback_pb.js +43 -1
  27. package/dist/sdk/generated/protos/service/llmservice/v1/llmservice_pb.js +26 -21
  28. package/dist/sdk/generated/protos/service/persona/v1/persona_config_pb.js +100 -89
  29. package/dist/sdk/generated/protos/service/persona/v1/persona_pb.js +126 -116
  30. package/dist/sdk/generated/protos/service/persona/v1/shared_widgets/widget_types_pb.js +33 -1
  31. package/dist/sdk/generated/protos/service/persona/v1/voicebot_widgets/widget_types_pb.js +60 -11
  32. package/dist/sdk/generated/protos/service/tenant/v1/tenant_pb.js +1 -1
  33. package/dist/sdk/generated/protos/service/user/v1/user_pb.js +1 -1
  34. package/dist/sdk/generated/protos/service/utils/v1/agent_qa_pb.js +35 -0
  35. package/dist/sdk/generated/protos/service/workflows/v1/action_registry_pb.js +1 -1
  36. package/dist/sdk/generated/protos/service/workflows/v1/action_type_pb.js +6 -1
  37. package/dist/sdk/generated/protos/service/workflows/v1/chatbot_pb.js +106 -11
  38. package/dist/sdk/generated/protos/service/workflows/v1/common_forms_pb.js +1 -1
  39. package/dist/sdk/generated/protos/service/workflows/v1/coordinator_pb.js +1 -1
  40. package/dist/sdk/generated/protos/service/workflows/v1/external_actions_pb.js +31 -1
  41. package/dist/sdk/generated/protos/service/workflows/v1/well_known_pb.js +5 -1
  42. package/dist/sdk/generated/protos/service/workflows/v1/workflow_pb.js +1 -1
  43. package/dist/sdk/generated/protos/util/tracking_metadata_pb.js +1 -1
  44. package/package.json +2 -2
@@ -221,6 +221,69 @@ When document `type` is not available, inferred from extension:
221
221
  | `.jpg`/`.jpeg` | `image/jpeg` |
222
222
  | Other | `application/octet-stream` |
223
223
 
224
+ ## Dashboard Columns: How They Work
225
+
226
+ ### Output Columns Come From resultMappings
227
+
228
+ For dashboard personas, the **output columns** visible in the dashboard UI are determined **entirely** by which node outputs are mapped to `WORKFLOW_OUTPUT` via `resultMappings` in the workflow_def. Each `resultMapping` entry creates one output column in the dashboard.
229
+
230
+ ```json
231
+ "results": {
232
+ "entity_extraction.invoice_number": {
233
+ "actionName": "entity_extraction",
234
+ "outputName": "invoice_number"
235
+ },
236
+ "entity_extraction.amount": {
237
+ "actionName": "entity_extraction",
238
+ "outputName": "amount"
239
+ },
240
+ "call_llm.summary": {
241
+ "actionName": "call_llm",
242
+ "outputName": "response_with_sources"
243
+ },
244
+ "categorizer.category": {
245
+ "actionName": "categorizer",
246
+ "outputName": "category"
247
+ }
248
+ }
249
+ ```
250
+
251
+ This creates 4 output columns: `entity_extraction.invoice_number`, `entity_extraction.amount`, `call_llm.summary`, and `categorizer.category`.
252
+
253
+ **Key rules:**
254
+ - If you forget to map a node output, that column **won't appear** in the dashboard
255
+ - If you map the wrong output, you'll see unexpected data
256
+ - Column display name in the UI = the result mapping key (e.g., `entity_extraction.invoice_number`)
257
+
258
+ ### Input Columns Come From the Trigger
259
+
260
+ Dashboard input columns (what users fill in or upload per row) come from the `document_trigger` outputs:
261
+ - `document_content`: For uploaded files (PDF, images, etc.)
262
+ - `row_data`: For text/number inputs from dashboard columns
263
+
264
+ Wire these to your processing nodes:
265
+ - `entity_extraction.document` ← `trigger.document_content`
266
+ - `call_llm.context` ← `trigger.row_data`
267
+
268
+ ### Column Ordering
269
+
270
+ **Dashboard column order is determined by the order of resultMappings in the workflow_def.**
271
+
272
+ To reorder columns, you must **remove** them from the result mappings and **re-add** them in the desired order. There is no separate "reorder" API -- the order in the JSON is the order in the UI.
273
+
274
+ ```
275
+ // To change order from [Amount, Date, Status] to [Status, Date, Amount]:
276
+ // 1. Remove all three from results
277
+ // 2. Re-add in desired order:
278
+ "results": {
279
+ "extract.status": { "actionName": "extract", "outputName": "status" },
280
+ "extract.date": { "actionName": "extract", "outputName": "date" },
281
+ "extract.amount": { "actionName": "extract", "outputName": "amount" }
282
+ }
283
+ ```
284
+
285
+ **Important:** Once columns are created and saved, the output type and multi-value settings cannot be modified via the UI. To change these, you must update the workflow_def directly.
286
+
224
287
  ## Common Patterns
225
288
 
226
289
  ### List Dashboard Rows