@gethmy/mcp 2.2.0 → 2.2.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/README.md +5 -7
- package/dist/cli.js +2515 -2134
- package/dist/http.js +6 -4
- package/dist/index.js +8088 -7890
- package/dist/lib/__tests__/auto-session.test.js +33 -33
- package/dist/lib/api-client.js +116 -0
- package/dist/lib/auto-session.js +41 -5
- package/dist/lib/cli.js +9 -0
- package/dist/lib/onboard.js +36 -0
- package/dist/lib/server.js +150 -169
- package/dist/lib/skills.js +1 -1
- package/dist/lib/tui/setup.js +212 -59
- package/dist/remote.js +7132 -10614
- package/package.json +2 -1
- package/src/__tests__/auto-session.test.ts +33 -33
- package/src/api-client.ts +205 -0
- package/src/auto-session.ts +54 -4
- package/src/cli.ts +9 -0
- package/src/onboard.ts +93 -0
- package/src/remote.ts +2 -1
- package/src/server.ts +178 -221
- package/src/skills.ts +1 -1
- package/src/tui/setup.ts +249 -67
package/dist/http.js
CHANGED
|
@@ -26,6 +26,7 @@ var __export = (target, all) => {
|
|
|
26
26
|
set: (newValue) => all[name] = () => newValue
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
29
30
|
var __require = import.meta.require;
|
|
30
31
|
|
|
31
32
|
// src/http.ts
|
|
@@ -1637,7 +1638,7 @@ var cors = (options) => {
|
|
|
1637
1638
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
1638
1639
|
import { homedir } from "os";
|
|
1639
1640
|
import { join } from "path";
|
|
1640
|
-
var DEFAULT_API_URL = "https://gethmy.com/api";
|
|
1641
|
+
var DEFAULT_API_URL = "https://app.gethmy.com/api";
|
|
1641
1642
|
var LOCAL_CONFIG_FILENAME = ".harmony-mcp.json";
|
|
1642
1643
|
function getConfigDir() {
|
|
1643
1644
|
return join(homedir(), ".harmony-mcp");
|
|
@@ -1730,7 +1731,7 @@ function hasLocalConfig(cwd) {
|
|
|
1730
1731
|
function getApiKey() {
|
|
1731
1732
|
const config = loadConfig();
|
|
1732
1733
|
if (!config.apiKey) {
|
|
1733
|
-
throw new Error(`Not configured. Run "
|
|
1734
|
+
throw new Error(`Not configured. Run "npx @gethmy/mcp setup" to set your API key.
|
|
1734
1735
|
` + "You can generate an API key at https://gethmy.com \u2192 Settings \u2192 API Keys.");
|
|
1735
1736
|
}
|
|
1736
1737
|
return config.apiKey;
|
|
@@ -1823,6 +1824,7 @@ var app = new Hono2;
|
|
|
1823
1824
|
app.use("/*", cors({
|
|
1824
1825
|
origin: [
|
|
1825
1826
|
"https://gethmy.com",
|
|
1827
|
+
"https://app.gethmy.com",
|
|
1826
1828
|
"http://localhost:8080",
|
|
1827
1829
|
"http://localhost:3000"
|
|
1828
1830
|
],
|
|
@@ -1841,7 +1843,7 @@ async function forwardToApi(method, path, authHeader, apiKey, body) {
|
|
|
1841
1843
|
if (apiKey) {
|
|
1842
1844
|
headers["X-API-Key"] = apiKey;
|
|
1843
1845
|
} else if (authHeader) {
|
|
1844
|
-
headers
|
|
1846
|
+
headers.Authorization = authHeader;
|
|
1845
1847
|
} else {
|
|
1846
1848
|
throw new Error("Unauthorized: Missing API key or Authorization header");
|
|
1847
1849
|
}
|
|
@@ -1899,7 +1901,7 @@ async function handleRequest(c, method, path) {
|
|
|
1899
1901
|
try {
|
|
1900
1902
|
const authHeader = c.req.header("Authorization");
|
|
1901
1903
|
const apiKey = c.req.header("X-API-Key");
|
|
1902
|
-
let body
|
|
1904
|
+
let body;
|
|
1903
1905
|
if (["POST", "PATCH", "PUT"].includes(method)) {
|
|
1904
1906
|
try {
|
|
1905
1907
|
body = await c.json();
|