@openparachute/vault 0.4.3 → 0.4.4-rc.11
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 +58 -2
- package/core/src/core.test.ts +116 -0
- package/core/src/mcp.ts +94 -4
- package/core/src/obsidian.ts +55 -177
- package/core/src/portable-md.test.ts +1001 -0
- package/core/src/portable-md.ts +1409 -0
- package/core/src/schema-defaults.ts +19 -1
- package/core/src/store.ts +13 -0
- package/core/src/types.ts +15 -0
- package/package.json +1 -1
- package/src/cli.ts +699 -141
- package/src/doctor.test.ts +7 -6
- package/src/mcp-install-interactive.test.ts +883 -0
- package/src/mcp-install-interactive.ts +412 -0
- package/src/mcp-install.test.ts +957 -5
- package/src/mcp-install.ts +580 -13
- package/src/routes.ts +19 -3
- package/src/vault.test.ts +141 -0
package/src/doctor.test.ts
CHANGED
|
@@ -156,16 +156,16 @@ describe("vault doctor — extended checks", () => {
|
|
|
156
156
|
// Isolated HOME with no ~/.claude.json at all — the most common
|
|
157
157
|
// pre-`mcp-install` state for new users.
|
|
158
158
|
const res = runCli(["doctor"], dir, { HOME: dir });
|
|
159
|
-
expect(res.stdout).toMatch(/! MCP entry in
|
|
160
|
-
expect(res.stdout).toMatch(/does not exist|no
|
|
159
|
+
expect(res.stdout).toMatch(/! MCP entry in MCP client config/);
|
|
160
|
+
expect(res.stdout).toMatch(/does not exist|no parachute-vault entry/);
|
|
161
161
|
expect(res.stdout).toMatch(/mcp-install/);
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
test("warns when ~/.claude.json exists but has no parachute-vault entry", () => {
|
|
165
165
|
writeFileSync(join(dir, ".claude.json"), JSON.stringify({ mcpServers: {} }));
|
|
166
166
|
const res = runCli(["doctor"], dir, { HOME: dir });
|
|
167
|
-
expect(res.stdout).toMatch(/! MCP entry in
|
|
168
|
-
expect(res.stdout).toMatch(/no
|
|
167
|
+
expect(res.stdout).toMatch(/! MCP entry in MCP client config/);
|
|
168
|
+
expect(res.stdout).toMatch(/no parachute-vault entry/);
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
test("passes MCP entry + port-match checks when URL points at the configured port", () => {
|
|
@@ -174,7 +174,8 @@ describe("vault doctor — extended checks", () => {
|
|
|
174
174
|
writeFileSync(join(dir, "config.yaml"), "port: 4321\n");
|
|
175
175
|
writeClaudeJson(dir, "http://127.0.0.1:4321/vault/default/mcp");
|
|
176
176
|
const res = runCli(["doctor"], dir, { HOME: dir });
|
|
177
|
-
|
|
177
|
+
// Doctor now names the source file in the check label.
|
|
178
|
+
expect(res.stdout).toMatch(/✓ MCP entry in ~\/\.claude\.json \(parachute-vault\)/);
|
|
178
179
|
expect(res.stdout).toMatch(/✓ MCP URL port matches vault\s+\(port 4321\)/);
|
|
179
180
|
// Reachability will warn because nothing is bound to 4321 in the test
|
|
180
181
|
// env — this is the "entry present, port matches, daemon unreachable"
|
|
@@ -186,7 +187,7 @@ describe("vault doctor — extended checks", () => {
|
|
|
186
187
|
writeFileSync(join(dir, "config.yaml"), "port: 4321\n");
|
|
187
188
|
writeClaudeJson(dir, "http://127.0.0.1:9999/vault/default/mcp");
|
|
188
189
|
const res = runCli(["doctor"], dir, { HOME: dir });
|
|
189
|
-
expect(res.stdout).toMatch(/✓ MCP entry in ~\/\.claude\.json/);
|
|
190
|
+
expect(res.stdout).toMatch(/✓ MCP entry in ~\/\.claude\.json \(parachute-vault\)/);
|
|
190
191
|
expect(res.stdout).toMatch(/! MCP URL port matches vault/);
|
|
191
192
|
expect(res.stdout).toMatch(/MCP URL port 9999 ≠ vault port 4321/);
|
|
192
193
|
});
|