remnote-mcp-server 0.5.1 → 0.6.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.
- package/CHANGELOG.md +31 -2
- package/README.md +20 -8
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/remnote-schemas.d.ts +26 -1
- package/dist/schemas/remnote-schemas.js +73 -2
- package/dist/schemas/remnote-schemas.js.map +1 -1
- package/dist/tools/index.d.ts +283 -15
- package/dist/tools/index.js +194 -22
- package/dist/tools/index.js.map +1 -1
- package/dist/types/bridge.d.ts +8 -1
- package/dist/version-compat.d.ts +7 -0
- package/dist/version-compat.js +28 -0
- package/dist/version-compat.js.map +1 -0
- package/dist/websocket-server.d.ts +5 -1
- package/dist/websocket-server.js +22 -1
- package/dist/websocket-server.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,35 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.0] - 2026-02-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `remnote_status` now includes `serverVersion` and `version_warning`, powered by bridge `hello` handshake tracking to
|
|
15
|
+
surface bridge/server 0.x minor-version mismatches.
|
|
16
|
+
- Added `remnote_search_by_tag` with the same content controls as `remnote_search`
|
|
17
|
+
(`includeContent`, `depth`, `childLimit`, `maxContentLength`).
|
|
18
|
+
- `remnote_search` and `remnote_read_note` output schemas now include richer bridge metadata:
|
|
19
|
+
`headline`, `aliases`, `parentRemId`, `parentTitle`, and `contentProperties`.
|
|
20
|
+
- `remnote_search` now supports `includeContent: "structured"` and returns `contentStructured` payloads for
|
|
21
|
+
downstream navigation.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **BREAKING**: Search/read `includeContent` changed from boolean to string mode
|
|
26
|
+
(`'none' | 'markdown'`; search also supports `'structured'`).
|
|
27
|
+
- **BREAKING**: `remnote_read_note` no longer returns `children`; `content` now returns rendered markdown subtree
|
|
28
|
+
output, and `detail` was removed from search/read schemas.
|
|
29
|
+
- Default content/query limits changed: read depth now defaults to 5, plus schema defaults for `childLimit` and
|
|
30
|
+
`maxContentLength`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- `remnote_status` now reports compatibility warnings for legacy 0.5.x bridge plugins that do not send `hello`, by
|
|
35
|
+
falling back to `pluginVersion` from `get_status`.
|
|
36
|
+
- Stabilized websocket startup and logger file handling in automated tests to reduce intermittent
|
|
37
|
+
environment-sensitive failures.
|
|
38
|
+
|
|
10
39
|
## [0.5.1] - 2026-02-24
|
|
11
40
|
|
|
12
41
|
### Changed
|
|
@@ -26,8 +55,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
26
55
|
- Added `outputSchema` metadata for `remnote_search` and `remnote_read_note`, including `detail`, `remType`, and
|
|
27
56
|
`cardDirection` response fields for AI clients.
|
|
28
57
|
- Search responses now include `detail`, `remType`, and `cardDirection`.
|
|
29
|
-
- Added end-to-end integration test tooling with `npm run test:integration` and a standalone
|
|
30
|
-
|
|
58
|
+
- Added end-to-end integration test tooling with `npm run test:integration` and a standalone `./run-status-check.sh`
|
|
59
|
+
helper.
|
|
31
60
|
- Added ChatGPT setup documentation with screenshots and linked it from quick-start/docs navigation.
|
|
32
61
|
|
|
33
62
|
### Changed
|
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|

