@yugabytedb/meko-mcp 2.1.0 → 2.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/README.md +152 -27
- package/assets/hooks-handlers/codex-session-end.sh +4 -69
- package/assets/hooks-handlers/cursor-session-start.sh +19 -1
- package/assets/hooks-handlers/lib/capture-notices.js +321 -0
- package/assets/hooks-handlers/lib/capture-state.js +2079 -0
- package/assets/hooks-handlers/lib/capture-status-cli.js +82 -0
- package/assets/hooks-handlers/lib/capture.js +1578 -299
- package/assets/hooks-handlers/lib/checkpoint-timer.js +444 -81
- package/assets/hooks-handlers/lib/kiro-handler.js +738 -0
- package/assets/hooks-handlers/lib/terminal-handoff.js +418 -0
- package/assets/hooks-handlers/session-end.sh +3 -34
- package/assets/scripts/meko-statusline.sh +41 -1
- package/assets/skills/meko-mcp-tools/SKILL.md +72 -125
- package/assets/skills/meko-mcp-tools/references/_sections.md +2 -2
- package/assets/skills/meko-mcp-tools/references/tools-agent-id-conventions.md +12 -13
- package/assets/skills/meko-mcp-tools/references/tools-cookbook.md +15 -12
- package/assets/skills/meko-mcp-tools/references/tools-known-limitations.md +25 -1
- package/assets/skills/meko-mcp-tools/references/tools-memory-vs-conversation.md +19 -77
- package/assets/skills/meko-mcp-tools/references/tools-overview.md +8 -7
- package/assets/skills/meko-mcp-tools/references/tools-troubleshooting.md +22 -1
- package/assets/skills/meko-mcp-tools/references/tools-user-id-conventions.md +1 -1
- package/assets/skills/meko-mcp-tools-desktop/SKILL.md +8 -8
- package/assets/skills/meko-mcp-tools-desktop/desktop/README.md +1 -1
- package/assets/skills/meko-mcp-tools-desktop/references/_sections.md +1 -1
- package/assets/skills/meko-mcp-tools-desktop/references/tools-agent-id-conventions.md +6 -1
- package/assets/skills/meko-mcp-tools-desktop/references/tools-cookbook.md +6 -5
- package/assets/skills/meko-mcp-tools-desktop/references/tools-memory-vs-conversation.md +4 -4
- package/assets/skills/meko-mcp-tools-desktop/references/tools-overview.md +7 -6
- package/assets/skills/meko-select-datapack-desktop/SKILL.md +1 -1
- package/assets/skills/meko-select-datapack-desktop/references/cookbook.md +3 -3
- package/bin/create-meko-setup.mjs +48 -10
- package/lib/capture-status.mjs +67 -0
- package/lib/clients/aliases.mjs +5 -0
- package/lib/clients/claude-desktop.mjs +120 -5
- package/lib/clients/codex.mjs +6 -3
- package/lib/clients/index.mjs +2 -0
- package/lib/clients/kiro.mjs +705 -0
- package/lib/config.mjs +90 -0
- package/lib/installer.mjs +1 -0
- package/lib/migrate/adapters/codex.mjs +490 -0
- package/lib/migrate/id.mjs +28 -3
- package/lib/migrate/orchestrator.mjs +34 -7
- package/lib/migrate.mjs +4 -2
- package/lib/prompt.mjs +16 -1
- package/package.json +4 -4
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* capture-status-cli.js — Print aggregate capture health (text or JSON).
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node capture-status-cli.js
|
|
7
|
+
* node capture-status-cli.js --json
|
|
8
|
+
*
|
|
9
|
+
* Exit codes (contracts):
|
|
10
|
+
* 0 healthy | catching_up
|
|
11
|
+
* 2 degraded_retrying
|
|
12
|
+
* 3 blocked_action_required
|
|
13
|
+
*
|
|
14
|
+
* Honors MEKO_WATERMARK_DIR. Invoked by installer --capture-status.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
const fs = require("fs");
|
|
20
|
+
const {
|
|
21
|
+
computeAggregateHealth,
|
|
22
|
+
importLegacyCaptureErrors,
|
|
23
|
+
legacyErrorsSafeToRemove,
|
|
24
|
+
readHealthCache,
|
|
25
|
+
scanStates,
|
|
26
|
+
writeHealthCache,
|
|
27
|
+
} = require("./capture-state");
|
|
28
|
+
const {
|
|
29
|
+
captureStatusJson,
|
|
30
|
+
exitCodeForStatus,
|
|
31
|
+
formatCaptureStatusText,
|
|
32
|
+
} = require("./capture-notices");
|
|
33
|
+
|
|
34
|
+
function parseArgs(argv) {
|
|
35
|
+
let json = false;
|
|
36
|
+
for (const a of argv) {
|
|
37
|
+
if (a === "--json") json = true;
|
|
38
|
+
else if (a === "--help" || a === "-h") {
|
|
39
|
+
process.stdout.write(
|
|
40
|
+
"Usage: node capture-status-cli.js [--json]\n" +
|
|
41
|
+
" Exit 0 healthy|catching_up, 2 degraded_retrying, 3 blocked_action_required\n",
|
|
42
|
+
);
|
|
43
|
+
process.exit(0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { json };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function main() {
|
|
50
|
+
const { json } = parseArgs(process.argv.slice(2));
|
|
51
|
+
importLegacyCaptureErrors();
|
|
52
|
+
const scan = scanStates({ includeBlocked: true });
|
|
53
|
+
for (const legacyPath of legacyErrorsSafeToRemove(scan)) {
|
|
54
|
+
try {
|
|
55
|
+
fs.unlinkSync(legacyPath);
|
|
56
|
+
} catch {
|
|
57
|
+
/* best effort; the next uncapped status/startup scan retries */
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!scan.ok && (!scan.entries || scan.entries.length === 0)) {
|
|
61
|
+
process.stderr.write(
|
|
62
|
+
`[meko-capture-status] scan warning: ${scan.error || "unknown"}\n`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const health = computeAggregateHealth(scan.entries || []);
|
|
67
|
+
const existing = readHealthCache();
|
|
68
|
+
if (existing && existing.last_notified_status !== undefined) {
|
|
69
|
+
health.last_notified_status = existing.last_notified_status;
|
|
70
|
+
}
|
|
71
|
+
writeHealthCache(health);
|
|
72
|
+
|
|
73
|
+
const payload = captureStatusJson(health);
|
|
74
|
+
if (json) {
|
|
75
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
76
|
+
} else {
|
|
77
|
+
process.stdout.write(`${formatCaptureStatusText(health)}\n`);
|
|
78
|
+
}
|
|
79
|
+
process.exit(exitCodeForStatus(payload.status));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
main();
|