lema-mcp 0.4.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/bin/lema-mcp.js +51 -0
- package/package.json +39 -0
package/bin/lema-mcp.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Launcher for `npx lema-mcp`: resolve the prebuilt Go binary for this platform
|
|
3
|
+
// (shipped as an optionalDependency — the esbuild/turbo pattern) and exec it with
|
|
4
|
+
// the same args and stdio. The server itself is pure Go; this shim is the npm
|
|
5
|
+
// front door so a user with only Node can run it — no Go toolchain, no account.
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const { spawnSync } = require('child_process');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
// process.arch uses Node's names (x64, arm64); map "<platform>-<arch>" to the
|
|
12
|
+
// per-platform package that carries the matching binary.
|
|
13
|
+
const PKG = {
|
|
14
|
+
'darwin-arm64': 'lema-mcp-darwin-arm64',
|
|
15
|
+
'darwin-x64': 'lema-mcp-darwin-x64',
|
|
16
|
+
'linux-x64': 'lema-mcp-linux-x64',
|
|
17
|
+
'linux-arm64': 'lema-mcp-linux-arm64',
|
|
18
|
+
'win32-x64': 'lema-mcp-win32-x64',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const key = `${process.platform}-${process.arch}`;
|
|
22
|
+
const pkg = PKG[key];
|
|
23
|
+
if (!pkg) {
|
|
24
|
+
console.error(
|
|
25
|
+
`lema-mcp: no prebuilt binary for ${key}.\n` +
|
|
26
|
+
`Build from source instead: go install github.com/lemahq/lema-mcp/cmd/lema-mcp@latest`
|
|
27
|
+
);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const binName = process.platform === 'win32' ? 'lema-mcp.exe' : 'lema-mcp';
|
|
32
|
+
|
|
33
|
+
let binPath;
|
|
34
|
+
try {
|
|
35
|
+
// Resolve via the platform package's manifest, then locate its binary — robust
|
|
36
|
+
// regardless of install layout (hoisted or nested node_modules).
|
|
37
|
+
binPath = path.join(path.dirname(require.resolve(`${pkg}/package.json`)), 'bin', binName);
|
|
38
|
+
} catch {
|
|
39
|
+
console.error(
|
|
40
|
+
`lema-mcp: the platform package "${pkg}" is not installed.\n` +
|
|
41
|
+
`Reinstall lema-mcp, or build from source: go install github.com/lemahq/lema-mcp/cmd/lema-mcp@latest`
|
|
42
|
+
);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
47
|
+
if (result.error) {
|
|
48
|
+
console.error(`lema-mcp: failed to start ${binPath}: ${result.error.message}`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lema-mcp",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Local, database-less MCP server that makes your repo's decisions — and what it ruled out — queryable by your coding agent, and lets the agent record new ones with enforced never-reopen.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"lema-mcp": "bin/lema-mcp.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin"
|
|
10
|
+
],
|
|
11
|
+
"optionalDependencies": {
|
|
12
|
+
"lema-mcp-darwin-arm64": "0.4.0",
|
|
13
|
+
"lema-mcp-darwin-x64": "0.4.0",
|
|
14
|
+
"lema-mcp-linux-x64": "0.4.0",
|
|
15
|
+
"lema-mcp-linux-arm64": "0.4.0"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/lemahq/lema-mcp.git"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://lema.sh",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"model-context-protocol",
|
|
29
|
+
"claude",
|
|
30
|
+
"claude-code",
|
|
31
|
+
"cursor",
|
|
32
|
+
"adr",
|
|
33
|
+
"architecture-decision-records",
|
|
34
|
+
"decisions",
|
|
35
|
+
"ai",
|
|
36
|
+
"agent",
|
|
37
|
+
"context"
|
|
38
|
+
]
|
|
39
|
+
}
|