perplexity-user-mcp 0.8.36

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.
Files changed (125) hide show
  1. package/README.md +192 -0
  2. package/dist/attachments.d.ts +20 -0
  3. package/dist/attachments.mjs +43 -0
  4. package/dist/checks/browser.d.ts +100 -0
  5. package/dist/checks/browser.mjs +89 -0
  6. package/dist/checks/config.d.ts +91 -0
  7. package/dist/checks/config.mjs +88 -0
  8. package/dist/checks/ide.d.ts +89 -0
  9. package/dist/checks/ide.mjs +80 -0
  10. package/dist/checks/mcp.d.ts +61 -0
  11. package/dist/checks/mcp.mjs +56 -0
  12. package/dist/checks/native-deps.d.ts +131 -0
  13. package/dist/checks/native-deps.mjs +115 -0
  14. package/dist/checks/network.d.ts +71 -0
  15. package/dist/checks/network.mjs +70 -0
  16. package/dist/checks/probe.d.ts +93 -0
  17. package/dist/checks/probe.mjs +82 -0
  18. package/dist/checks/profiles.d.ts +99 -0
  19. package/dist/checks/profiles.mjs +90 -0
  20. package/dist/checks/runtime.d.ts +89 -0
  21. package/dist/checks/runtime.mjs +90 -0
  22. package/dist/checks/vault.d.ts +101 -0
  23. package/dist/checks/vault.mjs +90 -0
  24. package/dist/chunk-3B276PGG.mjs +115 -0
  25. package/dist/chunk-4UEJOM6W.mjs +9 -0
  26. package/dist/chunk-6EP2BLTV.mjs +205 -0
  27. package/dist/chunk-6YMQVLFX.mjs +146 -0
  28. package/dist/chunk-7JL36EBH.mjs +118 -0
  29. package/dist/chunk-DPGMKSSA.mjs +57 -0
  30. package/dist/chunk-H4BUAPPO.mjs +1950 -0
  31. package/dist/chunk-HMKLWVXB.mjs +109 -0
  32. package/dist/chunk-HTUAQRKH.mjs +125 -0
  33. package/dist/chunk-HU5B4FXS.mjs +139 -0
  34. package/dist/chunk-KCXM2M4B.mjs +1006 -0
  35. package/dist/chunk-LKJMLGFP.mjs +237 -0
  36. package/dist/chunk-LZPLNZ5U.mjs +67 -0
  37. package/dist/chunk-MTDFKNXX.mjs +19 -0
  38. package/dist/chunk-OF4DMAPJ.mjs +511 -0
  39. package/dist/chunk-PE23RMXY.mjs +43 -0
  40. package/dist/chunk-Q2VY4R5F.mjs +175 -0
  41. package/dist/chunk-S5VD7WTU.mjs +2540 -0
  42. package/dist/chunk-SVPRB62V.mjs +106 -0
  43. package/dist/chunk-TQLCLE4L.mjs +345 -0
  44. package/dist/chunk-U3DGFLXZ.mjs +43 -0
  45. package/dist/chunk-X45O6YD3.mjs +688 -0
  46. package/dist/chunk-XKSWCEGI.mjs +168 -0
  47. package/dist/chunk-Z7DAACGZ.mjs +534 -0
  48. package/dist/chunk-ZQFUZPLO.mjs +257 -0
  49. package/dist/cli.d.ts +952 -0
  50. package/dist/cli.mjs +827 -0
  51. package/dist/client.d.ts +355 -0
  52. package/dist/client.mjs +27 -0
  53. package/dist/cloud-sync.d-Cqt6y18U.d.ts +42 -0
  54. package/dist/cloud-sync.d.ts +42 -0
  55. package/dist/cloud-sync.mjs +17 -0
  56. package/dist/config.d.ts +186 -0
  57. package/dist/config.mjs +54 -0
  58. package/dist/daemon/attach.d.ts +36 -0
  59. package/dist/daemon/attach.mjs +25 -0
  60. package/dist/daemon/audit.d.ts +23 -0
  61. package/dist/daemon/audit.mjs +12 -0
  62. package/dist/daemon/client-http.d.ts +42 -0
  63. package/dist/daemon/client-http.mjs +29 -0
  64. package/dist/daemon/index.d.ts +14 -0
  65. package/dist/daemon/index.mjs +110 -0
  66. package/dist/daemon/install-tunnel.d.ts +46 -0
  67. package/dist/daemon/install-tunnel.mjs +14 -0
  68. package/dist/daemon/launcher.d.ts +163 -0
  69. package/dist/daemon/launcher.mjs +50 -0
  70. package/dist/daemon/lockfile.d.ts +29 -0
  71. package/dist/daemon/lockfile.mjs +18 -0
  72. package/dist/daemon/server.d.ts +159 -0
  73. package/dist/daemon/server.mjs +20 -0
  74. package/dist/daemon/token.d.ts +17 -0
  75. package/dist/daemon/token.mjs +17 -0
  76. package/dist/daemon/tunnel-providers/index.d.ts +330 -0
  77. package/dist/daemon/tunnel-providers/index.mjs +57 -0
  78. package/dist/daemon/tunnel.d.ts +23 -0
  79. package/dist/daemon/tunnel.mjs +9 -0
  80. package/dist/doctor-report.d.ts +24 -0
  81. package/dist/doctor-report.mjs +14 -0
  82. package/dist/doctor.d-CXmUqOXX.d.ts +43 -0
  83. package/dist/doctor.d.ts +44 -0
  84. package/dist/doctor.mjs +16 -0
  85. package/dist/export.d.ts +19 -0
  86. package/dist/export.mjs +15 -0
  87. package/dist/health-check.d.ts +108 -0
  88. package/dist/health-check.mjs +92 -0
  89. package/dist/history-store.d-BzjBF2m3.d.ts +65 -0
  90. package/dist/history-store.d.ts +65 -0
  91. package/dist/history-store.mjs +48 -0
  92. package/dist/impit-login-runner.d.ts +469 -0
  93. package/dist/impit-login-runner.mjs +685 -0
  94. package/dist/index.d.ts +159 -0
  95. package/dist/index.mjs +236 -0
  96. package/dist/login-runner.d.ts +333 -0
  97. package/dist/login-runner.mjs +320 -0
  98. package/dist/logout.d.ts +28 -0
  99. package/dist/logout.mjs +45 -0
  100. package/dist/manual-login-runner.d.ts +150 -0
  101. package/dist/manual-login-runner.mjs +146 -0
  102. package/dist/native-deps-BNThFHxa.d.ts +175 -0
  103. package/dist/native-deps-YNKXITRY.mjs +139 -0
  104. package/dist/profiles.d-DqS1oZWr.d.ts +41 -0
  105. package/dist/profiles.d.ts +41 -0
  106. package/dist/profiles.mjs +33 -0
  107. package/dist/redact.d.ts +159 -0
  108. package/dist/redact.mjs +11 -0
  109. package/dist/refresh.d.ts +118 -0
  110. package/dist/refresh.mjs +21 -0
  111. package/dist/reinit-watcher.d.ts +15 -0
  112. package/dist/reinit-watcher.mjs +8 -0
  113. package/dist/session-metadata-B9aV_n5g.d.ts +148 -0
  114. package/dist/tty-prompt.d.ts +44 -0
  115. package/dist/tty-prompt.mjs +39 -0
  116. package/dist/vault.d-BtRSLZiM.d.ts +8 -0
  117. package/dist/vault.d.ts +37 -0
  118. package/dist/vault.mjs +21 -0
  119. package/dist/viewer-detect.d-HWGnyFAA.d.ts +4 -0
  120. package/dist/viewer-detect.d.ts +4 -0
  121. package/dist/viewer-detect.mjs +37 -0
  122. package/dist/viewers.d-BGCK6sw6.d.ts +10 -0
  123. package/dist/viewers.d.ts +18 -0
  124. package/dist/viewers.mjs +122 -0
  125. package/package.json +152 -0
