@ureck/alexandria 1.3.2 → 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.
@@ -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-ZIQYAQCF.js";
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-CIOCSIB5.js";
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();
@@ -14,7 +14,7 @@ import {
14
14
  resolveVault,
15
15
  toggleEnabled,
16
16
  vaultExists
17
- } from "../chunk-CIOCSIB5.js";
17
+ } from "../chunk-7LWLBJAD.js";
18
18
  import {
19
19
  createNote,
20
20
  touchNote
@@ -12,7 +12,7 @@ import {
12
12
  resolveVault,
13
13
  toggleEnabled,
14
14
  vaultExists
15
- } from "../chunk-CIOCSIB5.js";
15
+ } from "../chunk-7LWLBJAD.js";
16
16
  import {
17
17
  VaultIndex
18
18
  } from "../chunk-QB37UGO6.js";
@@ -9,7 +9,7 @@ import {
9
9
  resolveVault,
10
10
  toggleEnabled,
11
11
  vaultExists
12
- } from "../chunk-CIOCSIB5.js";
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
+ };
@@ -4,7 +4,7 @@ import {
4
4
  pkgVersion,
5
5
  planContext,
6
6
  planQualityHints
7
- } from "../chunk-ZIQYAQCF.js";
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-CIOCSIB5.js";
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.2",
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",