@gethmy/mcp 2.3.1 → 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.
Files changed (34) hide show
  1. package/dist/lib/active-learning.js +939 -787
  2. package/dist/lib/api-client.js +2527 -644
  3. package/dist/lib/auto-session.js +177 -196
  4. package/dist/lib/cli.js +34954 -128
  5. package/dist/lib/config.js +235 -201
  6. package/dist/lib/consolidation.js +374 -289
  7. package/dist/lib/context-assembly.js +1265 -838
  8. package/dist/lib/graph-expansion.js +139 -155
  9. package/dist/lib/http.js +1917 -130
  10. package/dist/lib/index.js +29525 -5
  11. package/dist/lib/lifecycle-maintenance.js +663 -79
  12. package/dist/lib/memory-cleanup.js +1315 -409
  13. package/dist/lib/onboard.js +2588 -32
  14. package/dist/lib/prompt-builder.js +438 -445
  15. package/dist/lib/remote.js +31733 -143
  16. package/dist/lib/server.js +29388 -3229
  17. package/dist/lib/skills.js +315 -132
  18. package/dist/lib/tui/agents.js +128 -107
  19. package/dist/lib/tui/docs.js +1590 -687
  20. package/dist/lib/tui/setup.js +5698 -804
  21. package/dist/lib/tui/theme.js +183 -86
  22. package/dist/lib/tui/writer.js +1149 -176
  23. package/package.json +2 -2
  24. package/src/memory-cleanup.ts +2 -4
  25. package/dist/lib/__tests__/active-learning.test.js +0 -386
  26. package/dist/lib/__tests__/agent-performance-profiles.test.js +0 -325
  27. package/dist/lib/__tests__/auto-session.test.js +0 -661
  28. package/dist/lib/__tests__/context-assembly.test.js +0 -362
  29. package/dist/lib/__tests__/graph-expansion.test.js +0 -150
  30. package/dist/lib/__tests__/integration-memory-crud.test.js +0 -797
  31. package/dist/lib/__tests__/integration-memory-system.test.js +0 -281
  32. package/dist/lib/__tests__/lifecycle-maintenance.test.js +0 -207
  33. package/dist/lib/__tests__/pattern-detection.test.js +0 -295
  34. package/dist/lib/__tests__/prompt-builder.test.js +0 -418
@@ -1,95 +1,192 @@
1
- import * as pc from "picocolors";
2
- /**
3
- * Consistent theme for Harmony MCP TUI
4
- * Uses picocolors for lightweight color output
5
- */
6
- // Brand colors and symbols
7
- export const symbols = {
8
- harmony: "\u25B2", // Triangle for Harmony logo
9
- check: "\u2713",
10
- cross: "\u2717",
11
- bullet: "\u2022",
12
- arrow: "\u2192",
13
- arrowRight: "\u25B8",
14
- dot: "\u25CF",
15
- dotEmpty: "\u25CB",
16
- info: "\u2139",
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
- // Color functions
21
- export const colors = {
22
- // Brand
23
- brand: (text) => pc.cyan(text),
24
- brandBold: (text) => pc.bold(pc.cyan(text)),
25
- // Status
26
- success: (text) => pc.green(text),
27
- error: (text) => pc.red(text),
28
- warning: (text) => pc.yellow(text),
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
- // Styled messages
39
- export const messages = {
40
- header: () => {
41
- return `
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
- done: (message) => {
47
- return `${colors.success(symbols.check)} ${message}`;
48
- },
49
- fail: (message) => {
50
- return `${colors.error(symbols.cross)} ${message}`;
51
- },
52
- skip: (message) => {
53
- return `${colors.dim("-")} ${colors.dim(message)}`;
54
- },
55
- step: (number, total, message) => {
56
- return `${colors.dim(`[${number}/${total}]`)} ${message}`;
57
- },
58
- fileCreated: (path) => {
59
- return ` ${colors.success(symbols.check)} ${colors.dim(path)}`;
60
- },
61
- fileSkipped: (path) => {
62
- return ` ${colors.dim(symbols.bullet)} ${colors.dim(path)} ${colors.dim("(exists)")}`;
63
- },
64
- fileError: (path, error) => {
65
- return ` ${colors.error(symbols.cross)} ${path}: ${colors.error(error)}`;
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
- // Box drawing for sections
69
- export function box(title, content) {
70
- const lines = content.split("\n");
71
- const maxWidth = Math.max(title.length, ...lines.map((l) => l.length));
72
- const width = maxWidth + 4;
73
- const top = `\u250C${"─".repeat(width)}\u2510`;
74
- const bottom = `\u2514${"─".repeat(width)}\u2518`;
75
- const titleLine = `\u2502 ${colors.bold(title)}${" ".repeat(width - title.length - 1)}\u2502`;
76
- const contentLines = lines
77
- .map((line) => `\u2502 ${line}${" ".repeat(width - line.length - 1)}\u2502`)
78
- .join("\n");
79
- return `${top}\n${titleLine}\n${contentLines}\n${bottom}`;
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
- // Format file paths for display (shorten home directory)
82
- export function formatPath(path, homeDir) {
83
- if (path.startsWith(homeDir)) {
84
- return `~${path.slice(homeDir.length)}`;
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
- // Indent helper
89
- export function indent(text, spaces = 2) {
90
- const pad = " ".repeat(spaces);
91
- return text
92
- .split("\n")
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
+ };