@@ -0,0 +1,54 @@
1
+ import {
2
+ ASI_ACCESS_ENDPOINT,
3
+ AUTH_SESSION_ENDPOINT,
4
+ BROWSER_DATA_DIR,
5
+ CONFIG_DIR,
6
+ COOKIES_FILE,
7
+ DEFAULT_HEADERS,
8
+ EXPERIMENTS_ENDPOINT,
9
+ MODELS_CONFIG_ENDPOINT,
10
+ PERPLEXITY_URL,
11
+ QUERY_ENDPOINT,
12
+ RATE_LIMIT_ENDPOINT,
13
+ STORAGE_STATE_FILE,
14
+ SUPPORTED_BLOCK_USE_CASES,
15
+ THREAD_ENDPOINT,
16
+ USER_INFO_ENDPOINT,
17
+ findBrowser,
18
+ findChromeExecutable,
19
+ getBrowserDataDir,
20
+ getCookiesFile,
21
+ getOrCreateContext,
22
+ getSavedCookies,
23
+ hasStoredLogin,
24
+ resolveBrowserExecutable
25
+ } from "./chunk-LKJMLGFP.mjs";
26
+ import "./chunk-TQLCLE4L.mjs";
27
+ import "./chunk-MTDFKNXX.mjs";
28
+ import "./chunk-XKSWCEGI.mjs";
29
+ import "./chunk-4UEJOM6W.mjs";
30
+ export {
31
+ ASI_ACCESS_ENDPOINT,
32
+ AUTH_SESSION_ENDPOINT,
33
+ BROWSER_DATA_DIR,
34
+ CONFIG_DIR,
35
+ COOKIES_FILE,
36
+ DEFAULT_HEADERS,
37
+ EXPERIMENTS_ENDPOINT,
38
+ MODELS_CONFIG_ENDPOINT,
39
+ PERPLEXITY_URL,
40
+ QUERY_ENDPOINT,
41
+ RATE_LIMIT_ENDPOINT,
42
+ STORAGE_STATE_FILE,
43
+ SUPPORTED_BLOCK_USE_CASES,
44
+ THREAD_ENDPOINT,
45
+ USER_INFO_ENDPOINT,
46
+ findBrowser,
47
+ findChromeExecutable,
48
+ getBrowserDataDir,
49
+ getCookiesFile,
50
+ getOrCreateContext,
51
+ getSavedCookies,
52
+ hasStoredLogin,
53
+ resolveBrowserExecutable
54
+ };
@@ -0,0 +1,36 @@
1
+ import { Readable, Writable } from 'node:stream';
2
+ import { ensureDaemon } from './launcher.js';
3
+ import '../client.js';
4
+ import '../config.js';
5
+ import 'patchright';
6
+ import './lockfile.js';
7
+
8
+ interface AttachToDaemonOptions {
9
+ configDir?: string;
10
+ stdin?: Readable;
11
+ stdout?: Writable;
12
+ clientId?: string;
13
+ /**
14
+ * When true, any failure to reach/start the daemon (or wire up the HTTP
15
+ * transport) falls back to running the in-process stdio MCP `main()` so the
16
+ * client still gets a working server. A single machine-parseable warning is
17
+ * written to stderr before the fallback. When false/omitted, the original
18
+ * error propagates to the caller.
19
+ */
20
+ fallbackStdio?: boolean;
21
+ /**
22
+ * Propagated to `ensureDaemon` as `startTimeoutMs`. Defaults to 15_000 when
23
+ * unset (same default as the launcher).
24
+ */
25
+ ensureTimeoutMs?: number;
26
+ /**
27
+ * Test-only dependency injection seam. Not exposed through the CLI.
28
+ */
29
+ dependencies?: {
30
+ ensureDaemon?: typeof ensureDaemon;
31
+ runStdioMain?: () => Promise<void>;
32
+ };
33
+ }
34
+ declare function attachToDaemon(options?: AttachToDaemonOptions): Promise<void>;
35
+
36
+ export { type AttachToDaemonOptions, attachToDaemon };
@@ -0,0 +1,25 @@
1
+ import {
2
+ attachToDaemon
3
+ } from "../chunk-SVPRB62V.mjs";
4
+ import "../chunk-X45O6YD3.mjs";
5
+ import "../chunk-KCXM2M4B.mjs";
6
+ import "../chunk-6YMQVLFX.mjs";
7
+ import "../chunk-3B276PGG.mjs";
8
+ import "../chunk-6EP2BLTV.mjs";
9
+ import "../chunk-S5VD7WTU.mjs";
10
+ import "../chunk-PE23RMXY.mjs";
11
+ import "../chunk-HTUAQRKH.mjs";
12
+ import "../chunk-U3DGFLXZ.mjs";
13
+ import "../chunk-Q2VY4R5F.mjs";
14
+ import "../chunk-H4BUAPPO.mjs";
15
+ import "../chunk-Z7DAACGZ.mjs";
16
+ import "../chunk-OF4DMAPJ.mjs";
17
+ import "../chunk-LZPLNZ5U.mjs";
18
+ import "../chunk-LKJMLGFP.mjs";
19
+ import "../chunk-TQLCLE4L.mjs";
20
+ import "../chunk-MTDFKNXX.mjs";
21
+ import "../chunk-XKSWCEGI.mjs";
22
+ import "../chunk-4UEJOM6W.mjs";
23
+ export {
24
+ attachToDaemon
25
+ };
@@ -0,0 +1,23 @@
1
+ interface AuditEntry {
2
+ timestamp: string;
3
+ clientId: string;
4
+ tool: string;
5
+ durationMs: number;
6
+ source: "loopback" | "tunnel";
7
+ ok: boolean;
8
+ error?: string;
9
+ ip?: string;
10
+ userAgent?: string;
11
+ path?: string;
12
+ httpStatus?: number;
13
+ auth?: "bearer" | "oauth" | "oauth-cached" | "none";
14
+ }
15
+ interface AuditOptions {
16
+ auditPath?: string;
17
+ maxBytes?: number;
18
+ }
19
+ declare function getAuditLogPath(configDir?: string): string;
20
+ declare function appendAuditEntry(entry: AuditEntry, options?: AuditOptions): void;
21
+ declare function readAuditTail(limit?: number, options?: AuditOptions): AuditEntry[];
22
+
23
+ export { type AuditEntry, type AuditOptions, appendAuditEntry, getAuditLogPath, readAuditTail };
@@ -0,0 +1,12 @@
1
+ import {
2
+ appendAuditEntry,
3
+ getAuditLogPath,
4
+ readAuditTail
5
+ } from "../chunk-PE23RMXY.mjs";
6
+ import "../chunk-XKSWCEGI.mjs";
7
+ import "../chunk-4UEJOM6W.mjs";
8
+ export {
9
+ appendAuditEntry,
10
+ getAuditLogPath,
11
+ readAuditTail
12
+ };
@@ -0,0 +1,42 @@
1
+ import { EnsureDaemonOptions } from './launcher.js';
2
+ import '../client.js';
3
+ import '../config.js';
4
+ import 'patchright';
5
+ import './lockfile.js';
6
+
7
+ type DaemonEnsureOptions = Pick<EnsureDaemonOptions, "configDir" | "host" | "port" | "tunnel" | "startTimeoutMs" | "pollIntervalMs" | "healthTimeoutMs" | "spawnDaemon">;
8
+ interface DaemonClientRequestOptions extends DaemonEnsureOptions {
9
+ clientId?: string;
10
+ source?: "loopback" | "tunnel";
11
+ }
12
+ interface DaemonExportResult {
13
+ savedPath: string;
14
+ bytes: number;
15
+ contentType: string;
16
+ }
17
+ interface DaemonCloudSyncProgress {
18
+ phase: "starting" | "syncing" | "done" | "cancelled" | "error";
19
+ fetched?: number;
20
+ total?: number;
21
+ inserted?: number;
22
+ updated?: number;
23
+ skipped?: number;
24
+ error?: string;
25
+ }
26
+ interface DaemonCloudSyncResult {
27
+ fetched: number;
28
+ inserted: number;
29
+ updated: number;
30
+ skipped: number;
31
+ }
32
+ interface DaemonHydrateResult {
33
+ action: "hydrated" | "skipped-local" | "skipped-hydrated";
34
+ }
35
+ declare function exportHistoryViaDaemon(historyId: string, format: "pdf" | "markdown" | "docx", options?: DaemonClientRequestOptions): Promise<DaemonExportResult>;
36
+ declare function syncCloudHistoryViaDaemon(options?: DaemonClientRequestOptions & {
37
+ pageSize?: number;
38
+ onProgress?: (progress: DaemonCloudSyncProgress) => void;
39
+ }): Promise<DaemonCloudSyncResult>;
40
+ declare function hydrateCloudHistoryEntryViaDaemon(historyId: string, options?: DaemonClientRequestOptions): Promise<DaemonHydrateResult>;
41
+
42
+ export { type DaemonClientRequestOptions, type DaemonCloudSyncProgress, type DaemonCloudSyncResult, type DaemonExportResult, type DaemonHydrateResult, exportHistoryViaDaemon, hydrateCloudHistoryEntryViaDaemon, syncCloudHistoryViaDaemon };
@@ -0,0 +1,29 @@
1
+ import {
2
+ exportHistoryViaDaemon,
3
+ hydrateCloudHistoryEntryViaDaemon,
4
+ syncCloudHistoryViaDaemon
5
+ } from "../chunk-ZQFUZPLO.mjs";
6
+ import "../chunk-X45O6YD3.mjs";
7
+ import "../chunk-KCXM2M4B.mjs";
8
+ import "../chunk-6YMQVLFX.mjs";
9
+ import "../chunk-3B276PGG.mjs";
10
+ import "../chunk-6EP2BLTV.mjs";
11
+ import "../chunk-S5VD7WTU.mjs";
12
+ import "../chunk-PE23RMXY.mjs";
13
+ import "../chunk-HTUAQRKH.mjs";
14
+ import "../chunk-U3DGFLXZ.mjs";
15
+ import "../chunk-Q2VY4R5F.mjs";
16
+ import "../chunk-H4BUAPPO.mjs";
17
+ import "../chunk-Z7DAACGZ.mjs";
18
+ import "../chunk-OF4DMAPJ.mjs";
19
+ import "../chunk-LZPLNZ5U.mjs";
20
+ import "../chunk-LKJMLGFP.mjs";
21
+ import "../chunk-TQLCLE4L.mjs";
22
+ import "../chunk-MTDFKNXX.mjs";
23
+ import "../chunk-XKSWCEGI.mjs";
24
+ import "../chunk-4UEJOM6W.mjs";
25
+ export {
26
+ exportHistoryViaDaemon,
27
+ hydrateCloudHistoryEntryViaDaemon,
28
+ syncCloudHistoryViaDaemon
29
+ };
@@ -0,0 +1,14 @@
1
+ export { attachToDaemon } from './attach.js';
2
+ export { appendAuditEntry, getAuditLogPath, readAuditTail } from './audit.js';
3
+ export { DaemonClientRequestOptions, DaemonCloudSyncProgress, DaemonCloudSyncResult, DaemonExportResult, DaemonHydrateResult, exportHistoryViaDaemon, hydrateCloudHistoryEntryViaDaemon, syncCloudHistoryViaDaemon } from './client-http.js';
4
+ export { InstallTunnelResult, getPinnedCloudflaredVersion, getTunnelBinaryPath, installCloudflared, resolvePinnedAssetKey } from './install-tunnel.js';
5
+ export { AuthorizedClientSummary, ConsentEntrySummary, DaemonConnectionInfo, DaemonHealthStatus, DaemonStatus, StartedDaemonInstance, disableDaemonTunnel, enableDaemonTunnel, ensureDaemon, getDaemonStatus, listOAuthClients, listOAuthConsents, restartDaemon, revokeAllOAuthClients, revokeAllOAuthConsents, revokeOAuthClient, revokeOAuthConsent, rotateDaemonToken, startDaemon, stopDaemon } from './launcher.js';
6
+ export { DaemonLockRecord, acquire, getLockfilePath, isStale, read, release, replace } from './lockfile.js';
7
+ export { StartedDaemonServer, startDaemonServer } from './server.js';
8
+ export { DaemonTokenRecord, ensureToken, generateBearerToken, getTokenPath, readToken, rotateToken } from './token.js';
9
+ export { TunnelState, extractTunnelUrl, startTunnel } from './tunnel.js';
10
+ import 'node:stream';
11
+ import '../client.js';
12
+ import '../config.js';
13
+ import 'patchright';
14
+ import 'express';
@@ -0,0 +1,110 @@
1
+ import {
2
+ exportHistoryViaDaemon,
3
+ hydrateCloudHistoryEntryViaDaemon,
4
+ syncCloudHistoryViaDaemon
5
+ } from "../chunk-ZQFUZPLO.mjs";
6
+ import {
7
+ attachToDaemon
8
+ } from "../chunk-SVPRB62V.mjs";
9
+ import {
10
+ disableDaemonTunnel,
11
+ enableDaemonTunnel,
12
+ ensureDaemon,
13
+ getDaemonStatus,
14
+ listOAuthClients,
15
+ listOAuthConsents,
16
+ restartDaemon,
17
+ revokeAllOAuthClients,
18
+ revokeAllOAuthConsents,
19
+ revokeOAuthClient,
20
+ revokeOAuthConsent,
21
+ rotateDaemonToken,
22
+ startDaemon,
23
+ stopDaemon
24
+ } from "../chunk-X45O6YD3.mjs";
25
+ import "../chunk-KCXM2M4B.mjs";
26
+ import {
27
+ extractTunnelUrl,
28
+ startTunnel
29
+ } from "../chunk-6YMQVLFX.mjs";
30
+ import {
31
+ getPinnedCloudflaredVersion,
32
+ getTunnelBinaryPath,
33
+ installCloudflared,
34
+ resolvePinnedAssetKey
35
+ } from "../chunk-3B276PGG.mjs";
36
+ import {
37
+ acquire,
38
+ getLockfilePath,
39
+ isStale,
40
+ read,
41
+ release,
42
+ replace
43
+ } from "../chunk-6EP2BLTV.mjs";
44
+ import {
45
+ startDaemonServer
46
+ } from "../chunk-S5VD7WTU.mjs";
47
+ import {
48
+ appendAuditEntry,
49
+ getAuditLogPath,
50
+ readAuditTail
51
+ } from "../chunk-PE23RMXY.mjs";
52
+ import {
53
+ ensureToken,
54
+ generateBearerToken,
55
+ getTokenPath,
56
+ readToken,
57
+ rotateToken
58
+ } from "../chunk-HTUAQRKH.mjs";
59
+ import "../chunk-U3DGFLXZ.mjs";
60
+ import "../chunk-Q2VY4R5F.mjs";
61
+ import "../chunk-H4BUAPPO.mjs";
62
+ import "../chunk-Z7DAACGZ.mjs";
63
+ import "../chunk-OF4DMAPJ.mjs";
64
+ import "../chunk-LZPLNZ5U.mjs";
65
+ import "../chunk-LKJMLGFP.mjs";
66
+ import "../chunk-TQLCLE4L.mjs";
67
+ import "../chunk-MTDFKNXX.mjs";
68
+ import "../chunk-XKSWCEGI.mjs";
69
+ import "../chunk-4UEJOM6W.mjs";
70
+ export {
71
+ acquire,
72
+ appendAuditEntry,
73
+ attachToDaemon,
74
+ disableDaemonTunnel,
75
+ enableDaemonTunnel,
76
+ ensureDaemon,
77
+ ensureToken,
78
+ exportHistoryViaDaemon,
79
+ extractTunnelUrl,
80
+ generateBearerToken,
81
+ getAuditLogPath,
82
+ getDaemonStatus,
83
+ getLockfilePath,
84
+ getPinnedCloudflaredVersion,
85
+ getTokenPath,
86
+ getTunnelBinaryPath,
87
+ hydrateCloudHistoryEntryViaDaemon,
88
+ installCloudflared,
89
+ isStale,
90
+ listOAuthClients,
91
+ listOAuthConsents,
92
+ read,
93
+ readAuditTail,
94
+ readToken,
95
+ release,
96
+ replace,
97
+ resolvePinnedAssetKey,
98
+ restartDaemon,
99
+ revokeAllOAuthClients,
100
+ revokeAllOAuthConsents,
101
+ revokeOAuthClient,
102
+ revokeOAuthConsent,
103
+ rotateDaemonToken,
104
+ rotateToken,
105
+ startDaemon,
106
+ startDaemonServer,
107
+ startTunnel,
108
+ stopDaemon,
109
+ syncCloudHistoryViaDaemon
110
+ };
@@ -0,0 +1,46 @@
1
+ var assets = {
2
+ "darwin-arm64": {
3
+ filename: "cloudflared-darwin-arm64.tgz",
4
+ sha256: "2aae4f69b0fc1c671b8353b4f594cbd902cd1e360c8eed2b8cad4602cb1546fb"
5
+ },
6
+ "darwin-x64": {
7
+ filename: "cloudflared-darwin-amd64.tgz",
8
+ sha256: "0f30140c4a5e213d22f951ef4c964cac5fb6a5f061ba6eba5ea932999f7c0394"
9
+ },
10
+ "linux-arm64": {
11
+ filename: "cloudflared-linux-arm64",
12
+ sha256: "0755ba4cbab59980e6148367fcf53a8f3ec85a97deefd63c2420cf7850769bee"
13
+ },
14
+ "linux-x64": {
15
+ filename: "cloudflared-linux-amd64",
16
+ sha256: "4a9e50e6d6d798e90fcd01933151a90bf7edd99a0a55c28ad18f2e16263a5c30"
17
+ },
18
+ "windows-x64": {
19
+ filename: "cloudflared-windows-amd64.exe",
20
+ sha256: "59b12880b24af581cf5b1013db601c7d843b9b097e9c78aa5957c7f39f741885"
21
+ }
22
+ };
23
+ var pins = {
24
+ assets: assets
25
+ };
26
+
27
+ type SupportedAssetKey = keyof typeof pins.assets;
28
+ interface InstallTunnelOptions {
29
+ configDir?: string;
30
+ platform?: NodeJS.Platform;
31
+ arch?: NodeJS.Architecture;
32
+ fetchImpl?: typeof fetch;
33
+ }
34
+ interface InstallTunnelResult {
35
+ binaryPath: string;
36
+ version: string;
37
+ assetKey: SupportedAssetKey;
38
+ filename: string;
39
+ sha256: string;
40
+ }
41
+ declare function installCloudflared(options?: InstallTunnelOptions): Promise<InstallTunnelResult>;
42
+ declare function getPinnedCloudflaredVersion(): string;
43
+ declare function getTunnelBinaryPath(configDir?: string, platform?: NodeJS.Platform): string;
44
+ declare function resolvePinnedAssetKey(platform: NodeJS.Platform, arch: NodeJS.Architecture): SupportedAssetKey;
45
+
46
+ export { type InstallTunnelOptions, type InstallTunnelResult, getPinnedCloudflaredVersion, getTunnelBinaryPath, installCloudflared, resolvePinnedAssetKey };
@@ -0,0 +1,14 @@
1
+ import {
2
+ getPinnedCloudflaredVersion,
3
+ getTunnelBinaryPath,
4
+ installCloudflared,
5
+ resolvePinnedAssetKey
6
+ } from "../chunk-3B276PGG.mjs";
7
+ import "../chunk-XKSWCEGI.mjs";
8
+ import "../chunk-4UEJOM6W.mjs";
9
+ export {
10
+ getPinnedCloudflaredVersion,
11
+ getTunnelBinaryPath,
12
+ installCloudflared,
13
+ resolvePinnedAssetKey
14
+ };
@@ -0,0 +1,163 @@
1
+ import { PerplexityClient } from '../client.js';
2
+ import { DaemonLockRecord } from './lockfile.js';
3
+ import '../config.js';
4
+ import 'patchright';
5
+
6
+ interface DaemonHealthStatus {
7
+ ok: boolean;
8
+ pid: number;
9
+ uuid: string | null;
10
+ version: string;
11
+ port: number;
12
+ uptimeMs: number;
13
+ startedAt: string;
14
+ heartbeatCount?: number;
15
+ tunnel?: {
16
+ status?: string;
17
+ url?: string | null;
18
+ pid?: number | null;
19
+ error?: string | null;
20
+ };
21
+ }
22
+ interface DaemonStatus {
23
+ running: boolean;
24
+ healthy: boolean;
25
+ stale: boolean;
26
+ configDir: string;
27
+ lockPath: string;
28
+ tokenPath: string;
29
+ record: DaemonLockRecord | null;
30
+ health: DaemonHealthStatus | null;
31
+ }
32
+ interface EnsureDaemonOptions {
33
+ configDir?: string;
34
+ host?: string;
35
+ port?: number;
36
+ tunnel?: boolean;
37
+ startTimeoutMs?: number;
38
+ pollIntervalMs?: number;
39
+ healthTimeoutMs?: number;
40
+ spawnDaemon?: (options: {
41
+ configDir: string;
42
+ host?: string;
43
+ port?: number;
44
+ tunnel?: boolean;
45
+ }) => void | Promise<void>;
46
+ treatSelfAsZombie?: boolean;
47
+ }
48
+ interface StartDaemonOptions {
49
+ configDir?: string;
50
+ host?: string;
51
+ port?: number;
52
+ tunnel?: boolean;
53
+ signal?: AbortSignal;
54
+ retries?: number;
55
+ retryDelayMs?: number;
56
+ healthTimeoutMs?: number;
57
+ version?: string;
58
+ createClient?: () => PerplexityClient;
59
+ }
60
+ interface DaemonConnectionInfo {
61
+ pid: number;
62
+ uuid: string;
63
+ port: number;
64
+ url: string;
65
+ bearerToken: string;
66
+ version: string;
67
+ startedAt: string;
68
+ tunnelUrl?: string | null;
69
+ }
70
+ interface StartedDaemonInstance extends DaemonConnectionInfo {
71
+ attached: boolean;
72
+ close: () => Promise<void>;
73
+ closed: Promise<void>;
74
+ }
75
+ declare function getDaemonStatus(options?: {
76
+ configDir?: string;
77
+ reclaimStale?: boolean;
78
+ healthTimeoutMs?: number;
79
+ treatSelfAsZombie?: boolean;
80
+ }): Promise<DaemonStatus>;
81
+ declare function ensureDaemon(options?: EnsureDaemonOptions): Promise<DaemonConnectionInfo>;
82
+ declare function startDaemon(options?: StartDaemonOptions): Promise<StartedDaemonInstance>;
83
+ declare function stopDaemon(options?: {
84
+ configDir?: string;
85
+ waitTimeoutMs?: number;
86
+ pollIntervalMs?: number;
87
+ healthTimeoutMs?: number;
88
+ /**
89
+ * When graceful /daemon/shutdown fails OR the wait-timeout elapses, signal
90
+ * the lockfile pid directly (SIGTERM then SIGKILL) and release the lockfile.
91
+ * Required for the "Kill daemon" UX when the daemon is unresponsive.
92
+ */
93
+ force?: boolean;
94
+ }): Promise<{
95
+ stopped: boolean;
96
+ forced: boolean;
97
+ pid?: number | null;
98
+ }>;
99
+ declare function restartDaemon(options?: {
100
+ configDir?: string;
101
+ waitTimeoutMs?: number;
102
+ pollIntervalMs?: number;
103
+ healthTimeoutMs?: number;
104
+ spawnDaemon?: EnsureDaemonOptions["spawnDaemon"];
105
+ startTimeoutMs?: number;
106
+ treatSelfAsZombie?: boolean;
107
+ }): Promise<{
108
+ stopped: boolean;
109
+ reSpawned: boolean;
110
+ connection: DaemonConnectionInfo | null;
111
+ }>;
112
+ declare function rotateDaemonToken(options?: {
113
+ configDir?: string;
114
+ healthTimeoutMs?: number;
115
+ }): Promise<DaemonConnectionInfo>;
116
+ declare function enableDaemonTunnel(options?: {
117
+ configDir?: string;
118
+ healthTimeoutMs?: number;
119
+ }): Promise<DaemonStatus>;
120
+ declare function disableDaemonTunnel(options?: {
121
+ configDir?: string;
122
+ healthTimeoutMs?: number;
123
+ }): Promise<DaemonStatus>;
124
+ interface ConsentEntrySummary {
125
+ clientId: string;
126
+ redirectUri: string;
127
+ approvedAt: string;
128
+ expiresAt: number;
129
+ }
130
+ declare function listOAuthConsents(options?: {
131
+ configDir?: string;
132
+ healthTimeoutMs?: number;
133
+ }): Promise<ConsentEntrySummary[]>;
134
+ declare function revokeOAuthConsent(clientId: string, redirectUri?: string, options?: {
135
+ configDir?: string;
136
+ healthTimeoutMs?: number;
137
+ }): Promise<number>;
138
+ declare function revokeAllOAuthConsents(options?: {
139
+ configDir?: string;
140
+ healthTimeoutMs?: number;
141
+ }): Promise<number>;
142
+ interface AuthorizedClientSummary {
143
+ clientId: string;
144
+ clientName?: string;
145
+ registeredAt: number;
146
+ lastUsedAt?: string;
147
+ consentLastApprovedAt?: string;
148
+ activeTokens: number;
149
+ }
150
+ declare function listOAuthClients(options?: {
151
+ configDir?: string;
152
+ healthTimeoutMs?: number;
153
+ }): Promise<AuthorizedClientSummary[]>;
154
+ declare function revokeOAuthClient(clientId: string, options?: {
155
+ configDir?: string;
156
+ healthTimeoutMs?: number;
157
+ }): Promise<boolean>;
158
+ declare function revokeAllOAuthClients(options?: {
159
+ configDir?: string;
160
+ healthTimeoutMs?: number;
161
+ }): Promise<number>;
162
+
163
+ export { type AuthorizedClientSummary, type ConsentEntrySummary, type DaemonConnectionInfo, type DaemonHealthStatus, type DaemonStatus, type EnsureDaemonOptions, type StartDaemonOptions, type StartedDaemonInstance, disableDaemonTunnel, enableDaemonTunnel, ensureDaemon, getDaemonStatus, listOAuthClients, listOAuthConsents, restartDaemon, revokeAllOAuthClients, revokeAllOAuthConsents, revokeOAuthClient, revokeOAuthConsent, rotateDaemonToken, startDaemon, stopDaemon };
@@ -0,0 +1,50 @@
1
+ import {
2
+ disableDaemonTunnel,
3
+ enableDaemonTunnel,
4
+ ensureDaemon,
5
+ getDaemonStatus,
6
+ listOAuthClients,
7
+ listOAuthConsents,
8
+ restartDaemon,
9
+ revokeAllOAuthClients,
10
+ revokeAllOAuthConsents,
11
+ revokeOAuthClient,
12
+ revokeOAuthConsent,
13
+ rotateDaemonToken,
14
+ startDaemon,
15
+ stopDaemon
16
+ } from "../chunk-X45O6YD3.mjs";
17
+ import "../chunk-KCXM2M4B.mjs";
18
+ import "../chunk-6YMQVLFX.mjs";
19
+ import "../chunk-3B276PGG.mjs";
20
+ import "../chunk-6EP2BLTV.mjs";
21
+ import "../chunk-S5VD7WTU.mjs";
22
+ import "../chunk-PE23RMXY.mjs";
23
+ import "../chunk-HTUAQRKH.mjs";
24
+ import "../chunk-U3DGFLXZ.mjs";
25
+ import "../chunk-Q2VY4R5F.mjs";
26
+ import "../chunk-H4BUAPPO.mjs";
27
+ import "../chunk-Z7DAACGZ.mjs";
28
+ import "../chunk-OF4DMAPJ.mjs";
29
+ import "../chunk-LZPLNZ5U.mjs";
30
+ import "../chunk-LKJMLGFP.mjs";
31
+ import "../chunk-TQLCLE4L.mjs";
32
+ import "../chunk-MTDFKNXX.mjs";
33
+ import "../chunk-XKSWCEGI.mjs";
34
+ import "../chunk-4UEJOM6W.mjs";
35
+ export {
36
+ disableDaemonTunnel,
37
+ enableDaemonTunnel,
38
+ ensureDaemon,
39
+ getDaemonStatus,
40
+ listOAuthClients,
41
+ listOAuthConsents,
42
+ restartDaemon,
43
+ revokeAllOAuthClients,
44
+ revokeAllOAuthConsents,
45
+ revokeOAuthClient,
46
+ revokeOAuthConsent,
47
+ rotateDaemonToken,
48
+ startDaemon,
49
+ stopDaemon
50
+ };
@@ -0,0 +1,29 @@
1
+ interface DaemonLockRecord {
2
+ pid: number;
3
+ uuid: string;
4
+ port: number;
5
+ bearerToken: string;
6
+ version: string;
7
+ startedAt: string;
8
+ cloudflaredPid?: number | null;
9
+ tunnelUrl?: string | null;
10
+ }
11
+ interface LockfileOptions {
12
+ lockPath?: string;
13
+ }
14
+ interface ReplaceLockfileOptions extends LockfileOptions {
15
+ expectedUuid?: string;
16
+ }
17
+ interface LockfileStaleOptions {
18
+ echoedUuid?: string | null;
19
+ }
20
+ declare function getLockfilePath(configDir?: string): string;
21
+ declare function acquire(record: DaemonLockRecord, options?: LockfileOptions): boolean;
22
+ declare function read(options?: LockfileOptions): DaemonLockRecord | null;
23
+ declare function release(options?: LockfileOptions & {
24
+ expectedUuid?: string;
25
+ }): boolean;
26
+ declare function replace(record: DaemonLockRecord, options?: ReplaceLockfileOptions): boolean;
27
+ declare function isStale(record: DaemonLockRecord | null, options?: LockfileStaleOptions): boolean;
28
+
29
+ export { type DaemonLockRecord, type LockfileOptions, type LockfileStaleOptions, type ReplaceLockfileOptions, acquire, getLockfilePath, isStale, read, release, replace };
@@ -0,0 +1,18 @@
1
+ import {
2
+ acquire,
3
+ getLockfilePath,
4
+ isStale,
5
+ read,
6
+ release,
7
+ replace
8
+ } from "../chunk-6EP2BLTV.mjs";
9
+ import "../chunk-XKSWCEGI.mjs";
10
+ import "../chunk-4UEJOM6W.mjs";
11
+ export {
12
+ acquire,
13
+ getLockfilePath,
14
+ isStale,
15
+ read,
16
+ release,
17
+ replace
18
+ };