@gethmy/mcp 2.3.0 → 2.3.2
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/dist/cli.js +80 -23
- package/dist/index.js +80 -23
- package/dist/lib/active-learning.js +939 -787
- package/dist/lib/api-client.js +2527 -638
- package/dist/lib/auto-session.js +177 -196
- package/dist/lib/cli.js +34954 -128
- package/dist/lib/config.js +235 -201
- package/dist/lib/consolidation.js +374 -289
- package/dist/lib/context-assembly.js +1265 -838
- package/dist/lib/graph-expansion.js +139 -155
- package/dist/lib/http.js +1917 -130
- package/dist/lib/index.js +29525 -5
- package/dist/lib/lifecycle-maintenance.js +663 -79
- package/dist/lib/memory-cleanup.js +1316 -381
- package/dist/lib/onboard.js +2588 -32
- package/dist/lib/prompt-builder.js +438 -445
- package/dist/lib/remote.js +31733 -143
- package/dist/lib/server.js +29389 -3216
- package/dist/lib/skills.js +315 -132
- package/dist/lib/tui/agents.js +128 -107
- package/dist/lib/tui/docs.js +1590 -687
- package/dist/lib/tui/setup.js +5698 -804
- package/dist/lib/tui/theme.js +183 -86
- package/dist/lib/tui/writer.js +1149 -176
- package/package.json +2 -2
- package/src/api-client.ts +37 -1
- package/src/memory-cleanup.ts +92 -52
- package/src/server.ts +16 -1
- package/dist/lib/__tests__/active-learning.test.js +0 -386
- package/dist/lib/__tests__/agent-performance-profiles.test.js +0 -325
- package/dist/lib/__tests__/auto-session.test.js +0 -661
- package/dist/lib/__tests__/context-assembly.test.js +0 -362
- package/dist/lib/__tests__/graph-expansion.test.js +0 -150
- package/dist/lib/__tests__/integration-memory-crud.test.js +0 -797
- package/dist/lib/__tests__/integration-memory-system.test.js +0 -281
- package/dist/lib/__tests__/lifecycle-maintenance.test.js +0 -207
- package/dist/lib/__tests__/pattern-detection.test.js +0 -295
- package/dist/lib/__tests__/prompt-builder.test.js +0 -418
package/dist/lib/tui/theme.js
CHANGED
|
@@ -1,95 +1,192 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
warning: "\u26A0",
|
|
18
|
-
pointer: "\u276F",
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
info: (text) => pc.blue(text),
|
|
30
|
-
// Text
|
|
31
|
-
dim: (text) => pc.dim(text),
|
|
32
|
-
bold: (text) => pc.bold(text),
|
|
33
|
-
muted: (text) => pc.gray(text),
|
|
34
|
-
// Highlights
|
|
35
|
-
highlight: (text) => pc.cyan(text),
|
|
36
|
-
link: (text) => pc.underline(pc.cyan(text)),
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
37
27
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
29
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
+
|
|
31
|
+
// ../../node_modules/picocolors/picocolors.js
|
|
32
|
+
var require_picocolors = __commonJS((exports, module) => {
|
|
33
|
+
var p = process || {};
|
|
34
|
+
var argv = p.argv || [];
|
|
35
|
+
var env = p.env || {};
|
|
36
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
37
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
38
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
39
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
40
|
+
};
|
|
41
|
+
var replaceClose = (string, close, replace, index) => {
|
|
42
|
+
let result = "", cursor = 0;
|
|
43
|
+
do {
|
|
44
|
+
result += string.substring(cursor, index) + replace;
|
|
45
|
+
cursor = index + close.length;
|
|
46
|
+
index = string.indexOf(close, cursor);
|
|
47
|
+
} while (~index);
|
|
48
|
+
return result + string.substring(cursor);
|
|
49
|
+
};
|
|
50
|
+
var createColors = (enabled = isColorSupported) => {
|
|
51
|
+
let f = enabled ? formatter : () => String;
|
|
52
|
+
return {
|
|
53
|
+
isColorSupported: enabled,
|
|
54
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
55
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
56
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
57
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
58
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
59
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
60
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
61
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
62
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
63
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
64
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
65
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
66
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
67
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
68
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
69
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
70
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
71
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
72
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
73
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
74
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
75
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
76
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
77
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
78
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
79
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
80
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
81
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
82
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
83
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
84
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
85
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
86
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
87
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
88
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
89
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
90
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
91
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
92
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
93
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
94
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
module.exports = createColors();
|
|
98
|
+
module.exports.createColors = createColors;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// src/tui/theme.ts
|
|
102
|
+
var pc = __toESM(require_picocolors(), 1);
|
|
103
|
+
var symbols = {
|
|
104
|
+
harmony: "▲",
|
|
105
|
+
check: "✓",
|
|
106
|
+
cross: "✗",
|
|
107
|
+
bullet: "•",
|
|
108
|
+
arrow: "→",
|
|
109
|
+
arrowRight: "▸",
|
|
110
|
+
dot: "●",
|
|
111
|
+
dotEmpty: "○",
|
|
112
|
+
info: "ℹ",
|
|
113
|
+
warning: "⚠",
|
|
114
|
+
pointer: "❯"
|
|
115
|
+
};
|
|
116
|
+
var colors = {
|
|
117
|
+
brand: (text) => pc.cyan(text),
|
|
118
|
+
brandBold: (text) => pc.bold(pc.cyan(text)),
|
|
119
|
+
success: (text) => pc.green(text),
|
|
120
|
+
error: (text) => pc.red(text),
|
|
121
|
+
warning: (text) => pc.yellow(text),
|
|
122
|
+
info: (text) => pc.blue(text),
|
|
123
|
+
dim: (text) => pc.dim(text),
|
|
124
|
+
bold: (text) => pc.bold(text),
|
|
125
|
+
muted: (text) => pc.gray(text),
|
|
126
|
+
highlight: (text) => pc.cyan(text),
|
|
127
|
+
link: (text) => pc.underline(pc.cyan(text))
|
|
128
|
+
};
|
|
129
|
+
var messages = {
|
|
130
|
+
header: () => {
|
|
131
|
+
return `
|
|
42
132
|
${colors.brandBold(" HARMONY")}
|
|
43
133
|
${colors.dim(" Project management for AI agents")}
|
|
44
134
|
`;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
135
|
+
},
|
|
136
|
+
done: (message) => {
|
|
137
|
+
return `${colors.success(symbols.check)} ${message}`;
|
|
138
|
+
},
|
|
139
|
+
fail: (message) => {
|
|
140
|
+
return `${colors.error(symbols.cross)} ${message}`;
|
|
141
|
+
},
|
|
142
|
+
skip: (message) => {
|
|
143
|
+
return `${colors.dim("-")} ${colors.dim(message)}`;
|
|
144
|
+
},
|
|
145
|
+
step: (number, total, message) => {
|
|
146
|
+
return `${colors.dim(`[${number}/${total}]`)} ${message}`;
|
|
147
|
+
},
|
|
148
|
+
fileCreated: (path) => {
|
|
149
|
+
return ` ${colors.success(symbols.check)} ${colors.dim(path)}`;
|
|
150
|
+
},
|
|
151
|
+
fileSkipped: (path) => {
|
|
152
|
+
return ` ${colors.dim(symbols.bullet)} ${colors.dim(path)} ${colors.dim("(exists)")}`;
|
|
153
|
+
},
|
|
154
|
+
fileError: (path, error) => {
|
|
155
|
+
return ` ${colors.error(symbols.cross)} ${path}: ${colors.error(error)}`;
|
|
156
|
+
}
|
|
67
157
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
158
|
+
function box(title, content) {
|
|
159
|
+
const lines = content.split(`
|
|
160
|
+
`);
|
|
161
|
+
const maxWidth = Math.max(title.length, ...lines.map((l) => l.length));
|
|
162
|
+
const width = maxWidth + 4;
|
|
163
|
+
const top = `┌${"─".repeat(width)}┐`;
|
|
164
|
+
const bottom = `└${"─".repeat(width)}┘`;
|
|
165
|
+
const titleLine = `│ ${colors.bold(title)}${" ".repeat(width - title.length - 1)}│`;
|
|
166
|
+
const contentLines = lines.map((line) => `│ ${line}${" ".repeat(width - line.length - 1)}│`).join(`
|
|
167
|
+
`);
|
|
168
|
+
return `${top}
|
|
169
|
+
${titleLine}
|
|
170
|
+
${contentLines}
|
|
171
|
+
${bottom}`;
|
|
80
172
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return path;
|
|
173
|
+
function formatPath(path, homeDir) {
|
|
174
|
+
if (path.startsWith(homeDir)) {
|
|
175
|
+
return `~${path.slice(homeDir.length)}`;
|
|
176
|
+
}
|
|
177
|
+
return path;
|
|
87
178
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.map((line) => `${pad}${line}`)
|
|
94
|
-
.join("\n");
|
|
179
|
+
function indent(text, spaces = 2) {
|
|
180
|
+
const pad = " ".repeat(spaces);
|
|
181
|
+
return text.split(`
|
|
182
|
+
`).map((line) => `${pad}${line}`).join(`
|
|
183
|
+
`);
|
|
95
184
|
}
|
|
185
|
+
export {
|
|
186
|
+
symbols,
|
|
187
|
+
messages,
|
|
188
|
+
indent,
|
|
189
|
+
formatPath,
|
|
190
|
+
colors,
|
|
191
|
+
box
|
|
192
|
+
};
|