|
|
5
5
|
[](https://codecov.io/gh/robert7/remnote-mcp-server)
|
|
6
6
|
|
|
7
|
-
MCP server that bridges AI agents (e.g. Claude Code) to [RemNote](https://remnote.com/) via the [RemNote Automation
|
|
7
|
+
MCP server that bridges AI agents (e.g. Claude Code) to [RemNote](https://remnote.com/) via the [RemNote Automation
|
|
8
|
+
Bridge plugin](https://github.com/robert7/remnote-mcp-bridge).
|
|
8
9
|
|
|
9
10
|
> This is a working solution, but still experimental. If you run into any issues, please [report them here](https://github.com/robert7/remnote-mcp-server/issues).
|
|
10
11
|
|
|
@@ -14,8 +15,8 @@ The RemNote MCP Server enables AI assistants like Claude Code to interact direct
|
|
|
14
15
|
through the Model Context Protocol (MCP). Create notes, search your knowledge base, update existing notes, and maintain
|
|
15
16
|
your daily journal—all through conversational commands.
|
|
16
17
|
|
|
17
|
-
For some agentic workflows or CLI-first automation, the companion app
|
|
18
|
-
may be a better fit than running a full MCP server.
|
|
18
|
+
For some agentic workflows or CLI-first automation, the companion app
|
|
19
|
+
**[remnote-cli](https://github.com/robert7/remnote-cli)** may be a better fit than running a full MCP server.
|
|
19
20
|
|
|
20
21
|
## Demo
|
|
21
22
|
|
|
@@ -25,8 +26,8 @@ See AI agent examples in action with RemNote: **[View Demo →](docs/demo.md)**
|
|
|
25
26
|
|
|
26
27
|
This system consists of **two separate components** that work together:
|
|
27
28
|
|
|
28
|
-
1. **[RemNote Automation Bridge](https://github.com/robert7/remnote-mcp-bridge)** - A RemNote plugin that runs in your
|
|
29
|
-
or RemNote desktop app and exposes RemNote API functionality via WebSocket
|
|
29
|
+
1. **[RemNote Automation Bridge](https://github.com/robert7/remnote-mcp-bridge)** - A RemNote plugin that runs in your
|
|
30
|
+
browser or RemNote desktop app and exposes RemNote API functionality via WebSocket
|
|
30
31
|
2. **RemNote MCP Server** (this project) - A standalone server that connects your AI assistant to the bridge using MCP
|
|
31
32
|
protocol
|
|
32
33
|
|
|
@@ -65,15 +66,17 @@ connection always stays local for security. See [Remote Access Guide](docs/guide
|
|
|
65
66
|
|
|
66
67
|
### 1. Install the Server
|
|
67
68
|
|
|
69
|
+
> **Version compatibility (`0.x` semver):** install a `remnote-mcp-server` version compatible with your installed RemNote Automation Bridge plugin version. See the [Bridge / Consumer Version Compatibility Guide](https://github.com/robert7/remnote-mcp-bridge/blob/main/docs/guides/bridge-consumer-version-compatibility.md).
|
|
70
|
+
|
|
68
71
|
```bash
|
|
69
72
|
npm install -g remnote-mcp-server
|
|
70
73
|
```
|
|
71
74
|
|
|
72
75
|
### 2. Install the RemNote Plugin
|
|
73
76
|
|
|
74
|
-
Install the [RemNote Automation Bridge plugin](https://github.com/robert7/remnote-mcp-bridge) in your RemNote app.
|
|
75
|
-
available from GitHub; registration in the RemNote marketplace is pending approval. Configure the plugin
|
|
76
|
-
to `ws://127.0.0.1:3002`.
|
|
77
|
+
Install the [RemNote Automation Bridge plugin](https://github.com/robert7/remnote-mcp-bridge) in your RemNote app.
|
|
78
|
+
Currently available from GitHub; registration in the RemNote marketplace is pending approval. Configure the plugin
|
|
79
|
+
to connect to `ws://127.0.0.1:3002`.
|
|
77
80
|
|
|
78
81
|
### 3. Start the Server
|
|
79
82
|
|
|
@@ -102,6 +105,9 @@ Keep this terminal running.
|
|
|
102
105
|
### Getting Started
|
|
103
106
|
|
|
104
107
|
- **[Installation Guide](docs/guides/installation.md)** - Complete installation instructions
|
|
108
|
+
- **[Bridge / Consumer Version Compatibility
|
|
109
|
+
Guide](https://github.com/robert7/remnote-mcp-bridge/blob/main/docs/guides/bridge-consumer-version-compatibility.md)**
|
|
110
|
+
\- Match server version to installed bridge plugin version (`0.x` semver)
|
|
105
111
|
- **[Configuration Guide](docs/guides/configuration.md)** - Configure Claude Code CLI, Accomplish, and other clients
|
|
106
112
|
- **[ChatGPT Configuration Guide](docs/guides/configuration-chatgpt.md)** - Set up ChatGPT Apps with your MCP server
|
|
107
113
|
- **[Demo & Screenshots](docs/demo.md)** - See the server in action with different AI clients
|
|
@@ -129,6 +135,7 @@ Keep this terminal running.
|
|
|
129
135
|
|---------------------------|------------------------------------------------|
|
|
130
136
|
| `remnote_create_note` | Create new notes with optional parent and tags |
|
|
131
137
|
| `remnote_search` | Search knowledge base with full-text search |
|
|
138
|
+
| `remnote_search_by_tag` | Search by tag with ancestor-context resolution |
|
|
132
139
|
| `remnote_read_note` | Read note by ID with configurable depth |
|
|
133
140
|
| `remnote_update_note` | Update title, append content, or modify tags |
|
|
134
141
|
| `remnote_append_journal` | Append to today's daily document |
|
|
@@ -208,6 +215,9 @@ See [CLI Options Reference](docs/guides/cli-options.md) for all options.
|
|
|
208
215
|
|
|
209
216
|
- Verify configuration: `claude mcp list`
|
|
210
217
|
- Restart Claude Code completely
|
|
218
|
+
- If this started after upgrades, verify bridge/server version compatibility (`0.x` minor versions may break); see the
|
|
219
|
+
[Bridge / Consumer Version Compatibility
|
|
220
|
+
Guide](https://github.com/robert7/remnote-mcp-bridge/blob/main/docs/guides/bridge-consumer-version-compatibility.md)
|
|
211
221
|
|
|
212
222
|
See the [Troubleshooting Guide](docs/guides/troubleshooting.md) for detailed solutions.
|
|
213
223
|
|
|
@@ -215,6 +225,8 @@ See the [Troubleshooting Guide](docs/guides/troubleshooting.md) for detailed sol
|
|
|
215
225
|
|
|
216
226
|
**Development setup:**
|
|
217
227
|
|
|
228
|
+
> **Version compatibility tip:** when testing against a local or marketplace-installed bridge plugin, use a server checkout/tag compatible with that bridge plugin version (see the [Bridge / Consumer Version Compatibility Guide](https://github.com/robert7/remnote-mcp-bridge/blob/main/docs/guides/bridge-consumer-version-compatibility.md)).
|
|
229
|
+
|
|
218
230
|
```bash
|
|
219
231
|
git clone https://github.com/robert7/remnote-mcp-server.git
|
|
220
232
|
cd remnote-mcp-server
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ async function main() {
|
|
|
36
36
|
? createRequestResponseLogger(config.responseLog)
|
|
37
37
|
: undefined;
|
|
38
38
|
// Initialize WebSocket server for RemNote plugin
|
|
39
|
-
const wsServer = new WebSocketServer(config.wsPort, config.wsHost, logger, requestLogger, responseLogger);
|
|
39
|
+
const wsServer = new WebSocketServer(config.wsPort, config.wsHost, logger, packageJson.version, requestLogger, responseLogger);
|
|
40
40
|
// Log connection status
|
|
41
41
|
wsServer.onClientConnect(() => {
|
|
42
42
|
logger.info('RemNote plugin connected');
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|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
|
@@ -8,11 +8,36 @@ export declare const CreateNoteSchema: z.ZodObject<{
|
|
|
8
8
|
export declare const SearchSchema: z.ZodObject<{
|
|
9
9
|
query: z.ZodString;
|
|
10
10
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
11
|
-
includeContent: z.ZodDefault<z.
|
|
11
|
+
includeContent: z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
none: "none";
|
|
13
|
+
markdown: "markdown";
|
|
14
|
+
structured: "structured";
|
|
15
|
+
}>>;
|
|
16
|
+
depth: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
childLimit: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
maxContentLength: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const SearchByTagSchema: z.ZodObject<{
|
|
21
|
+
tag: z.ZodString;
|
|
22
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
23
|
+
includeContent: z.ZodDefault<z.ZodEnum<{
|
|
24
|
+
none: "none";
|
|
25
|
+
markdown: "markdown";
|
|
26
|
+
structured: "structured";
|
|
27
|
+
}>>;
|
|
28
|
+
depth: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
childLimit: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
maxContentLength: z.ZodDefault<z.ZodNumber>;
|
|
12
31
|
}, z.core.$strip>;
|
|
13
32
|
export declare const ReadNoteSchema: z.ZodObject<{
|
|
14
33
|
remId: z.ZodString;
|
|
15
34
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
includeContent: z.ZodDefault<z.ZodEnum<{
|
|
36
|
+
none: "none";
|
|
37
|
+
markdown: "markdown";
|
|
38
|
+
}>>;
|
|
39
|
+
childLimit: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
maxContentLength: z.ZodDefault<z.ZodNumber>;
|
|
16
41
|
}, z.core.$strip>;
|
|
17
42
|
export declare const UpdateNoteSchema: z.ZodObject<{
|
|
18
43
|
remId: z.ZodString;
|
|
@@ -8,11 +8,82 @@ export const CreateNoteSchema = z.object({
|
|
|
8
8
|
export const SearchSchema = z.object({
|
|
9
9
|
query: z.string().describe('Search query text'),
|
|
10
10
|
limit: z.number().int().min(1).max(150).default(50).describe('Maximum results'),
|
|
11
|
-
includeContent: z
|
|
11
|
+
includeContent: z
|
|
12
|
+
.enum(['none', 'markdown', 'structured'])
|
|
13
|
+
.default('none')
|
|
14
|
+
.describe('Content rendering mode: "none" omits content, "markdown" renders child subtree, "structured" returns nested child objects with remIds'),
|
|
15
|
+
depth: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.min(0)
|
|
19
|
+
.max(10)
|
|
20
|
+
.default(1)
|
|
21
|
+
.describe('Depth of child hierarchy to render (when includeContent is markdown or structured)'),
|
|
22
|
+
childLimit: z
|
|
23
|
+
.number()
|
|
24
|
+
.int()
|
|
25
|
+
.min(1)
|
|
26
|
+
.max(500)
|
|
27
|
+
.default(20)
|
|
28
|
+
.describe('Maximum children per level in rendered content'),
|
|
29
|
+
maxContentLength: z
|
|
30
|
+
.number()
|
|
31
|
+
.int()
|
|
32
|
+
.min(100)
|
|
33
|
+
.max(200000)
|
|
34
|
+
.default(3000)
|
|
35
|
+
.describe('Maximum character length for rendered content'),
|
|
36
|
+
});
|
|
37
|
+
export const SearchByTagSchema = z.object({
|
|
38
|
+
tag: z.string().min(1).describe('Tag name to search (with or without # prefix)'),
|
|
39
|
+
limit: z.number().int().min(1).max(150).default(50).describe('Maximum results'),
|
|
40
|
+
includeContent: z
|
|
41
|
+
.enum(['none', 'markdown', 'structured'])
|
|
42
|
+
.default('none')
|
|
43
|
+
.describe('Content rendering mode: "none" omits content, "markdown" renders child subtree, "structured" returns nested child objects with remIds'),
|
|
44
|
+
depth: z
|
|
45
|
+
.number()
|
|
46
|
+
.int()
|
|
47
|
+
.min(0)
|
|
48
|
+
.max(10)
|
|
49
|
+
.default(1)
|
|
50
|
+
.describe('Depth of child hierarchy to render (when includeContent is markdown or structured)'),
|
|
51
|
+
childLimit: z
|
|
52
|
+
.number()
|
|
53
|
+
.int()
|
|
54
|
+
.min(1)
|
|
55
|
+
.max(500)
|
|
56
|
+
.default(20)
|
|
57
|
+
.describe('Maximum children per level in rendered content'),
|
|
58
|
+
maxContentLength: z
|
|
59
|
+
.number()
|
|
60
|
+
.int()
|
|
61
|
+
.min(100)
|
|
62
|
+
.max(200000)
|
|
63
|
+
.default(3000)
|
|
64
|
+
.describe('Maximum character length for rendered content'),
|
|
12
65
|
});
|
|
13
66
|
export const ReadNoteSchema = z.object({
|
|
14
67
|
remId: z.string().describe('The Rem ID to read'),
|
|
15
|
-
depth: z.number().int().min(0).max(10).default(
|
|
68
|
+
depth: z.number().int().min(0).max(10).default(5).describe('Depth of child hierarchy to render'),
|
|
69
|
+
includeContent: z
|
|
70
|
+
.enum(['none', 'markdown'])
|
|
71
|
+
.default('markdown')
|
|
72
|
+
.describe('Content rendering mode: "none" omits content, "markdown" renders child subtree'),
|
|
73
|
+
childLimit: z
|
|
74
|
+
.number()
|
|
75
|
+
.int()
|
|
76
|
+
.min(1)
|
|
77
|
+
.max(500)
|
|
78
|
+
.default(100)
|
|
79
|
+
.describe('Maximum children per level in rendered content'),
|
|
80
|
+
maxContentLength: z
|
|
81
|
+
.number()
|
|
82
|
+
.int()
|
|
83
|
+
.min(100)
|
|
84
|
+
.max(200000)
|
|
85
|
+
.default(100000)
|
|
86
|
+
.describe('Maximum character length for rendered content'),
|
|
16
87
|
});
|
|
17
88
|
export const UpdateNoteSchema = z.object({
|
|
18
89
|
remId: z.string().describe('The Rem ID to update'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remnote-schemas.js","sourceRoot":"","sources":["../../src/schemas/remnote-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,E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,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC3E,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CACnE,CAAC,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -45,6 +45,19 @@ export declare const SEARCH_TOOL: {
|
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
47
|
includeContent: {
|
|
48
|
+
type: string;
|
|
49
|
+
enum: string[];
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
depth: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
childLimit: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
maxContentLength: {
|
|
48
61
|
type: string;
|
|
49
62
|
description: string;
|
|
50
63
|
};
|
|
@@ -68,8 +81,23 @@ export declare const SEARCH_TOOL: {
|
|
|
68
81
|
type: string;
|
|
69
82
|
description: string;
|
|
70
83
|
};
|
|
71
|
-
|
|
84
|
+
headline: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
parentRemId: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
parentTitle: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
aliases: {
|
|
72
97
|
type: string;
|
|
98
|
+
items: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
73
101
|
description: string;
|
|
74
102
|
};
|
|
75
103
|
remType: {
|
|
@@ -84,6 +112,218 @@ export declare const SEARCH_TOOL: {
|
|
|
84
112
|
type: string;
|
|
85
113
|
description: string;
|
|
86
114
|
};
|
|
115
|
+
contentStructured: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
items: {
|
|
119
|
+
type: string;
|
|
120
|
+
properties: {
|
|
121
|
+
remId: {
|
|
122
|
+
type: string;
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
title: {
|
|
126
|
+
type: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
headline: {
|
|
130
|
+
type: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
aliases: {
|
|
134
|
+
type: string;
|
|
135
|
+
items: {
|
|
136
|
+
type: string;
|
|
137
|
+
};
|
|
138
|
+
description: string;
|
|
139
|
+
};
|
|
140
|
+
remType: {
|
|
141
|
+
type: string;
|
|
142
|
+
description: string;
|
|
143
|
+
};
|
|
144
|
+
cardDirection: {
|
|
145
|
+
type: string;
|
|
146
|
+
description: string;
|
|
147
|
+
};
|
|
148
|
+
children: {
|
|
149
|
+
type: string;
|
|
150
|
+
description: string;
|
|
151
|
+
items: {
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
required: string[];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
contentProperties: {
|
|
160
|
+
type: string;
|
|
161
|
+
description: string;
|
|
162
|
+
properties: {
|
|
163
|
+
childrenRendered: {
|
|
164
|
+
type: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
childrenTotal: {
|
|
168
|
+
type: string;
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
contentTruncated: {
|
|
172
|
+
type: string;
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export declare const SEARCH_BY_TAG_TOOL: {
|
|
184
|
+
name: string;
|
|
185
|
+
description: string;
|
|
186
|
+
inputSchema: {
|
|
187
|
+
type: "object";
|
|
188
|
+
properties: {
|
|
189
|
+
tag: {
|
|
190
|
+
type: string;
|
|
191
|
+
description: string;
|
|
192
|
+
};
|
|
193
|
+
limit: {
|
|
194
|
+
type: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
includeContent: {
|
|
198
|
+
type: string;
|
|
199
|
+
enum: string[];
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
depth: {
|
|
203
|
+
type: string;
|
|
204
|
+
description: string;
|
|
205
|
+
};
|
|
206
|
+
childLimit: {
|
|
207
|
+
type: string;
|
|
208
|
+
description: string;
|
|
209
|
+
};
|
|
210
|
+
maxContentLength: {
|
|
211
|
+
type: string;
|
|
212
|
+
description: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
required: string[];
|
|
216
|
+
};
|
|
217
|
+
outputSchema: {
|
|
218
|
+
type: "object";
|
|
219
|
+
properties: {
|
|
220
|
+
results: {
|
|
221
|
+
type: string;
|
|
222
|
+
description: string;
|
|
223
|
+
items: {
|
|
224
|
+
type: string;
|
|
225
|
+
properties: {
|
|
226
|
+
remId: {
|
|
227
|
+
type: string;
|
|
228
|
+
description: string;
|
|
229
|
+
};
|
|
230
|
+
title: {
|
|
231
|
+
type: string;
|
|
232
|
+
description: string;
|
|
233
|
+
};
|
|
234
|
+
headline: {
|
|
235
|
+
type: string;
|
|
236
|
+
description: string;
|
|
237
|
+
};
|
|
238
|
+
parentRemId: {
|
|
239
|
+
type: string;
|
|
240
|
+
description: string;
|
|
241
|
+
};
|
|
242
|
+
parentTitle: {
|
|
243
|
+
type: string;
|
|
244
|
+
description: string;
|
|
245
|
+
};
|
|
246
|
+
aliases: {
|
|
247
|
+
type: string;
|
|
248
|
+
items: {
|
|
249
|
+
type: string;
|
|
250
|
+
};
|
|
251
|
+
description: string;
|
|
252
|
+
};
|
|
253
|
+
remType: {
|
|
254
|
+
type: string;
|
|
255
|
+
description: string;
|
|
256
|
+
};
|
|
257
|
+
cardDirection: {
|
|
258
|
+
type: string;
|
|
259
|
+
description: string;
|
|
260
|
+
};
|
|
261
|
+
content: {
|
|
262
|
+
type: string;
|
|
263
|
+
description: string;
|
|
264
|
+
};
|
|
265
|
+
contentStructured: {
|
|
266
|
+
type: string;
|
|
267
|
+
description: string;
|
|
268
|
+
items: {
|
|
269
|
+
type: string;
|
|
270
|
+
properties: {
|
|
271
|
+
remId: {
|
|
272
|
+
type: string;
|
|
273
|
+
description: string;
|
|
274
|
+
};
|
|
275
|
+
title: {
|
|
276
|
+
type: string;
|
|
277
|
+
description: string;
|
|
278
|
+
};
|
|
279
|
+
headline: {
|
|
280
|
+
type: string;
|
|
281
|
+
description: string;
|
|
282
|
+
};
|
|
283
|
+
aliases: {
|
|
284
|
+
type: string;
|
|
285
|
+
items: {
|
|
286
|
+
type: string;
|
|
287
|
+
};
|
|
288
|
+
description: string;
|
|
289
|
+
};
|
|
290
|
+
remType: {
|
|
291
|
+
type: string;
|
|
292
|
+
description: string;
|
|
293
|
+
};
|
|
294
|
+
cardDirection: {
|
|
295
|
+
type: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
children: {
|
|
299
|
+
type: string;
|
|
300
|
+
description: string;
|
|
301
|
+
items: {
|
|
302
|
+
type: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
required: string[];
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
contentProperties: {
|
|
310
|
+
type: string;
|
|
311
|
+
description: string;
|
|
312
|
+
properties: {
|
|
313
|
+
childrenRendered: {
|
|
314
|
+
type: string;
|
|
315
|
+
description: string;
|
|
316
|
+
};
|
|
317
|
+
childrenTotal: {
|
|
318
|
+
type: string;
|
|
319
|
+
description: string;
|
|
320
|
+
};
|
|
321
|
+
contentTruncated: {
|
|
322
|
+
type: string;
|
|
323
|
+
description: string;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
87
327
|
};
|
|
88
328
|
};
|
|
89
329
|
};
|
|
@@ -104,6 +344,19 @@ export declare const READ_NOTE_TOOL: {
|
|
|
104
344
|
type: string;
|
|
105
345
|
description: string;
|
|
106
346
|
};
|
|
347
|
+
includeContent: {
|
|
348
|
+
type: string;
|
|
349
|
+
enum: string[];
|
|
350
|
+
description: string;
|
|
351
|
+
};
|
|
352
|
+
childLimit: {
|
|
353
|
+
type: string;
|
|
354
|
+
description: string;
|
|
355
|
+
};
|
|
356
|
+
maxContentLength: {
|
|
357
|
+
type: string;
|
|
358
|
+
description: string;
|
|
359
|
+
};
|
|
107
360
|
};
|
|
108
361
|
required: string[];
|
|
109
362
|
};
|
|
@@ -118,10 +371,25 @@ export declare const READ_NOTE_TOOL: {
|
|
|
118
371
|
type: string;
|
|
119
372
|
description: string;
|
|
120
373
|
};
|
|
121
|
-
|
|
374
|
+
headline: {
|
|
375
|
+
type: string;
|
|
376
|
+
description: string;
|
|
377
|
+
};
|
|
378
|
+
parentRemId: {
|
|
122
379
|
type: string;
|
|
123
380
|
description: string;
|
|
124
381
|
};
|
|
382
|
+
parentTitle: {
|
|
383
|
+
type: string;
|
|
384
|
+
description: string;
|
|
385
|
+
};
|
|
386
|
+
aliases: {
|
|
387
|
+
type: string;
|
|
388
|
+
items: {
|
|
389
|
+
type: string;
|
|
390
|
+
};
|
|
391
|
+
description: string;
|
|
392
|
+
};
|
|
125
393
|
remType: {
|
|
126
394
|
type: string;
|
|
127
395
|
description: string;
|
|
@@ -134,21 +402,21 @@ export declare const READ_NOTE_TOOL: {
|
|
|
134
402
|
type: string;
|
|
135
403
|
description: string;
|
|
136
404
|
};
|
|
137
|
-
|
|
405
|
+
contentProperties: {
|
|
138
406
|
type: string;
|
|
139
407
|
description: string;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
408
|
+
properties: {
|
|
409
|
+
childrenRendered: {
|
|
410
|
+
type: string;
|
|
411
|
+
description: string;
|
|
412
|
+
};
|
|
413
|
+
childrenTotal: {
|
|
414
|
+
type: string;
|
|
415
|
+
description: string;
|
|
416
|
+
};
|
|
417
|
+
contentTruncated: {
|
|
418
|
+
type: string;
|
|
419
|
+
description: string;
|
|
152
420
|
};
|
|
153
421
|
};
|
|
154
422
|
};
|
package/dist/tools/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
import { CreateNoteSchema } from '../schemas/remnote-schemas.js';
|
|
3
3
|
import { SearchSchema } from '../schemas/remnote-schemas.js';
|
|
4
|
+
import { SearchByTagSchema } from '../schemas/remnote-schemas.js';
|
|
4
5
|
import { ReadNoteSchema } from '../schemas/remnote-schemas.js';
|
|
5
6
|
import { UpdateNoteSchema } from '../schemas/remnote-schemas.js';
|
|
6
7
|
import { AppendJournalSchema } from '../schemas/remnote-schemas.js';
|
|
8
|
+
import { checkVersionCompatibility } from '../version-compat.js';
|
|
7
9
|
export const CREATE_NOTE_TOOL = {
|
|
8
10
|
name: 'remnote_create_note',
|
|
9
11
|
description: 'Create a new note in RemNote with optional content, parent, and tags',
|
|
@@ -20,15 +22,28 @@ export const CREATE_NOTE_TOOL = {
|
|
|
20
22
|
};
|
|
21
23
|
export const SEARCH_TOOL = {
|
|
22
24
|
name: 'remnote_search',
|
|
23
|
-
description: 'Search the RemNote knowledge base. Results are sorted by type: documents first, then concepts, descriptors, portals, and plain text.',
|
|
25
|
+
description: 'Search the RemNote knowledge base. Results are sorted by type: documents first, then concepts, descriptors, portals, and plain text. Use includeContent: "markdown" for indented markdown previews or "structured" for nested child objects with remIds.',
|
|
24
26
|
inputSchema: {
|
|
25
27
|
type: 'object',
|
|
26
28
|
properties: {
|
|
27
29
|
query: { type: 'string', description: 'Search query text' },
|
|
28
30
|
limit: { type: 'number', description: 'Maximum results (1-150, default: 50)' },
|
|
29
31
|
includeContent: {
|
|
30
|
-
type: '
|
|
31
|
-
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['none', 'markdown', 'structured'],
|
|
34
|
+
description: 'Content rendering mode: "none" omits content (default), "markdown" renders child subtree as indented markdown, "structured" returns nested child objects with remIds',
|
|
35
|
+
},
|
|
36
|
+
depth: {
|
|
37
|
+
type: 'number',
|
|
38
|
+
description: 'Depth of child hierarchy to render for markdown/structured content (0-10, default: 1)',
|
|
39
|
+
},
|
|
40
|
+
childLimit: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
description: 'Maximum children per level (1-500, default: 20)',
|
|
43
|
+
},
|
|
44
|
+
maxContentLength: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
description: 'Maximum character length for rendered content (default: 3000)',
|
|
32
47
|
},
|
|
33
48
|
},
|
|
34
49
|
required: ['query'],
|
|
@@ -44,9 +59,22 @@ export const SEARCH_TOOL = {
|
|
|
44
59
|
properties: {
|
|
45
60
|
remId: { type: 'string', description: 'Unique Rem ID' },
|
|
46
61
|
title: { type: 'string', description: 'Rendered title with markdown formatting' },
|
|
47
|
-
|
|
62
|
+
headline: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Display-oriented full line: title + type-aware delimiter + detail (e.g. "Term :: Definition")',
|
|
65
|
+
},
|
|
66
|
+
parentRemId: {
|
|
48
67
|
type: 'string',
|
|
49
|
-
description: '
|
|
68
|
+
description: 'Direct parent Rem ID (omitted for top-level Rems)',
|
|
69
|
+
},
|
|
70
|
+
parentTitle: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Direct parent title/front text (omitted for top-level Rems)',
|
|
73
|
+
},
|
|
74
|
+
aliases: {
|
|
75
|
+
type: 'array',
|
|
76
|
+
items: { type: 'string' },
|
|
77
|
+
description: 'Alternate names for the Rem (omitted if none)',
|
|
50
78
|
},
|
|
51
79
|
remType: {
|
|
52
80
|
type: 'string',
|
|
@@ -58,7 +86,59 @@ export const SEARCH_TOOL = {
|
|
|
58
86
|
},
|
|
59
87
|
content: {
|
|
60
88
|
type: 'string',
|
|
61
|
-
description: '
|
|
89
|
+
description: 'Rendered markdown content of child subtree (only when includeContent="markdown")',
|
|
90
|
+
},
|
|
91
|
+
contentStructured: {
|
|
92
|
+
type: 'array',
|
|
93
|
+
description: 'Structured child subtree with nested remIds and metadata (only when includeContent="structured")',
|
|
94
|
+
items: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
remId: { type: 'string', description: 'Child Rem ID' },
|
|
98
|
+
title: { type: 'string', description: 'Rendered child title' },
|
|
99
|
+
headline: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Display-oriented child line with type-aware delimiter',
|
|
102
|
+
},
|
|
103
|
+
aliases: {
|
|
104
|
+
type: 'array',
|
|
105
|
+
items: { type: 'string' },
|
|
106
|
+
description: 'Alternate names for the child Rem (omitted if none)',
|
|
107
|
+
},
|
|
108
|
+
remType: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'Child Rem classification: document, dailyDocument, concept, descriptor, portal, or text',
|
|
111
|
+
},
|
|
112
|
+
cardDirection: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Child flashcard direction: forward, reverse, or bidirectional (omitted if not a flashcard)',
|
|
115
|
+
},
|
|
116
|
+
children: {
|
|
117
|
+
type: 'array',
|
|
118
|
+
description: 'Nested child nodes (same shape recursively)',
|
|
119
|
+
items: { type: 'object' },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: ['remId', 'title', 'headline', 'remType', 'children'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
contentProperties: {
|
|
126
|
+
type: 'object',
|
|
127
|
+
description: 'Metadata about rendered content',
|
|
128
|
+
properties: {
|
|
129
|
+
childrenRendered: {
|
|
130
|
+
type: 'number',
|
|
131
|
+
description: 'Number of children included in rendered content',
|
|
132
|
+
},
|
|
133
|
+
childrenTotal: {
|
|
134
|
+
type: 'number',
|
|
135
|
+
description: 'Total children in subtree (capped at 2000)',
|
|
136
|
+
},
|
|
137
|
+
contentTruncated: {
|
|
138
|
+
type: 'boolean',
|
|
139
|
+
description: 'Whether content was truncated by maxContentLength',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
62
142
|
},
|
|
63
143
|
},
|
|
64
144
|
},
|
|
@@ -66,14 +146,63 @@ export const SEARCH_TOOL = {
|
|
|
66
146
|
},
|
|
67
147
|
},
|
|
68
148
|
};
|
|
149
|
+
export const SEARCH_BY_TAG_TOOL = {
|
|
150
|
+
name: 'remnote_search_by_tag',
|
|
151
|
+
description: 'Find notes by tag and return resolved ancestor context targets (nearest document/daily document when available, otherwise nearest non-document ancestor). Supports the same includeContent modes as remnote_search.',
|
|
152
|
+
inputSchema: {
|
|
153
|
+
type: 'object',
|
|
154
|
+
properties: {
|
|
155
|
+
tag: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
description: 'Tag name to search (with or without # prefix)',
|
|
158
|
+
},
|
|
159
|
+
limit: { type: 'number', description: 'Maximum results (1-150, default: 50)' },
|
|
160
|
+
includeContent: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
enum: ['none', 'markdown', 'structured'],
|
|
163
|
+
description: 'Content rendering mode: "none" omits content (default), "markdown" renders child subtree as indented markdown, "structured" returns nested child objects with remIds',
|
|
164
|
+
},
|
|
165
|
+
depth: {
|
|
166
|
+
type: 'number',
|
|
167
|
+
description: 'Depth of child hierarchy to render for markdown/structured content (0-10, default: 1)',
|
|
168
|
+
},
|
|
169
|
+
childLimit: {
|
|
170
|
+
type: 'number',
|
|
171
|
+
description: 'Maximum children per level (1-500, default: 20)',
|
|
172
|
+
},
|
|
173
|
+
maxContentLength: {
|
|
174
|
+
type: 'number',
|
|
175
|
+
description: 'Maximum character length for rendered content (default: 3000)',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ['tag'],
|
|
179
|
+
},
|
|
180
|
+
outputSchema: SEARCH_TOOL.outputSchema,
|
|
181
|
+
};
|
|
69
182
|
export const READ_NOTE_TOOL = {
|
|
70
183
|
name: 'remnote_read_note',
|
|
71
|
-
description: 'Read a specific note from RemNote by its Rem ID
|
|
184
|
+
description: 'Read a specific note from RemNote by its Rem ID. Returns metadata and rendered markdown content of the child subtree. Use includeContent: "none" to skip content rendering.',
|
|
72
185
|
inputSchema: {
|
|
73
186
|
type: 'object',
|
|
74
187
|
properties: {
|
|
75
188
|
remId: { type: 'string', description: 'The Rem ID to read' },
|
|
76
|
-
depth: {
|
|
189
|
+
depth: {
|
|
190
|
+
type: 'number',
|
|
191
|
+
description: 'Depth of child hierarchy to render (0-10, default: 5)',
|
|
192
|
+
},
|
|
193
|
+
includeContent: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
enum: ['none', 'markdown'],
|
|
196
|
+
description: 'Content rendering mode: "markdown" renders child subtree (default), "none" omits content',
|
|
197
|
+
},
|
|
198
|
+
childLimit: {
|
|
199
|
+
type: 'number',
|
|
200
|
+
description: 'Maximum children per level (1-500, default: 100)',
|
|
201
|
+
},
|
|
202
|
+
maxContentLength: {
|
|
203
|
+
type: 'number',
|
|
204
|
+
description: 'Maximum character length for rendered content (default: 100000)',
|
|
205
|
+
},
|
|
77
206
|
},
|
|
78
207
|
required: ['remId'],
|
|
79
208
|
},
|
|
@@ -82,9 +211,22 @@ export const READ_NOTE_TOOL = {
|
|
|
82
211
|
properties: {
|
|
83
212
|
remId: { type: 'string', description: 'Unique Rem ID' },
|
|
84
213
|
title: { type: 'string', description: 'Rendered title with markdown formatting' },
|
|
85
|
-
|
|
214
|
+
headline: {
|
|
215
|
+
type: 'string',
|
|
216
|
+
description: 'Display-oriented full line: title + type-aware delimiter + detail (e.g. "Term :: Definition")',
|
|
217
|
+
},
|
|
218
|
+
parentRemId: {
|
|
219
|
+
type: 'string',
|
|
220
|
+
description: 'Direct parent Rem ID (omitted for top-level Rems)',
|
|
221
|
+
},
|
|
222
|
+
parentTitle: {
|
|
86
223
|
type: 'string',
|
|
87
|
-
description: '
|
|
224
|
+
description: 'Direct parent title/front text (omitted for top-level Rems)',
|
|
225
|
+
},
|
|
226
|
+
aliases: {
|
|
227
|
+
type: 'array',
|
|
228
|
+
items: { type: 'string' },
|
|
229
|
+
description: 'Alternate names for the Rem (omitted if none)',
|
|
88
230
|
},
|
|
89
231
|
remType: {
|
|
90
232
|
type: 'string',
|
|
@@ -94,16 +236,25 @@ export const READ_NOTE_TOOL = {
|
|
|
94
236
|
type: 'string',
|
|
95
237
|
description: 'Flashcard direction: forward, reverse, or bidirectional (omitted if not a flashcard)',
|
|
96
238
|
},
|
|
97
|
-
content: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
239
|
+
content: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Rendered markdown content of child subtree (when includeContent="markdown", which is the default)',
|
|
242
|
+
},
|
|
243
|
+
contentProperties: {
|
|
244
|
+
type: 'object',
|
|
245
|
+
description: 'Metadata about rendered content',
|
|
246
|
+
properties: {
|
|
247
|
+
childrenRendered: {
|
|
248
|
+
type: 'number',
|
|
249
|
+
description: 'Number of children included in rendered content',
|
|
250
|
+
},
|
|
251
|
+
childrenTotal: {
|
|
252
|
+
type: 'number',
|
|
253
|
+
description: 'Total children in subtree (capped at 2000)',
|
|
254
|
+
},
|
|
255
|
+
contentTruncated: {
|
|
256
|
+
type: 'boolean',
|
|
257
|
+
description: 'Whether content was truncated by maxContentLength',
|
|
107
258
|
},
|
|
108
259
|
},
|
|
109
260
|
},
|
|
@@ -165,6 +316,11 @@ export function registerAllTools(server, wsServer, logger) {
|
|
|
165
316
|
result = await wsServer.sendRequest('search', args);
|
|
166
317
|
break;
|
|
167
318
|
}
|
|
319
|
+
case 'remnote_search_by_tag': {
|
|
320
|
+
const args = SearchByTagSchema.parse(request.params.arguments);
|
|
321
|
+
result = await wsServer.sendRequest('search_by_tag', args);
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
168
324
|
case 'remnote_read_note': {
|
|
169
325
|
const args = ReadNoteSchema.parse(request.params.arguments);
|
|
170
326
|
result = await wsServer.sendRequest('read_note', args);
|
|
@@ -182,12 +338,27 @@ export function registerAllTools(server, wsServer, logger) {
|
|
|
182
338
|
}
|
|
183
339
|
case 'remnote_status': {
|
|
184
340
|
const connected = wsServer.isConnected();
|
|
341
|
+
const serverVersion = wsServer.getServerVersion();
|
|
342
|
+
const bridgeVersion = wsServer.getBridgeVersion();
|
|
185
343
|
if (!connected) {
|
|
186
|
-
result = { connected: false, message: 'RemNote plugin not connected' };
|
|
344
|
+
result = { connected: false, serverVersion, message: 'RemNote plugin not connected' };
|
|
187
345
|
}
|
|
188
346
|
else {
|
|
189
347
|
const statusResult = await wsServer.sendRequest('get_status', {});
|
|
190
|
-
|
|
348
|
+
const statusObj = typeof statusResult === 'object' && statusResult !== null
|
|
349
|
+
? statusResult
|
|
350
|
+
: {};
|
|
351
|
+
const fallbackBridgeVersion = typeof statusObj.pluginVersion === 'string' ? statusObj.pluginVersion : null;
|
|
352
|
+
const effectiveBridgeVersion = bridgeVersion ?? fallbackBridgeVersion;
|
|
353
|
+
const versionWarning = effectiveBridgeVersion
|
|
354
|
+
? checkVersionCompatibility(serverVersion, effectiveBridgeVersion)
|
|
355
|
+
: null;
|
|
356
|
+
result = {
|
|
357
|
+
connected: true,
|
|
358
|
+
serverVersion,
|
|
359
|
+
...statusObj,
|
|
360
|
+
...(versionWarning ? { version_warning: versionWarning } : {}),
|
|
361
|
+
};
|
|
191
362
|
}
|
|
192
363
|
break;
|
|
193
364
|
}
|
|
@@ -225,6 +396,7 @@ export function registerAllTools(server, wsServer, logger) {
|
|
|
225
396
|
tools: [
|
|
226
397
|
CREATE_NOTE_TOOL,
|
|
227
398
|
SEARCH_TOOL,
|
|
399
|
+
SEARCH_BY_TAG_TOOL,
|
|
228
400
|
READ_NOTE_TOOL,
|
|
229
401
|
UPDATE_NOTE_TOOL,
|
|
230
402
|
APPEND_JOURNAL_TOOL,
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGpE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,sEAAsE;IACnF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC/D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;YACxF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE;YAC1D,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE;SACjF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,sIAAsI;IACxI,WAAW,EAAE;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AAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACzE;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,8BAA8B;IAC9B,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QAC1D,UAAU,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAE5C,OAAO;YACL,KAAK,EAAE;gBACL,gBAAgB;gBAChB,WAAW;gBACX,kBAAkB;gBAClB,cAAc;gBACd,gBAAgB;gBAChB,mBAAmB;gBACnB,WAAW;aACZ;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/types/bridge.d.ts
CHANGED
|
@@ -14,6 +14,13 @@ export interface BridgeResponse {
|
|
|
14
14
|
result?: unknown;
|
|
15
15
|
error?: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Sent by the bridge plugin on connect to identify its version.
|
|
19
|
+
*/
|
|
20
|
+
export interface HelloMessage {
|
|
21
|
+
type: 'hello';
|
|
22
|
+
version: string;
|
|
23
|
+
}
|
|
17
24
|
/**
|
|
18
25
|
* Heartbeat messages
|
|
19
26
|
*/
|
|
@@ -23,4 +30,4 @@ export interface HeartbeatPing {
|
|
|
23
30
|
export interface HeartbeatPong {
|
|
24
31
|
type: 'pong';
|
|
25
32
|
}
|
|
26
|
-
export type BridgeMessage = BridgeRequest | BridgeResponse | HeartbeatPing | HeartbeatPong;
|
|
33
|
+
export type BridgeMessage = BridgeRequest | BridgeResponse | HelloMessage | HeartbeatPing | HeartbeatPong;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version compatibility check for 0.x semver.
|
|
3
|
+
*
|
|
4
|
+
* During 0.x development, minor version bumps may contain breaking changes.
|
|
5
|
+
* Compatible iff major.minor match (patch differences are OK).
|
|
6
|
+
*/
|
|
7
|
+
export declare function checkVersionCompatibility(localVersion: string, bridgeVersion: string): string | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version compatibility check for 0.x semver.
|
|
3
|
+
*
|
|
4
|
+
* During 0.x development, minor version bumps may contain breaking changes.
|
|
5
|
+
* Compatible iff major.minor match (patch differences are OK).
|
|
6
|
+
*/
|
|
7
|
+
export function checkVersionCompatibility(localVersion, bridgeVersion) {
|
|
8
|
+
const local = parseVersion(localVersion);
|
|
9
|
+
const bridge = parseVersion(bridgeVersion);
|
|
10
|
+
if (!local || !bridge) {
|
|
11
|
+
return `Cannot parse versions: local=${localVersion}, bridge=${bridgeVersion}`;
|
|
12
|
+
}
|
|
13
|
+
if (local.major !== bridge.major || local.minor !== bridge.minor) {
|
|
14
|
+
return `Version mismatch: server v${localVersion} ↔ bridge v${bridgeVersion}. Minor version must match during 0.x development. See compatibility guide.`;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function parseVersion(version) {
|
|
19
|
+
const match = version.match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
20
|
+
if (!match)
|
|
21
|
+
return null;
|
|
22
|
+
return {
|
|
23
|
+
major: parseInt(match[1], 10),
|
|
24
|
+
minor: parseInt(match[2], 10),
|
|
25
|
+
patch: parseInt(match[3], 10),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=version-compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-compat.js","sourceRoot":"","sources":["../src/version-compat.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,YAAoB,EACpB,aAAqB;IAErB,MAAM,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IAE3C,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;QACtB,OAAO,gCAAgC,YAAY,YAAY,aAAa,EAAE,CAAC;IACjF,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC;QACjE,OAAO,6BAA6B,YAAY,cAAc,aAAa,6EAA6E,CAAC;IAC3J,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,OAAe;IACnC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -7,14 +7,18 @@ export declare class WebSocketServer {
|
|
|
7
7
|
private logger;
|
|
8
8
|
private requestLogger;
|
|
9
9
|
private responseLogger;
|
|
10
|
+
private serverVersion;
|
|
11
|
+
private bridgeVersion;
|
|
10
12
|
private pendingRequests;
|
|
11
13
|
private connectCallbacks;
|
|
12
14
|
private disconnectCallbacks;
|
|
13
|
-
constructor(port: number, host: string, logger: Logger, requestLogger?: Logger, responseLogger?: Logger);
|
|
15
|
+
constructor(port: number, host: string, logger: Logger, serverVersion: string, requestLogger?: Logger, responseLogger?: Logger);
|
|
14
16
|
start(): Promise<void>;
|
|
15
17
|
stop(): Promise<void>;
|
|
16
18
|
sendRequest(action: string, payload: Record<string, unknown>): Promise<unknown>;
|
|
17
19
|
isConnected(): boolean;
|
|
20
|
+
getBridgeVersion(): string | null;
|
|
21
|
+
getServerVersion(): string;
|
|
18
22
|
onClientConnect(callback: () => void): void;
|
|
19
23
|
onClientDisconnect(callback: () => void): void;
|
|
20
24
|
private handleMessage;
|
package/dist/websocket-server.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WebSocketServer as WSServer, WebSocket } from 'ws';
|
|
2
2
|
import { randomUUID } from 'crypto';
|
|
3
|
+
import { checkVersionCompatibility } from './version-compat.js';
|
|
3
4
|
export class WebSocketServer {
|
|
4
5
|
wss = null;
|
|
5
6
|
client = null;
|
|
@@ -8,13 +9,16 @@ export class WebSocketServer {
|
|
|
8
9
|
logger;
|
|
9
10
|
requestLogger = null;
|
|
10
11
|
responseLogger = null;
|
|
12
|
+
serverVersion;
|
|
13
|
+
bridgeVersion = null;
|
|
11
14
|
pendingRequests = new Map();
|
|
12
15
|
connectCallbacks = [];
|
|
13
16
|
disconnectCallbacks = [];
|
|
14
|
-
constructor(port, host, logger, requestLogger, responseLogger) {
|
|
17
|
+
constructor(port, host, logger, serverVersion, requestLogger, responseLogger) {
|
|
15
18
|
this.port = port;
|
|
16
19
|
this.host = host;
|
|
17
20
|
this.logger = logger.child({ context: 'websocket-server' });
|
|
21
|
+
this.serverVersion = serverVersion;
|
|
18
22
|
this.requestLogger = requestLogger || null;
|
|
19
23
|
this.responseLogger = responseLogger || null;
|
|
20
24
|
}
|
|
@@ -49,6 +53,7 @@ export class WebSocketServer {
|
|
|
49
53
|
ws.on('close', () => {
|
|
50
54
|
this.logger.info('WebSocket client disconnected');
|
|
51
55
|
this.client = null;
|
|
56
|
+
this.bridgeVersion = null;
|
|
52
57
|
// Reject all pending requests
|
|
53
58
|
for (const [_id, pending] of this.pendingRequests.entries()) {
|
|
54
59
|
clearTimeout(pending.timeout);
|
|
@@ -138,6 +143,12 @@ export class WebSocketServer {
|
|
|
138
143
|
isConnected() {
|
|
139
144
|
return this.client !== null && this.client.readyState === WebSocket.OPEN;
|
|
140
145
|
}
|
|
146
|
+
getBridgeVersion() {
|
|
147
|
+
return this.bridgeVersion;
|
|
148
|
+
}
|
|
149
|
+
getServerVersion() {
|
|
150
|
+
return this.serverVersion;
|
|
151
|
+
}
|
|
141
152
|
onClientConnect(callback) {
|
|
142
153
|
this.connectCallbacks.push(callback);
|
|
143
154
|
}
|
|
@@ -150,6 +161,16 @@ export class WebSocketServer {
|
|
|
150
161
|
this.logger.debug({
|
|
151
162
|
type: 'type' in message ? message.type : 'response',
|
|
152
163
|
}, 'Received message');
|
|
164
|
+
// Handle hello from bridge plugin
|
|
165
|
+
if ('type' in message && message.type === 'hello') {
|
|
166
|
+
this.bridgeVersion = message.version;
|
|
167
|
+
this.logger.info({ bridgeVersion: message.version }, 'Bridge identified');
|
|
168
|
+
const warning = checkVersionCompatibility(this.serverVersion, message.version);
|
|
169
|
+
if (warning) {
|
|
170
|
+
this.logger.warn({ warning }, 'Bridge version compatibility warning');
|
|
171
|
+
}
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
153
174
|
// Handle pong response to ping
|
|
154
175
|
if ('type' in message && message.type === 'pong') {
|
|
155
176
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-server.js","sourceRoot":"","sources":["../src/websocket-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"websocket-server.js","sourceRoot":"","sources":["../src/websocket-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,MAAM,OAAO,eAAe;IAClB,GAAG,GAAoB,IAAI,CAAC;IAC5B,MAAM,GAAqB,IAAI,CAAC;IAChC,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