@codeconductorai/harmony-mcp 1.0.10 → 1.0.11

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 CHANGED
@@ -27,12 +27,12 @@ Re-run `node -v` afterwards to confirm before continuing.
27
27
 
28
28
  ## Installation
29
29
 
30
- The server is published as `@codeconductorai/harmony-mcp` and run via `npx`, so no local build step is required. The commands below pin an exact version (`@1.0.10`) rather than a floating tag — this lets `npx` reuse its local cache instead of re-resolving the package from the registry on every agent startup, which otherwise makes MCP initialization noticeably slower (and occasionally hang). Bump the pinned version deliberately when you want to upgrade.
30
+ The server is published as `@codeconductorai/harmony-mcp` and run via `npx`, so no local build step is required. The commands below pin an exact version (`@1.0.11`) rather than a floating tag — this lets `npx` reuse its local cache instead of re-resolving the package from the registry on every agent startup, which otherwise makes MCP initialization noticeably slower (and occasionally hang). Bump the pinned version deliberately when you want to upgrade.
31
31
 
32
32
  ### Claude Code
33
33
 
34
34
  ```bash
35
- claude mcp add harmony -- npx -y @codeconductorai/harmony-mcp@1.0.10
35
+ claude mcp add harmony -- npx -y @codeconductorai/harmony-mcp@1.0.11
36
36
  ```
37
37
 
38
38
  ### Antigravity
@@ -47,7 +47,7 @@ Open **MCP Servers → Manage MCP Servers → View raw config** from the agent p
47
47
  "mcpServers": {
48
48
  "harmony": {
49
49
  "command": "npx",
50
- "args": ["-y", "@codeconductorai/harmony-mcp@1.0.10"]
50
+ "args": ["-y", "@codeconductorai/harmony-mcp@1.0.11"]
51
51
  }
52
52
  }
53
53
  }
@@ -58,7 +58,7 @@ Restart Antigravity (or reload MCP servers) after saving.
58
58
  ### Codex CLI
59
59
 
60
60
  ```bash
61
- codex mcp add harmony -- npx -y @codeconductorai/harmony-mcp@1.0.10
61
+ codex mcp add harmony -- npx -y @codeconductorai/harmony-mcp@1.0.11
62
62
  ```
63
63
 
64
64
  This writes the entry to `~/.codex/config.toml`. To add it by hand instead:
@@ -66,7 +66,7 @@ This writes the entry to `~/.codex/config.toml`. To add it by hand instead:
66
66
  ```toml
67
67
  [mcp_servers.harmony]
68
68
  command = "npx"
69
- args = ["-y", "@codeconductorai/harmony-mcp@1.0.10"]
69
+ args = ["-y", "@codeconductorai/harmony-mcp@1.0.11"]
70
70
  ```
71
71
 
72
72
  ### Aria
@@ -78,7 +78,7 @@ In the Aria Code panel, click the settings icon → **MCP Servers**, then scroll
78
78
  "mcpServers": {
79
79
  "harmony": {
80
80
  "command": "npx",
81
- "args": ["-y", "@codeconductorai/harmony-mcp@1.0.10"]
81
+ "args": ["-y", "@codeconductorai/harmony-mcp@1.0.11"]
82
82
  }
83
83
  }
84
84
  }
@@ -95,7 +95,7 @@ Any client that reads a `command`/`args` style config (e.g. Claude Desktop's `cl
95
95
  "mcpServers": {
96
96
  "harmony": {
97
97
  "command": "npx",
98
- "args": ["-y", "@codeconductorai/harmony-mcp@1.0.10"]
98
+ "args": ["-y", "@codeconductorai/harmony-mcp@1.0.11"]
99
99
  }
100
100
  }
101
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeconductorai/harmony-mcp",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -33,6 +33,7 @@
33
33
  "archiver": "^7.0.0",
34
34
  "form-data": "^4.0.0",
35
35
  "jose": "^6.2.3",
36
+ "minimatch": "^5.1.0",
36
37
  "node-fetch": "^3.3.2"
37
38
  }
