@ureck/alexandria 1.3.1 → 1.3.3
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 +7 -0
- package/dist/{chunk-ZIQYAQCF.js → chunk-5A6CC74D.js} +3 -1
- package/dist/{chunk-CIOCSIB5.js → chunk-7LWLBJAD.js} +7 -0
- package/dist/cli.js +10 -5
- package/dist/hooks/on-prompt.js +1 -1
- package/dist/hooks/on-session-start.js +1 -1
- package/dist/hooks/on-stop.js +6 -1
- package/dist/mcp/server.js +2 -2
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -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 ☕
|
|
@@ -138,7 +138,9 @@ function registerMcpGlobal(portable = false) {
|
|
|
138
138
|
try {
|
|
139
139
|
execFileSync("claude", ["mcp", "add", "--scope", "user", "alexandria", "--", command, ...args], {
|
|
140
140
|
stdio: "pipe",
|
|
141
|
-
timeout: 15e3
|
|
141
|
+
timeout: 15e3,
|
|
142
|
+
shell: process.platform === "win32"
|
|
143
|
+
// en Windows los binarios globales de npm son shims .cmd/.ps1
|
|
142
144
|
});
|
|
143
145
|
return true;
|
|
144
146
|
} catch {
|
|
@@ -99,6 +99,12 @@ function toggleEnabled(key) {
|
|
|
99
99
|
const v = getConfigKey(key);
|
|
100
100
|
return v !== false && v !== "false";
|
|
101
101
|
}
|
|
102
|
+
function initScopeWarning(opts) {
|
|
103
|
+
if (opts.project || opts.global) return null;
|
|
104
|
+
return `\u26A0 No se indic\xF3 --project ni --global: este vault se comparte con TODAS tus sesiones (~/Alexandria).
|
|
105
|
+
Si quer\xEDas un vault aislado SOLO para este proyecto: Ctrl+C y corre \`ale init --project\` en su lugar.
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
102
108
|
var TOKEN_TOGGLES = [
|
|
103
109
|
{
|
|
104
110
|
key: "protocol",
|
|
@@ -162,6 +168,7 @@ export {
|
|
|
162
168
|
setConfigKey,
|
|
163
169
|
protocolEnabled,
|
|
164
170
|
toggleEnabled,
|
|
171
|
+
initScopeWarning,
|
|
165
172
|
TOKEN_TOGGLES,
|
|
166
173
|
writeProjectConfig
|
|
167
174
|
};
|
package/dist/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
registerMcpProject,
|
|
17
17
|
serverCommand,
|
|
18
18
|
unregisterHooks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5A6CC74D.js";
|
|
20
20
|
import {
|
|
21
21
|
hybridSearch,
|
|
22
22
|
protocolChain
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
ensureVaultStructure,
|
|
28
28
|
getConfigKey,
|
|
29
29
|
globalConfigPath,
|
|
30
|
+
initScopeWarning,
|
|
30
31
|
protocolEnabled,
|
|
31
32
|
resolveVault,
|
|
32
33
|
setConfigKey,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
vaultExists,
|
|
35
36
|
writeGlobalConfig,
|
|
36
37
|
writeProjectConfig
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-7LWLBJAD.js";
|
|
38
39
|
import {
|
|
39
40
|
serveGraph
|
|
40
41
|
} from "./chunk-FBGIFNIO.js";
|
|
@@ -258,7 +259,7 @@ ${items}
|
|
|
258
259
|
}
|
|
259
260
|
let body = parts.join("\n");
|
|
260
261
|
if (body.length > MAX_BODY_CHARS) body = body.slice(0, MAX_BODY_CHARS) + "\n\n\u2026(truncado)\n";
|
|
261
|
-
const skillName = `proyecto-${slug}`;
|
|
262
|
+
const skillName = slug.startsWith("proyecto-") ? slug : `proyecto-${slug}`;
|
|
262
263
|
const desc = `Conocimiento vivo del proyecto ${projectName}: stack, convenciones, flujo de la aplicaci\xF3n y lecciones ya aprendidas. \xDAsala al trabajar en ${projectName} \u2014 antes de explorar el c\xF3digo o decidir arquitectura.`;
|
|
263
264
|
const front = [
|
|
264
265
|
"---",
|
|
@@ -566,7 +567,9 @@ args = [${tomlArgs}]
|
|
|
566
567
|
try {
|
|
567
568
|
execFileSync2("hermes", ["mcp", "add", "alexandria", "--command", serverCmd().command, "--args", serverCmd().args.join(" ")], {
|
|
568
569
|
stdio: "pipe",
|
|
569
|
-
timeout: 15e3
|
|
570
|
+
timeout: 15e3,
|
|
571
|
+
shell: process.platform === "win32"
|
|
572
|
+
// en Windows los binarios globales de npm son shims .cmd/.ps1
|
|
570
573
|
});
|
|
571
574
|
return { ok: true, file, detail: "v\xEDa hermes mcp add" };
|
|
572
575
|
} catch {
|
|
@@ -1278,6 +1281,8 @@ program.command("init").description("Crea/conecta la b\xF3veda e instala TODO: m
|
|
|
1278
1281
|
await showBanner();
|
|
1279
1282
|
console.log(pc.bold(`Instalaci\xF3n ${isProject ? "por proyecto" : "global"}
|
|
1280
1283
|
`));
|
|
1284
|
+
const scopeWarning = initScopeWarning(opts);
|
|
1285
|
+
if (scopeWarning) console.log(pc.yellow(scopeWarning));
|
|
1281
1286
|
const vault = resolveVault({ flag: vaultPath });
|
|
1282
1287
|
ensureVaultStructure(vault);
|
|
1283
1288
|
console.log(pc.green(`\u2713 B\xF3veda en ${vault.root} (vault Obsidian v\xE1lido \u2014 \xE1brelo en Obsidian cuando quieras)`));
|
|
@@ -1582,7 +1587,7 @@ program.command("toggles").description("Activa/desactiva comportamientos que gas
|
|
|
1582
1587
|
printList();
|
|
1583
1588
|
console.log();
|
|
1584
1589
|
});
|
|
1585
|
-
program.command("scan").description("Escanea el proyecto (API, env-nombres, datos, convenciones) \u2192 notas de contexto en la b\xF3veda. Re-ejecutable; solo-lectura del c\xF3digo; garantiza .gitignore").action(async () => {
|
|
1590
|
+
program.command("scan").description("Escanea el proyecto (API, env-nombres, datos, convenciones, flujo) \u2192 notas de contexto en la b\xF3veda. Re-ejecutable; solo-lectura del c\xF3digo; garantiza .gitignore").action(async () => {
|
|
1586
1591
|
const vault = getVault();
|
|
1587
1592
|
ensureVaultStructure(vault);
|
|
1588
1593
|
const cwd = process.cwd();
|
package/dist/hooks/on-prompt.js
CHANGED
package/dist/hooks/on-stop.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveVault,
|
|
10
10
|
toggleEnabled,
|
|
11
11
|
vaultExists
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-7LWLBJAD.js";
|
|
13
13
|
import {
|
|
14
14
|
VaultIndex,
|
|
15
15
|
appendToNote
|
|
@@ -80,6 +80,8 @@ async function maybeRebuildInBackground(vault) {
|
|
|
80
80
|
const child = spawn(process.execPath, [cli, "--vault", vault.root, "reindex", "--force"], {
|
|
81
81
|
detached: true,
|
|
82
82
|
stdio: "ignore",
|
|
83
|
+
windowsHide: true,
|
|
84
|
+
// Windows: sin esto puede parpadear una consola al cerrar sesión
|
|
83
85
|
env: { ...process.env, ALEXANDRIA_HOOK: "" }
|
|
84
86
|
// proceso CLI: sí puede reconstruir
|
|
85
87
|
});
|
|
@@ -87,3 +89,6 @@ async function maybeRebuildInBackground(vault) {
|
|
|
87
89
|
} catch {
|
|
88
90
|
}
|
|
89
91
|
}
|
|
92
|
+
export {
|
|
93
|
+
maybeRebuildInBackground
|
|
94
|
+
};
|
package/dist/mcp/server.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
pkgVersion,
|
|
5
5
|
planContext,
|
|
6
6
|
planQualityHints
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-5A6CC74D.js";
|
|
8
8
|
import {
|
|
9
9
|
hybridSearch
|
|
10
10
|
} from "../chunk-UWB6RKVN.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ensureVaultStructure,
|
|
13
13
|
resolveVault,
|
|
14
14
|
toggleEnabled
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-7LWLBJAD.js";
|
|
16
16
|
import {
|
|
17
17
|
VaultIndex,
|
|
18
18
|
createNote,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ureck/alexandria",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
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",
|