@ureck/alexandria 1.3.0 → 1.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.
- package/README.md +8 -1
- package/dist/mcp/server.js +21 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Verify:
|
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
$ ale --version
|
|
66
|
-
1.3.
|
|
66
|
+
1.3.1
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Getting started
|
|
@@ -317,6 +317,13 @@ AI agent session
|
|
|
317
317
|
- **No API keys, no accounts, no cost.**
|
|
318
318
|
- **`ale scan` never reads secrets**: it extracts environment variable **names** only (values are never copied), parses schema **files** (no live DB connection), and guarantees the vault is gitignored before writing — your notes never reach a shared repo.
|
|
319
319
|
- Dependency scanners (Socket, etc.) flag *network/shell/env access* in the dependency tree: those come from the ML runtime (`onnxruntime`/`transformers.js`, which needs filesystem access and the one-time model download) and the official MCP SDK — not from Alexandria's code. The published package runs no install scripts of its own.
|
|
320
|
+
- **`npm audit` may report `sharp <0.35.0` (libvips CVEs, [GHSA-f88m-g3jw-g9cj](https://github.com/advisories/GHSA-f88m-g3jw-g9cj))**, inherited from `@huggingface/transformers`. As of this writing no published version of `transformers.js` (including the newest, 4.x) uses a patched sharp, so there's no upstream fix yet — and it isn't reachable in Alexandria's own usage anyway: Alexandria only calls `pipeline('feature-extraction', ...)` for text embeddings and never touches images. If you want a clean `npm audit` in your own project, add this to its `package.json`:
|
|
321
|
+
```json
|
|
322
|
+
"overrides": {
|
|
323
|
+
"sharp": "^0.35.4"
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
(npm's `overrides` only applies at the root of an install, so this must go in *your* project — Alexandria declaring it in its own `package.json` doesn't propagate to consumers.)
|
|
320
327
|
- Generated per-project configs (`.mcp.json`, `.vault.json`, etc.) point at your machine's install path, so `ale init --project` automatically gitignores them (and untracks any already committed) — they never leak to a shared repo. For a team that *wants* a shared MCP config, run `ale init --project --portable`, which writes an npx-based command that works on any machine.
|
|
321
328
|
|
|
322
329
|
## Support the project ☕
|
package/dist/mcp/server.js
CHANGED
|
@@ -29,6 +29,26 @@ import { execSync } from "child_process";
|
|
|
29
29
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
30
30
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
31
31
|
import { z } from "zod";
|
|
32
|
+
|
|
33
|
+
// src/core/hints.ts
|
|
34
|
+
var NOT_FOUND = /no such file|not found|cannot find|ENOENT|does not exist/i;
|
|
35
|
+
var RELATIVE_PATH = /(?:^|\s)(?!-)(?!\/)[\w.-]*\.\w+|(?:^|\s)\.{1,2}\//;
|
|
36
|
+
function pathHint(cmd, cwdArg, runDir, evidence) {
|
|
37
|
+
if (!cmd) return "";
|
|
38
|
+
if (!NOT_FOUND.test(evidence)) return "";
|
|
39
|
+
if (!RELATIVE_PATH.test(cmd)) return "";
|
|
40
|
+
const asked = cwdArg?.trim();
|
|
41
|
+
const suggested = asked || "<carpeta-del-proyecto>";
|
|
42
|
+
const clientDropped = Boolean(asked) && asked !== runDir;
|
|
43
|
+
return `
|
|
44
|
+
|
|
45
|
+
\u{1F4A1} El comando se ejecut\xF3 en: ${runDir}` + (clientDropped ? ` \u2014 tu \`cwd\` NO lleg\xF3 (algunos clientes MCP descartan par\xE1metros nuevos hasta reiniciar la sesi\xF3n).` : ` \u2014 probablemente NO es la carpeta de tu proyecto.`) + `
|
|
46
|
+
Ruta relativa + directorio equivocado = "no such file". Dos salidas:
|
|
47
|
+
1) comando autocontenido (funciona en CUALQUIER cliente): \`cd ${suggested} && ${cmd}\`
|
|
48
|
+
2) rutas absolutas en el comando.`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/mcp/server.ts
|
|
32
52
|
var vault = resolveVault({ cwd: process.cwd() });
|
|
33
53
|
var server = new McpServer({ name: "alexandria", version: pkgVersion() });
|
|
34
54
|
var text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
@@ -258,7 +278,7 @@ ${planNote ? `Plan: [[${planNote.title}]]` : ""}`
|
|
|
258
278
|
if (!realPassed) {
|
|
259
279
|
const lessons = await hybridSearch(vault, `${task} ${realEvidence.slice(0, 200)}`, 3);
|
|
260
280
|
const useful = lessons.filter((l) => l.note.type === "lesson" || l.note.type === "solution");
|
|
261
|
-
const head = `Fallo ${verified ? "CONFIRMADO por el comando" : "registrado (auto-reportado)"} (${path.relative(vault.root, file)}).${discrepancy}
|
|
281
|
+
const head = `Fallo ${verified ? "CONFIRMADO por el comando" : "registrado (auto-reportado)"} (${path.relative(vault.root, file)}).${discrepancy}` + pathHint(verify_command, cwd, runDir, realEvidence);
|
|
262
282
|
if (useful.length > 0) {
|
|
263
283
|
return text(
|
|
264
284
|
`${head}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ureck/alexandria",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Alexandria — bóveda de conocimiento local para agentes de IA (Claude Code, Cursor, OpenCode, Windsurf y más): captura automática, búsqueda semántica offline y grafo de conexiones estilo Obsidian. Ahorra tokens inyectando solo el contexto relevante.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
"picocolors": "^1.1.1",
|
|
42
42
|
"zod": "^3.24.2"
|
|
43
43
|
},
|
|
44
|
+
"overrides": {
|
|
45
|
+
"sharp": "^0.35.4"
|
|
46
|
+
},
|
|
44
47
|
"devDependencies": {
|
|
45
48
|
"@types/node": "^22.13.0",
|
|
46
49
|
"tsup": "^8.4.0",
|