38
39
  }
@@ -1,4 +1,6 @@
1
+ import fs from "fs";
1
2
  import path from "path";
3
+ import minimatch from "minimatch";
2
4
  import { WORKSPACE_MARKER } from "./workspaceMarker.js";
3
5
 
4
6
  export const EXCLUDED_DIR_NAMES = [
@@ -14,6 +16,8 @@ export const EXCLUDED_DIR_NAMES = [
14
16
  "vendor", "pkg", "cmake-build-debug", "cmake-build-release",
15
17
  // .NET / C#
16
18
  "obj",
19
+ // Secrets / credentials
20
+ ".ssh", ".aws", ".gnupg",
17
21
  ];
18
22
 
19
23
  export const EXCLUDED_DIR_SUFFIXES = [".egg-info"];
@@ -31,8 +35,58 @@ export const EXCLUDED_EXACT_FILENAMES = [
31
35
  ".DS_Store", "Thumbs.db", "package-lock.json", "yarn.lock", "pnpm-lock.yaml",
32
36
  ];
33
37
 
38
+ // Secret-bearing filenames, as glob patterns ("*" only) matched against the basename.
39
+ export const EXCLUDED_FILENAME_GLOBS = [
40
+ ".env", ".env.*", "*.pem", "*.key", "*.p12", "*.pfx", "*.keystore",
41
+ "id_rsa", "id_dsa", "id_ecdsa", "id_ed25519", ".npmrc", ".netrc",
42
+ "credentials.json", "*Credentials.json",
43
+ ];
44
+
45
+ function escapeRegExpLiteral(text) {
46
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
47
+ }
48
+
49
+ // Matches a basename against a glob pattern that only uses "*" as a wildcard.
50
+ function matchesFilenameGlob(name, pattern) {
51
+ if (!pattern.includes("*")) return name === pattern;
52
+ const regex = new RegExp(`^${pattern.split("*").map(escapeRegExpLiteral).join(".*")}$`);
53
+ return regex.test(name);
54
+ }
55
+
56
+ function gitignoreLineToGlobs(rawLine) {
57
+ let pattern = rawLine;
58
+ const dirOnly = pattern.endsWith("/");
59
+ if (dirOnly) pattern = pattern.slice(0, -1);
60
+ if (!pattern) return [];
61
+
62
+ const anchored = pattern.includes("/");
63
+ if (pattern.startsWith("/")) pattern = pattern.slice(1);
64
+ if (!pattern) return [];
65
+
66
+ return anchored
67
+ ? [pattern, `${pattern}/**`]
68
+ : [pattern, `**/${pattern}`, `${pattern}/**`, `**/${pattern}/**`];
69
+ }
70
+
71
+ // Reads .gitignore from the workspace root and expands its rules into glob patterns.
72
+ function loadGitignoreGlobs(workspaceRoot) {
73
+ let contents;
74
+ try {
75
+ contents = fs.readFileSync(path.join(workspaceRoot, ".gitignore"), "utf8");
76
+ } catch {
77
+ return [];
78
+ }
79
+ const globs = [];
80
+ for (const rawLine of contents.split(/\r?\n/)) {
81
+ const line = rawLine.trim();
82
+ if (!line || line.startsWith("#") || line.startsWith("!")) continue;
83
+ globs.push(...gitignoreLineToGlobs(line));
84
+ }
85
+ return globs;
86
+ }
87
+
34
88
  // Build the glob ignore list for archiver.glob() from the shared exclusion data above.
35
- export function buildZipIgnoreGlobs() {
89
+ export function buildZipIgnoreGlobs(workspaceRoot = process.cwd()) {
36
90
  const globs = [WORKSPACE_MARKER];
37
91
  for (const dir of EXCLUDED_DIR_NAMES) {
38
92
  globs.push(`${dir}/**`, `**/${dir}/**`);
@@ -46,6 +100,10 @@ export function buildZipIgnoreGlobs() {
46
100
  for (const name of EXCLUDED_EXACT_FILENAMES) {
47
101
  globs.push(name, `**/${name}`);
48
102
  }
103
+ for (const pattern of EXCLUDED_FILENAME_GLOBS) {
104
+ globs.push(pattern, `**/${pattern}`);
105
+ }
106
+ globs.push(...loadGitignoreGlobs(workspaceRoot));
49
107
  return globs;
50
108
  }
51
109
 
@@ -54,16 +112,27 @@ const WATCH_IGNORE_DIRS = new Set(EXCLUDED_DIR_NAMES);
54
112
  const WATCH_IGNORE_EXTENSIONS = new Set(EXCLUDED_EXTENSIONS);
55
113
  const WATCH_IGNORE_FILENAMES = new Set(EXCLUDED_EXACT_FILENAMES);
56
114
 
57
- // True if the path is inside an excluded directory or matches an ignored filename/extension/suffix.
115
+ // .gitignore is read once per process
116
+ let cachedGitignoreGlobs = null;
117
+ function getGitignoreGlobs() {
118
+ if (cachedGitignoreGlobs === null) {
119
+ cachedGitignoreGlobs = loadGitignoreGlobs(process.cwd());
120
+ }
121
+ return cachedGitignoreGlobs;
122
+ }
123
+
58
124
  export function shouldIgnore(filePath) {
59
125
  const relative = path.relative(process.cwd(), filePath);
60
126
  const parts = relative.split(path.sep);
61
127
  const base = parts[parts.length - 1];
62
128
  if (base === WORKSPACE_MARKER) return true;
63
129
  if (WATCH_IGNORE_FILENAMES.has(base)) return true;
130
+ if (EXCLUDED_FILENAME_GLOBS.some((pattern) => matchesFilenameGlob(base, pattern))) return true;
64
131
  if (parts.some((part) => WATCH_IGNORE_DIRS.has(part) || EXCLUDED_DIR_SUFFIXES.some((s) => part.endsWith(s)))) {
65
132
  return true;
66
133
  }
134
+ const posixRelative = parts.join("/");
135
+ if (getGitignoreGlobs().some((glob) => minimatch(posixRelative, glob, { dot: true }))) return true;
67
136
  const dotIndex = base.lastIndexOf(".");
68
137
  const ext = dotIndex > 0 ? base.slice(dotIndex + 1).toLowerCase() : "";
69
138
  return WATCH_IGNORE_EXTENSIONS.has(ext);
@@ -30,7 +30,7 @@ async function zipWorkspace() {
30
30
  // the ones in EXCLUDED_DIR_NAMES) — dotfiles need to reach the ignore-list check, not be
31
31
  // filtered out upstream of it.
32
32
  dot: true,
33
- ignore: buildZipIgnoreGlobs(),
33
+ ignore: buildZipIgnoreGlobs(workspacePath),
34
34
  });
35
35
  archive.finalize();
36
36
  });
@@ -171,7 +171,7 @@ const TERMINAL_STATUSES = new Set([
171
171
 
172
172
  async function fetchWorkspaceStatus(workspaceId) {
173
173
  const token = await getAccessToken();
174
- const url = new URL(`/api/code-workspace/${workspaceId}/overview`, API_URL);
174
+ const url = new URL(`/api/code-workspace/${workspaceId}/status`, API_URL);
175
175
  url.searchParams.set("productId", PRODUCT_ID);
176
176
  url.searchParams.set("appId", APP_ID);
177
177
  url.searchParams.set("repoId", REPO_ID);
@@ -181,7 +181,7 @@ async function fetchWorkspaceStatus(workspaceId) {
181
181
  if (response.status === 404) return null;
182
182
  const body = await response.text();
183
183
  if (!response.ok) {
184
- throw new Error(`Workspace overview request failed: ${response.status} ${body}`);
184
+ throw new Error(`Workspace status request failed: ${response.status} ${body}`);
185
185
  }
186
186
  const match = body.match(/<status>([^<]+)<\/status>/i);
187
187
  return match ? match[1].trim() : null;