@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
package/dist/models.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// Sync Metadata (stored in description as HTML comment)
|
|
3
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
/**
|
|
5
|
+
* The key used to store sync metadata in status_log.
|
|
6
|
+
* Prefixed with underscore to indicate internal/system use.
|
|
7
|
+
*/
|
|
8
|
+
export const SYNC_METADATA_KEY = "_ema_sync";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import cron from "node-cron";
|
|
2
|
+
import { syncOnce } from "./sync.js";
|
|
3
|
+
export function startScheduler(cfg, state) {
|
|
4
|
+
const intervalSeconds = cfg.scheduler?.intervalSeconds ?? 300;
|
|
5
|
+
const cronExpr = cfg.scheduler?.cron;
|
|
6
|
+
// Prefer cron if provided
|
|
7
|
+
if (cronExpr) {
|
|
8
|
+
const task = cron.schedule(cronExpr, async () => {
|
|
9
|
+
await syncOnce(cfg, state);
|
|
10
|
+
});
|
|
11
|
+
task.start();
|
|
12
|
+
return { stop: () => task.stop() };
|
|
13
|
+
}
|
|
14
|
+
if (intervalSeconds && intervalSeconds > 0) {
|
|
15
|
+
const id = setInterval(() => {
|
|
16
|
+
void syncOnce(cfg, state);
|
|
17
|
+
}, intervalSeconds * 1000);
|
|
18
|
+
return { stop: () => clearInterval(id) };
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|