lemma-mcp 0.18.0 → 0.18.1
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/package.json +3 -2
- package/scripts/postinstall.mjs +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lemma-mcp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "Persistent memory layer for LLMs via MCP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
+
"scripts/postinstall.mjs",
|
|
18
19
|
"assets/visualizer.html",
|
|
19
20
|
"assets/visualizer-demo.gif",
|
|
20
21
|
"README.md",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"scripts": {
|
|
25
26
|
"build": "tsc && node -e \"const fs=require('fs');const p=require('path');const s=p.join('assets','visualizer.html');const d=p.join('dist','server','visualizer.html');if(fs.existsSync(s)){fs.mkdirSync(p.dirname(d),{recursive:true});fs.copyFileSync(s,d);console.log('Copied visualizer.html to dist/server/')}else{console.warn('Warning: assets/visualizer.html not found')}\"",
|
|
26
27
|
"prepare": "npm run build",
|
|
27
|
-
"postinstall": "node
|
|
28
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
28
29
|
"typecheck": "tsc --noEmit --project tsconfig.test.json",
|
|
29
30
|
"start": "node dist/index.js",
|
|
30
31
|
"prepublishOnly": "npm run build",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Postinstall bootstrap: writes Lemma's SKILL.md to ~/.agents/skills/lemma/ so
|
|
2
|
+
// skill-format clients (Codex, Claude Code) load Lemma's usage rules.
|
|
3
|
+
//
|
|
4
|
+
// Guarded: no-op when dist/ is absent — e.g. cloning the source repo (where
|
|
5
|
+
// dist/ is gitignored) or running `npm ci` before `npm run build` in CI.
|
|
6
|
+
// Published packages always ship dist/, so real consumers always run this.
|
|
7
|
+
//
|
|
8
|
+
// Never throws: a side-effect skill file must not fail the install.
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
if (fs.existsSync("dist/server/install-skill.js")) {
|
|
13
|
+
const { installSkill } = await import("../dist/server/install-skill.js");
|
|
14
|
+
const result = installSkill();
|
|
15
|
+
if (result.installed) {
|
|
16
|
+
console.log(`[lemma] skill: ${result.reason} -> ${result.path}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
} catch {
|
|
20
|
+
// Swallow — never fail the install over a skill file.
|
|
21
|
+
}
|