remnote-mcp-server 0.14.1 → 0.15.0

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 (49) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +82 -28
  3. package/dist/cli.d.ts +2 -1
  4. package/dist/cli.js +9 -2
  5. package/dist/cli.js.map +1 -1
  6. package/dist/config.d.ts +14 -2
  7. package/dist/config.js +210 -10
  8. package/dist/config.js.map +1 -1
  9. package/dist/daemon.d.ts +61 -0
  10. package/dist/daemon.js +735 -0
  11. package/dist/daemon.js.map +1 -0
  12. package/dist/index.js +6 -3
  13. package/dist/index.js.map +1 -1
  14. package/dist/remnote-cli/cli.js +4 -0
  15. package/dist/remnote-cli/cli.js.map +1 -1
  16. package/dist/remnote-cli/client/mcp-server-client.js +7 -1
  17. package/dist/remnote-cli/client/mcp-server-client.js.map +1 -1
  18. package/dist/remnote-cli/commands/content-input.d.ts +0 -12
  19. package/dist/remnote-cli/commands/content-input.js +0 -20
  20. package/dist/remnote-cli/commands/content-input.js.map +1 -1
  21. package/dist/remnote-cli/commands/create.js +3 -3
  22. package/dist/remnote-cli/commands/create.js.map +1 -1
  23. package/dist/remnote-cli/commands/journal.js +3 -0
  24. package/dist/remnote-cli/commands/journal.js.map +1 -1
  25. package/dist/remnote-cli/commands/read.js +20 -2
  26. package/dist/remnote-cli/commands/read.js.map +1 -1
  27. package/dist/remnote-cli/commands/search.js +24 -5
  28. package/dist/remnote-cli/commands/search.js.map +1 -1
  29. package/dist/remnote-cli/commands/update.js +5 -24
  30. package/dist/remnote-cli/commands/update.js.map +1 -1
  31. package/dist/remnote-cli/commands/write-actions.d.ts +4 -0
  32. package/dist/remnote-cli/commands/write-actions.js +123 -0
  33. package/dist/remnote-cli/commands/write-actions.js.map +1 -0
  34. package/dist/schemas/remnote-schemas.d.ts +33 -10
  35. package/dist/schemas/remnote-schemas.js +58 -16
  36. package/dist/schemas/remnote-schemas.js.map +1 -1
  37. package/dist/tools/index.d.ts +1264 -12
  38. package/dist/tools/index.js +157 -47
  39. package/dist/tools/index.js.map +1 -1
  40. package/dist/websocket-server.d.ts +5 -0
  41. package/dist/websocket-server.js +64 -10
  42. package/dist/websocket-server.js.map +1 -1
  43. package/mcpb/remnote-local/README.md +4 -3
  44. package/mcpb/remnote-local/manifest.json +30 -28
  45. package/mcpb/remnote-local/package.json +1 -1
  46. package/mcpb/remnote-local/remnote-local.mcpb +0 -0
  47. package/mcpb/remnote-local/server/fallback-tools.generated.js +323 -0
  48. package/mcpb/remnote-local/server/index.js +7 -122
  49. package/package.json +5 -3
@@ -0,0 +1,61 @@
1
+ import { spawn, execFile } from 'node:child_process';
2
+ import type { CliOptions } from './cli.js';
3
+ declare const execFileAsync: typeof execFile.__promisify__;
4
+ export declare const DEFAULT_DAEMON_DIR_NAME = ".remnote-mcp-server";
5
+ export declare const DAEMON_PID_FILE_NAME = "remnote-mcp-server.pid";
6
+ export declare const DAEMON_STATE_FILE_NAME = "daemon.json";
7
+ export declare const DAEMON_LOG_FILE_NAME = "remnote-mcp-server.log";
8
+ export declare const LAUNCHD_LABEL = "com.remnote.mcp-server";
9
+ export interface DaemonCommand {
10
+ action: DaemonAction;
11
+ cliOptions: CliOptions;
12
+ stateDir?: string;
13
+ timeoutMs?: number;
14
+ force?: boolean;
15
+ lines?: number;
16
+ }
17
+ export type DaemonAction = 'start' | 'stop' | 'restart' | 'status' | 'logs' | 'install-launchd' | 'uninstall-launchd';
18
+ export interface DaemonState {
19
+ pid: number;
20
+ startedAt: string;
21
+ entrypointPath: string;
22
+ logFile: string;
23
+ httpPort: number;
24
+ httpHost: string;
25
+ wsPort: number;
26
+ wsHost: string;
27
+ }
28
+ export interface DaemonPaths {
29
+ stateDir: string;
30
+ pidFile: string;
31
+ stateFile: string;
32
+ logFile: string;
33
+ lockFile: string;
34
+ launchAgentFile: string;
35
+ }
36
+ export interface DaemonRuntime {
37
+ argv?: string[];
38
+ entrypointPath?: string;
39
+ execPath?: string;
40
+ homeDir?: string;
41
+ platform?: NodeJS.Platform;
42
+ uid?: number;
43
+ stdout?: Pick<NodeJS.WriteStream, 'write'>;
44
+ stderr?: Pick<NodeJS.WriteStream, 'write'>;
45
+ isProcessAlive?: (pid: number) => boolean;
46
+ canBind?: (host: string, port: number) => Promise<boolean>;
47
+ getProcessCommand?: (pid: number) => Promise<string | null>;
48
+ spawnProcess?: typeof spawn;
49
+ execFile?: typeof execFileAsync;
50
+ killProcess?: (pid: number, signal: NodeJS.Signals) => void;
51
+ }
52
+ export interface DaemonResult {
53
+ exitCode: number;
54
+ handled: true;
55
+ }
56
+ export declare function getDefaultDaemonPaths(homeDir?: string, stateDir?: string): DaemonPaths;
57
+ export declare function isDaemonCommand(argv?: string[]): boolean;
58
+ export declare function handleDaemonCommand(argv?: string[], runtime?: DaemonRuntime): Promise<DaemonResult>;
59
+ export declare function formatDaemonUsage(): string;
60
+ export declare function runDaemonCommand(command: DaemonCommand, runtime?: DaemonRuntime): Promise<number>;
61
+ export {};