perplexity-user-mcp 0.8.39 → 0.8.42
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 +5 -0
- package/dist/{chunk-NJX4RBO6.mjs → chunk-Z4OLYVB2.mjs} +27 -2
- package/dist/cli.d.ts +25 -6
- package/dist/cli.mjs +21 -6
- package/dist/daemon/attach.d.ts +7 -1
- package/dist/daemon/attach.mjs +3 -1
- package/dist/daemon/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -377,6 +377,11 @@ Logging in still goes through the CLI (`npx perplexity-user-mcp login`) — the
|
|
|
377
377
|
- A browser runtime — any of: real Chrome, Microsoft Edge, Brave, system Chromium, or patchright's bundled Chromium (see the [Browser requirement](#browser-requirement) section)
|
|
378
378
|
- An active Perplexity account (free tier works; Pro/Max unlock reason/research/compute)
|
|
379
379
|
|
|
380
|
+
## Troubleshooting
|
|
381
|
+
|
|
382
|
+
- **External MCP clients hitting "Vault locked":** [Troubleshooting external MCP clients](../../docs/troubleshooting/external-mcp-clients.md)
|
|
383
|
+
- **Vault unseal model and recovery:** [docs/vault-unseal.md](../../docs/vault-unseal.md)
|
|
384
|
+
|
|
380
385
|
## Issues
|
|
381
386
|
|
|
382
387
|
Bug reports and feature requests: <https://github.com/Automations-Project/VSCode-Perplexity-MCP/issues>.
|
|
@@ -5,6 +5,22 @@ import {
|
|
|
5
5
|
// src/daemon/attach.ts
|
|
6
6
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
|
+
var DaemonAttachError = class extends Error {
|
|
9
|
+
code = "DAEMON_UNREACHABLE";
|
|
10
|
+
remediation;
|
|
11
|
+
cause;
|
|
12
|
+
constructor(message, remediation, cause) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.name = "DaemonAttachError";
|
|
15
|
+
this.remediation = remediation;
|
|
16
|
+
if (cause !== void 0) this.cause = cause;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var DEFAULT_REMEDIATION = [
|
|
20
|
+
"Reload the VS Code window so the extension restarts the daemon.",
|
|
21
|
+
"In the VS Code Perplexity dashboard, switch this client's transport to http-loopback.",
|
|
22
|
+
"(Advanced) Set PERPLEXITY_NO_DAEMON=1 in this client's MCP env block, then run `npx perplexity-user-mcp setup-vault` once."
|
|
23
|
+
];
|
|
8
24
|
async function attachToDaemon(options = {}) {
|
|
9
25
|
const ensure = options.dependencies?.ensureDaemon ?? ensureDaemon;
|
|
10
26
|
const sourceIn = options.stdin ?? process.stdin;
|
|
@@ -20,7 +36,11 @@ async function attachToDaemon(options = {}) {
|
|
|
20
36
|
await runFallback(error, options);
|
|
21
37
|
return;
|
|
22
38
|
}
|
|
23
|
-
throw
|
|
39
|
+
throw new DaemonAttachError(
|
|
40
|
+
`Cannot reach the extension-managed daemon: ${asError(error).message}`,
|
|
41
|
+
DEFAULT_REMEDIATION,
|
|
42
|
+
error
|
|
43
|
+
);
|
|
24
44
|
}
|
|
25
45
|
const stdio = new StdioServerTransport(sourceIn, sourceOut);
|
|
26
46
|
const http = new StreamableHTTPClientTransport(new URL(`${daemon.url}/mcp`), {
|
|
@@ -77,7 +97,11 @@ async function attachToDaemon(options = {}) {
|
|
|
77
97
|
await runFallback(error, options);
|
|
78
98
|
return;
|
|
79
99
|
}
|
|
80
|
-
throw
|
|
100
|
+
throw new DaemonAttachError(
|
|
101
|
+
`Daemon attached but transport failed to start: ${asError(error).message}`,
|
|
102
|
+
DEFAULT_REMEDIATION,
|
|
103
|
+
error
|
|
104
|
+
);
|
|
81
105
|
}
|
|
82
106
|
await completion;
|
|
83
107
|
}
|
|
@@ -102,5 +126,6 @@ function asError(error) {
|
|
|
102
126
|
}
|
|
103
127
|
|
|
104
128
|
export {
|
|
129
|
+
DaemonAttachError,
|
|
105
130
|
attachToDaemon
|
|
106
131
|
};
|
package/dist/cli.d.ts
CHANGED
|
@@ -486,12 +486,31 @@ async function routeCommand(parsed) {
|
|
|
486
486
|
typeof ensureTimeoutRaw === "string" && /^\d+$/.test(ensureTimeoutRaw)
|
|
487
487
|
? Number(ensureTimeoutRaw)
|
|
488
488
|
: undefined;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
489
|
+
try {
|
|
490
|
+
await attachToDaemon({
|
|
491
|
+
configDir: process.env.PERPLEXITY_CONFIG_DIR,
|
|
492
|
+
clientId: "daemon-attach-cli",
|
|
493
|
+
fallbackStdio: !!flags["fallback-stdio"],
|
|
494
|
+
ensureTimeoutMs,
|
|
495
|
+
});
|
|
496
|
+
} catch (err) {
|
|
497
|
+
// Phase 2 / Task 2.4: mirror the launcher's DaemonAttachError contract.
|
|
498
|
+
// Stdout is the JSON-RPC framing channel for the attached client, so the
|
|
499
|
+
// bullet remediation must land on stderr only; the script entry below
|
|
500
|
+
// converts code:2 into process.exit(2).
|
|
501
|
+
if (err && err.code === "DAEMON_UNREACHABLE") {
|
|
502
|
+
let stderr = "Perplexity MCP: cannot reach the extension-managed daemon.\n";
|
|
503
|
+
const remediation = Array.isArray(err.remediation) ? err.remediation : [];
|
|
504
|
+
for (const line of remediation) {
|
|
505
|
+
stderr += " • " + line + "\n";
|
|
506
|
+
}
|
|
507
|
+
if (err.cause && err.cause.message) {
|
|
508
|
+
stderr += "Underlying error: " + err.cause.message + "\n";
|
|
509
|
+
}
|
|
510
|
+
return { code: 2, stdout: "", stderr };
|
|
511
|
+
}
|
|
512
|
+
throw err;
|
|
513
|
+
}
|
|
495
514
|
return { code: 0, stdout: "", stderr: "" };
|
|
496
515
|
}
|
|
497
516
|
|
package/dist/cli.mjs
CHANGED
|
@@ -402,12 +402,27 @@ Run --help for usage.` };
|
|
|
402
402
|
const { attachToDaemon } = await import("./daemon/attach.mjs");
|
|
403
403
|
const ensureTimeoutRaw = flags["ensure-timeout-ms"];
|
|
404
404
|
const ensureTimeoutMs = typeof ensureTimeoutRaw === "string" && /^\d+$/.test(ensureTimeoutRaw) ? Number(ensureTimeoutRaw) : void 0;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
405
|
+
try {
|
|
406
|
+
await attachToDaemon({
|
|
407
|
+
configDir: process.env.PERPLEXITY_CONFIG_DIR,
|
|
408
|
+
clientId: "daemon-attach-cli",
|
|
409
|
+
fallbackStdio: !!flags["fallback-stdio"],
|
|
410
|
+
ensureTimeoutMs
|
|
411
|
+
});
|
|
412
|
+
} catch (err) {
|
|
413
|
+
if (err && err.code === "DAEMON_UNREACHABLE") {
|
|
414
|
+
let stderr = "Perplexity MCP: cannot reach the extension-managed daemon.\n";
|
|
415
|
+
const remediation = Array.isArray(err.remediation) ? err.remediation : [];
|
|
416
|
+
for (const line of remediation) {
|
|
417
|
+
stderr += " \u2022 " + line + "\n";
|
|
418
|
+
}
|
|
419
|
+
if (err.cause && err.cause.message) {
|
|
420
|
+
stderr += "Underlying error: " + err.cause.message + "\n";
|
|
421
|
+
}
|
|
422
|
+
return { code: 2, stdout: "", stderr };
|
|
423
|
+
}
|
|
424
|
+
throw err;
|
|
425
|
+
}
|
|
411
426
|
return { code: 0, stdout: "", stderr: "" };
|
|
412
427
|
}
|
|
413
428
|
if (command === "daemon:install-tunnel") {
|
package/dist/daemon/attach.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ import '../config.js';
|
|
|
5
5
|
import 'patchright';
|
|
6
6
|
import './lockfile.js';
|
|
7
7
|
|
|
8
|
+
declare class DaemonAttachError extends Error {
|
|
9
|
+
readonly code = "DAEMON_UNREACHABLE";
|
|
10
|
+
readonly remediation: readonly string[];
|
|
11
|
+
readonly cause?: unknown;
|
|
12
|
+
constructor(message: string, remediation: readonly string[], cause?: unknown);
|
|
13
|
+
}
|
|
8
14
|
interface AttachToDaemonOptions {
|
|
9
15
|
configDir?: string;
|
|
10
16
|
stdin?: Readable;
|
|
@@ -33,4 +39,4 @@ interface AttachToDaemonOptions {
|
|
|
33
39
|
}
|
|
34
40
|
declare function attachToDaemon(options?: AttachToDaemonOptions): Promise<void>;
|
|
35
41
|
|
|
36
|
-
export { type AttachToDaemonOptions, attachToDaemon };
|
|
42
|
+
export { type AttachToDaemonOptions, DaemonAttachError, attachToDaemon };
|
package/dist/daemon/attach.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DaemonAttachError,
|
|
2
3
|
attachToDaemon
|
|
3
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-Z4OLYVB2.mjs";
|
|
4
5
|
import "../chunk-RK4EBZJ3.mjs";
|
|
5
6
|
import "../chunk-XTRJSV72.mjs";
|
|
6
7
|
import "../chunk-6YMQVLFX.mjs";
|
|
@@ -21,5 +22,6 @@ import "../chunk-MTDFKNXX.mjs";
|
|
|
21
22
|
import "../chunk-HJIXH6CL.mjs";
|
|
22
23
|
import "../chunk-4UEJOM6W.mjs";
|
|
23
24
|
export {
|
|
25
|
+
DaemonAttachError,
|
|
24
26
|
attachToDaemon
|
|
25
27
|
};
|
package/dist/daemon/index.mjs
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "perplexity-user-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.42",
|
|
4
4
|
"mcpName": "io.github.Automations-Project/perplexity-user-mcp",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Perplexity AI MCP server — browser automation for search, reasoning, research, and compute. Not affiliated with Perplexity AI, Inc.",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"provenance": true
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "
|
|
36
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"perplexity",
|