pi-vault-mind 0.16.24 → 0.16.27

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/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## 0.16.27 — 2026-08-09
5
+
6
+ ### Fixed
7
+
8
+ - **CLI setup drift — root cause of a real 404.** `vaultMind.dataDir` defaulted to bare `.lancedb` (leaks outside `.vault-mind/`) in `DEFAULT_CONFIG`/`scaffold.ts`; only the Obsidian plugin's wizard got this fix previously (`a8475d9`). Now `.vault-mind/.lancedb` in both.
9
+ - **Broken local Ollama URL.** The interactive `/vm setup` wizard's "Local (Ollama)" branch wrote `localUrl` as `http://127.0.0.1:11434/v1`; the OpenAI-compatible embedding provider then appends `/v1/embeddings` regardless, producing `.../v1/v1/embeddings` — a deterministic 404 on every embed, not the transient failure it looked like. Now writes the bare host, matching `DEFAULT_CONFIG` and the wizard's own Ollama probe three lines above the bug.
10
+ - **Missing vault folders in CLI setup.** `/vm setup` never asked about or defaulted `vaultMind.folders` (inbox/library/presentations/journal). Added a wizard step (with reconfigure pre-fill) and matching defaults in `scaffold.ts` and the headless CLI-args path, aligned with the Obsidian wizard's defaults.
11
+ - **`vault-pi.sh` Terminal.app detection** on macOS versions where it moved to `/System/Applications/Utilities/`.
12
+
13
+ ### Verification
14
+
15
+ - Full build + `node --test dist/test/**/*.test.js`: 894/894 passing.
16
+ - Reproduced the `/v1/v1/embeddings` 404 live against a running Ollama instance before and after the fix.
17
+
4
18
  ## 0.16.12 / 0.6.16 — 2026-07-20
5
19
 
6
20
  ### Fixed
@@ -166,9 +166,15 @@ export const scaffoldVaultConfig = (vaultPath, collectionOverride) => {
166
166
  },
167
167
  },
168
168
  vaultMind: {
169
- dataDir: ".lancedb",
169
+ dataDir: ".vault-mind/.lancedb",
170
170
  ftsEnabled: true,
171
171
  graph: { enabled: true, canvasSync: false },
172
+ folders: {
173
+ inbox: "Agent/Inbox",
174
+ library: "Agent/Library",
175
+ presentations: "Agent/Presentations",
176
+ journal: "Agent/Journal",
177
+ },
172
178
  },
173
179
  };
174
180
  ensureDir(cfgDest);
