pi-vault-mind 0.9.2 → 0.9.5
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/dist/src/settings-ui.js +79 -38
- package/package.json +1 -1
package/dist/src/settings-ui.js
CHANGED
|
@@ -108,50 +108,77 @@ export const buildPluginInstallGuidance = (plugins) => {
|
|
|
108
108
|
const runPluginOnboarding = async (ctx, vaultPath) => {
|
|
109
109
|
const missingPlugins = getMissingOnboardingPlugins(vaultPath);
|
|
110
110
|
if (missingPlugins.length === 0) {
|
|
111
|
-
ctx.ui.notify("Obsidian plugin check:
|
|
111
|
+
ctx.ui.notify("Obsidian plugin check: all integration plugins enabled.", "info");
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
114
|
+
const required = missingPlugins.filter((p) => p.required);
|
|
115
|
+
const optional = missingPlugins.filter((p) => !p.required);
|
|
116
|
+
// Show what's missing
|
|
117
|
+
const lines = ["Missing Obsidian plugins:", ""];
|
|
118
|
+
if (required.length > 0) {
|
|
119
|
+
lines.push("Required:");
|
|
120
|
+
for (const p of required)
|
|
121
|
+
lines.push(` • ${p.label} — ${p.reason}`);
|
|
122
|
+
}
|
|
123
|
+
if (optional.length > 0) {
|
|
124
|
+
lines.push("", "Optional:");
|
|
125
|
+
for (const p of optional)
|
|
126
|
+
lines.push(` • ${p.label} — ${p.reason}`);
|
|
127
|
+
}
|
|
128
|
+
ctx.ui.notify(lines.join("\n"), "warning");
|
|
129
|
+
// Let user select which optional plugins to include
|
|
130
|
+
let selectedOptional = [];
|
|
131
|
+
if (optional.length > 0) {
|
|
132
|
+
const optionalChoices = await ctx.ui.select("Install optional plugins?", [
|
|
133
|
+
`Yes, install all (${optional.map((p) => p.label).join(", ")})`,
|
|
134
|
+
"No, skip optional plugins",
|
|
135
|
+
"Skip plugin setup entirely",
|
|
136
|
+
]);
|
|
137
|
+
if (!optionalChoices || optionalChoices === "Skip plugin setup entirely")
|
|
138
|
+
return;
|
|
139
|
+
if (optionalChoices.startsWith("Yes")) {
|
|
140
|
+
selectedOptional = optional;
|
|
140
141
|
}
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
}
|
|
143
|
+
const toInstall = [...required, ...selectedOptional];
|
|
144
|
+
if (toInstall.length === 0)
|
|
145
|
+
return;
|
|
146
|
+
const cliAvailable = hasObsidianCli();
|
|
147
|
+
if (!cliAvailable) {
|
|
148
|
+
ctx.ui.notify(buildPluginInstallGuidance(toInstall), "info");
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const installChoice = await ctx.ui.select("Install method", [
|
|
152
|
+
"Install now (Obsidian CLI)",
|
|
153
|
+
"Show manual commands",
|
|
154
|
+
]);
|
|
155
|
+
if (!installChoice || installChoice === "Show manual commands") {
|
|
156
|
+
ctx.ui.notify(buildPluginInstallGuidance(toInstall), "info");
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
// Install each plugin
|
|
160
|
+
const installed = [];
|
|
161
|
+
const failed = [];
|
|
162
|
+
for (const plugin of toInstall) {
|
|
163
|
+
const result = installObsidianPlugin(plugin.id);
|
|
164
|
+
if (result.ok) {
|
|
165
|
+
installed.push(plugin.label);
|
|
143
166
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"Some plugin installs failed:",
|
|
147
|
-
...failed.map(({ plugin, error }) => `- ${plugin.id}: ${error}`),
|
|
148
|
-
"",
|
|
149
|
-
buildPluginInstallGuidance(failed.map(({ plugin }) => plugin)),
|
|
150
|
-
].join("\n"), "warning");
|
|
167
|
+
else {
|
|
168
|
+
failed.push({ plugin, error: result.error || "Unknown error" });
|
|
151
169
|
}
|
|
152
|
-
return;
|
|
153
170
|
}
|
|
154
|
-
|
|
171
|
+
if (installed.length > 0) {
|
|
172
|
+
ctx.ui.notify(`Installed: ${installed.join(", ")}`, "info");
|
|
173
|
+
}
|
|
174
|
+
if (failed.length > 0) {
|
|
175
|
+
ctx.ui.notify([
|
|
176
|
+
"Some installs failed:",
|
|
177
|
+
...failed.map(({ plugin, error }) => ` • ${plugin.label}: ${error}`),
|
|
178
|
+
"",
|
|
179
|
+
buildPluginInstallGuidance(failed.map(({ plugin }) => plugin)),
|
|
180
|
+
].join("\n"), "warning");
|
|
181
|
+
}
|
|
155
182
|
};
|
|
156
183
|
export const detectVaultFromCwd = (cwd) => {
|
|
157
184
|
const obsidianDir = path.join(cwd, ".obsidian");
|
|
@@ -385,6 +412,20 @@ export const setupWizard = async (ctx, cliArgs) => {
|
|
|
385
412
|
return;
|
|
386
413
|
}
|
|
387
414
|
}
|
|
415
|
+
// Show the user what's coming
|
|
416
|
+
ctx.ui.notify([
|
|
417
|
+
"━━ Vault Mind Setup ━━",
|
|
418
|
+
"",
|
|
419
|
+
"This wizard will walk you through:",
|
|
420
|
+
" 1. Vault path",
|
|
421
|
+
" 2. Obsidian plugins (required + optional)",
|
|
422
|
+
" 3. Pi skills (obsidian-markdown, etc.)",
|
|
423
|
+
" 4. Embedding provider (Ollama / cloud / offline)",
|
|
424
|
+
" 5. Context automation (pi-context)",
|
|
425
|
+
" 6. Vault auto-start",
|
|
426
|
+
"",
|
|
427
|
+
"You can re-run /vm setup anytime to reconfigure.",
|
|
428
|
+
].join("\n"), "info");
|
|
388
429
|
// ── Step 1: Vault path ─────────────────────────────────────────────────
|
|
389
430
|
const autoVaultPath = cliArgs?.vault?.trim() || detectedVaultPath || "";
|
|
390
431
|
if (autoVaultPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-vault-mind",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
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",
|