@ema.co/mcp-toolkit 1.5.2 → 1.7.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.
Potentially problematic release.
This version of @ema.co/mcp-toolkit might be problematic. Click here for more details.
- package/README.md +2 -2
- package/dist/mcp/handlers-consolidated.js +773 -25
- package/dist/mcp/resources.js +124 -0
- package/dist/mcp/server.js +13 -205
- package/dist/mcp/tools-consolidated.js +163 -103
- package/dist/sdk/action-registry.js +128 -0
- package/dist/sdk/action-schema-parser.js +379 -0
- package/dist/sdk/client.js +757 -90
- package/dist/sdk/generated/api-types.js +11 -0
- package/dist/sdk/index.js +59 -2
- package/dist/sdk/intent-architect.js +883 -0
- package/dist/sdk/knowledge.js +38 -8
- package/dist/sdk/quality-gates.js +386 -0
- package/dist/sdk/sanitizer.js +1121 -0
- package/dist/sdk/structural-rules.js +290 -0
- package/dist/sdk/workflow-generator.js +88 -34
- package/dist/sdk/workflow-intent.js +237 -24
- package/dist/sdk/workflow-optimizer.js +665 -0
- package/dist/sdk/workflow-tracer.js +648 -0
- package/dist/sdk/workflow-transformer.js +10 -0
- package/dist/sdk/workflow-validator.js +609 -0
- package/docs/local-generation.md +508 -0
- package/docs/mcp-flow-diagram.md +135 -0
- package/docs/mcp-tools-guide.md +196 -204
- package/docs/release-process.md +153 -0
- package/docs/tool-consolidation-proposal.md +166 -378
- package/package.json +8 -2
- package/resources/action-schema.json +5678 -0
- package/resources/config/gates.json +88 -0
- package/resources/config/gates.schema.json +77 -0
- package/resources/templates/auto-builder-rules.md +222 -0
- package/resources/templates/demo-scenarios/test-published-package.md +116 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated TypeScript types from Ema Platform OpenAPI spec.
|
|
3
|
+
* Generated from: Ema Platform API v1.0.0
|
|
4
|
+
* Generated at: 2026-01-16T13:46:50.729Z
|
|
5
|
+
*
|
|
6
|
+
* DO NOT EDIT MANUALLY - regenerate with: npm run generate:types
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
10
|
+
// API Operation Types
|
|
11
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
package/dist/sdk/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Models: TypeScript types for API entities
|
|
9
9
|
*/
|
|
10
10
|
// API Client
|
|
11
|
-
export { EmaClient, EmaApiError } from "./client.js";
|
|
11
|
+
export { EmaClient, EmaApiError, } from "./client.js";
|
|
12
12
|
// Sync SDK
|
|
13
13
|
export { SyncSDK, } from "./sync.js";
|
|
14
14
|
// Sync Options (hierarchical config from .ema.yaml)
|
|
@@ -33,8 +33,14 @@ export {
|
|
|
33
33
|
compileWorkflow,
|
|
34
34
|
// Settings builders
|
|
35
35
|
buildVoiceConfig, buildChatConfig, } from "./workflow-generator.js";
|
|
36
|
+
// Action Registry (API-driven action/template definitions)
|
|
37
|
+
export { ActionRegistry, ensureActionRegistry, parseActionDefinition, parseTemplateDefinition, } from "./action-registry.js";
|
|
36
38
|
// Workflow Intent (Normalization layer)
|
|
37
|
-
export { parseInput, validateIntent, intentToSpec, detectInputType, parseNaturalLanguage, parsePartialSpec,
|
|
39
|
+
export { parseInput, validateIntent, intentToSpec, detectInputType, parseNaturalLanguage, parsePartialSpec,
|
|
40
|
+
// LLM-driven generation
|
|
41
|
+
needsLLMGeneration, generateWorkflow, parseWorkflowSpecFromLLM, } from "./workflow-intent.js";
|
|
42
|
+
// Workflow Validator (API-driven validation)
|
|
43
|
+
export { APISchemaRegistry, ensureSchemaRegistry, resetSchemaRegistry, getSchemaRegistry, validateWorkflowSpec, generateActionCatalogForLLM, generateTemplateCatalogForLLM, } from "./workflow-validator.js";
|
|
38
44
|
// Generation Schema (Compact format for LLM-based generation)
|
|
39
45
|
export { generateSchema, generateSchemaMarkdown, buildCompactAgents, buildTypeRules, buildConstraints, getAgentSchema, isTypeCompatible, getRecommendedInput, } from "./generation-schema.js";
|
|
40
46
|
// Version Tracking (Persona version history management)
|
|
@@ -49,3 +55,54 @@ export { VersionPolicyEngine, createVersionPolicyEngine, } from "./version-polic
|
|
|
49
55
|
export { analyzeExecutionFlow, detectLoops, detectMultipleResponders, detectRedundantClassifiers, analyzeDataFlow, findDeadCodePaths, generateASCIIFlow, } from "./workflow-execution-analyzer.js";
|
|
50
56
|
// Workflow Fixer (Auto-fix including multiple responder issues)
|
|
51
57
|
export { autoFixWorkflow, suggestFixes, } from "./workflow-fixer.js";
|
|
58
|
+
// Intent Architect (WHY + WHAT, not HOW - with progressive enhancement)
|
|
59
|
+
// NOTE: intent-decomposition.ts and intent-decomposition-v2.ts were removed as part of consolidation.
|
|
60
|
+
// All intent processing now goes through the Intent Architect module.
|
|
61
|
+
export {
|
|
62
|
+
// Prompt generation
|
|
63
|
+
getIntentArchitectPrompt, generateIntentArchitectUserPrompt, getIntentArchitectPromptPackage,
|
|
64
|
+
// Response parsing
|
|
65
|
+
parseIntentArchitectResponse,
|
|
66
|
+
// LLM-driven complexity detection (recommended)
|
|
67
|
+
getComplexityDetectionPrompt, parseComplexitySignalsFromLLM,
|
|
68
|
+
// Regex fallback (offline/emergency)
|
|
69
|
+
analyzeComplexityFallback, analyzeComplexity, // Alias for fallback (backward compat)
|
|
70
|
+
// Strategy selection
|
|
71
|
+
selectIntentStrategy,
|
|
72
|
+
// Gate config loading (config over constants)
|
|
73
|
+
loadGateConfig, getGateDefinitions,
|
|
74
|
+
// Gate definitions and weights (GATE_DEFINITIONS is deprecated, use getGateDefinitions)
|
|
75
|
+
GATE_DEFINITIONS, computeGateWeights, getGatesWithWeights, getRequiredGates, getDiscoveryGates,
|
|
76
|
+
// Conversion utilities
|
|
77
|
+
complexityAssessmentToEnum, enumToComplexityAssessment,
|
|
78
|
+
// === CANONICAL ENTRYPOINT ===
|
|
79
|
+
// Handler should call ONLY runIntentArchitect for intent processing
|
|
80
|
+
runIntentArchitect, } from "./intent-architect.js";
|
|
81
|
+
// Workflow Optimizer (Health scoring & optimization recommendations)
|
|
82
|
+
export { analyzeOptimizations, summarizeOptimizationReport, } from "./workflow-optimizer.js";
|
|
83
|
+
// Workflow Tracer (Flow visualization & path analysis)
|
|
84
|
+
export { traceWorkflow, generateDetailedTrace, formatFlowTrace, formatDetailedTrace, } from "./workflow-tracer.js";
|
|
85
|
+
// Quality Gates (Pre-deploy validation)
|
|
86
|
+
export { runQualityGates, canDeploy, getQualityGates, formatQualityReport, } from "./quality-gates.js";
|
|
87
|
+
// Structural Rules (LLM validation context)
|
|
88
|
+
export { STRUCTURAL_RULES_FOR_LLM, STRUCTURAL_INVARIANTS, EXECUTION_RULES, COMMON_STRUCTURAL_MISTAKES, getAllStructuralRules, getInvariantById, getCriticalInvariants, } from "./structural-rules.js";
|
|
89
|
+
// Action Schema Parser (Parse ema_backend/grpc definitions)
|
|
90
|
+
export { parseTextproto, parseActionDirectory, loadDocumentation, generateSchemaBundle, isTypeCompatible as isSchemaTypeCompatible, TYPE_COMPATIBILITY, } from "./action-schema-parser.js";
|
|
91
|
+
// Data Sanitizer (PII detection and replacement for demo environments)
|
|
92
|
+
export {
|
|
93
|
+
// Core sanitization
|
|
94
|
+
SanitizationSession, sanitizeText, sanitizePersona, DEFAULT_POLICY,
|
|
95
|
+
// Type inference
|
|
96
|
+
normalizeExample, inferEntityType, getClassForType,
|
|
97
|
+
// Pattern detection
|
|
98
|
+
detectWithPatterns,
|
|
99
|
+
// LLM detection helpers
|
|
100
|
+
buildDetectionPrompt, parseLLMDetectionResponse,
|
|
101
|
+
// Consistency mapping
|
|
102
|
+
mergeDetections, applyReplacements, applySessionMappings, deepApplySessionMappings,
|
|
103
|
+
// Field extraction
|
|
104
|
+
extractTextFields, setAtPath,
|
|
105
|
+
// User confirmation flow
|
|
106
|
+
buildConfirmationPrompt, parseConfirmationResponse,
|
|
107
|
+
// LLM-based field classification
|
|
108
|
+
extractSchemaForLLM, buildFieldClassificationPrompt, parseFieldClassificationResponse, pathMatchesClassification, } from "./sanitizer.js";
|