@@ -291,10 +291,27 @@ export const setupWizard = async (ctx, cliArgs) => {
291
291
  if (cliArgs) {
292
292
  const config = existingConfigFile
293
293
  ? JSON.parse(fs.readFileSync(getConfigPath(ctx.cwd), "utf-8"))
294
- : { vaultMind: { embedding: {}, vaults: {} } };
294
+ : {
295
+ vaultMind: {
296
+ embedding: {},
297
+ vaults: {},
298
+ folders: {
299
+ inbox: "Agent/Inbox",
300
+ library: "Agent/Library",
301
+ presentations: "Agent/Presentations",
302
+ journal: "Agent/Journal",
303
+ },
304
+ },
305
+ };
295
306
  config.vaultMind = config.vaultMind || {};
296
307
  config.vaultMind.embedding = config.vaultMind.embedding || {};
297
308
  config.vaultMind.vaults = config.vaultMind.vaults || {};
309
+ config.vaultMind.folders = config.vaultMind.folders || {
310
+ inbox: "Agent/Inbox",
311
+ library: "Agent/Library",
312
+ presentations: "Agent/Presentations",
313
+ journal: "Agent/Journal",
314
+ };
298
315
  const effectiveVaultPath = cliArgs.vault || detectedVaultPath || undefined;
299
316
  if (effectiveVaultPath) {
300
317
  config.vaultMind.vaults.default = { path: shrinkHome(effectiveVaultPath), autoSync: true };
@@ -458,7 +475,7 @@ export const setupWizard = async (ctx, cliArgs) => {
458
475
  return;
459
476
  }
460
477
  if (provider.startsWith("Local")) {
461
- localUrl = "http://127.0.0.1:11434/v1";
478
+ localUrl = "http://127.0.0.1:11434";
462
479
  // Let user pick from detected Ollama embedding models
463
480
  const modelChoice = await ctx.ui.select("Select embedding model:", ollamaModels.map((m) => m.name));
464
481
  if (!modelChoice) {
@@ -514,6 +531,14 @@ export const setupWizard = async (ctx, cliArgs) => {
514
531
  model = "Xenova/all-MiniLM-L6-v2";
515
532
  dim = 384;
516
533
  }
534
+ // ── Step 2.5: Vault folders ──────────────────────────────────────────────
535
+ const existingFolders = existingConfigFile
536
+ ? (JSON.parse(fs.readFileSync(getConfigPath(ctx.cwd), "utf-8")).vaultMind?.folders ?? {})
537
+ : {};
538
+ const inboxFolder = await ctx.ui.input("Inbox folder (agent capture target):", existingFolders.inbox || "Agent/Inbox");
539
+ const libraryFolder = await ctx.ui.input("Library folder (durable knowledge notes):", existingFolders.library || "Agent/Library");
540
+ const presentationsFolder = await ctx.ui.input("Presentations folder:", existingFolders.presentations || "Agent/Presentations");
541
+ const journalFolder = await ctx.ui.input("Journal folder:", existingFolders.journal || "Agent/Journal");
517
542
  // ── Step 3: Deterministic runtime settings ──────────────────────────────
518
543
  const enableContextAutomation = await ctx.ui.confirm("Context automation", "Enable pi-context integration with auto-/acm trigger and event indexing?");
519
544
  const enableAutoStart = await ctx.ui.confirm("Vault auto-start", "Auto-start watcher/server for this vault when pi session starts?");
@@ -522,6 +547,7 @@ export const setupWizard = async (ctx, cliArgs) => {
522
547
  `Remote URL: ${remoteUrl || "none"}`,
523
548
  `Local URL: ${localUrl || "none"}`,
524
549
  `Model: ${model || "(auto/server default)"}`,
550
+ `Folders: inbox=${inboxFolder}, library=${libraryFolder}, presentations=${presentationsFolder}, journal=${journalFolder}`,
525
551
  `Context automation: ${enableContextAutomation ? "enabled" : "disabled"}`,
526
552
  `Vault auto-start: ${enableAutoStart ? "enabled" : "disabled"}`,
527
553
  ].join("\n"));
@@ -552,6 +578,12 @@ export const setupWizard = async (ctx, cliArgs) => {
552
578
  autoSync: true,
553
579
  autoStart: enableAutoStart,
554
580
  };
581
+ config.vaultMind.folders = {
582
+ inbox: inboxFolder || "Agent/Inbox",
583
+ library: libraryFolder || "Agent/Library",
584
+ presentations: presentationsFolder || "Agent/Presentations",
585
+ journal: journalFolder || "Agent/Journal",
586
+ };
555
587
  config.vaultMind.graph = config.vaultMind.graph || { enabled: true, canvasSync: true };
556
588
  config.vaultMind.ftsEnabled = config.vaultMind.ftsEnabled !== false;
557
589
  // Extension-compatibility (pi-context) now lives in the single consolidated
package/dist/src/types.js CHANGED
@@ -26,7 +26,7 @@ export const DEFAULT_CONFIG = {
26
26
  },
27
27
  ],
28
28
  vaultMind: {
29
- dataDir: ".lancedb",
29
+ dataDir: ".vault-mind/.lancedb",
30
30
  agentLLM: {
31
31
  remoteUrl: "http://127.0.0.1:11434/v1",
32
32
  },
@@ -374,7 +374,7 @@ describe("loadConfig", () => {
374
374
  assert.equal(cfg.version, 2);
375
375
  // mergeConfigLayer overwrites collections with resolved (empty) when no layer provides them
376
376
  assert.deepEqual(cfg.collections, {});
377
- assert.equal(cfg.vaultMind.dataDir, ".lancedb");
377
+ assert.equal(cfg.vaultMind.dataDir, ".vault-mind/.lancedb");
378
378
  assert.equal(cfg.vaultMind.embedding.localUrl, "http://127.0.0.1:11434");
379
379
  });
380
380
  it("merges user config over defaults", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-vault-mind",
3
- "version": "0.16.24",
3
+ "version": "0.16.27",
4
4
  "description": "Passive Obsidian vault extension for pi. Watches @agent markers, dispatches forked subagents (Miner, Broadcaster, Heavy-Lifter), stores in LanceDB with vector + FTS + graph. Multi-agent 'Drop & Forget' workflow for the pi agent ecosystem.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@ PI_CMD="PI_CODING_AGENT_DIR='${PI_DIR}' pi ${OP_ENV_ARG}; rm -f '${PID_FILE}'"
49
49
 
50
50
  if [ -d "/Applications/iTerm.app" ]; then
51
51
  open -a iTerm --args --detach bash -c "echo \$\$ > '${PID_FILE}'; cd '${VAULT}'; ${PI_CMD}"
52
- elif [ -d "/Applications/Utilities/Terminal.app" ]; then
52
+ elif [ -d "/Applications/Utilities/Terminal.app" ] || [ -d "/System/Applications/Utilities/Terminal.app" ]; then
53
53
  osascript -e "tell application \"Terminal\" to do script \"echo \$\$ > '${PID_FILE}'; cd '${VAULT}'; ${PI_CMD}\""
54
54
  else
55
55
  echo "[vault-pi] No supported terminal found (iTerm or Terminal.app)"