remnote-bridge 0.1.11 → 0.1.13
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/dist/cli/addon/addon-manager.js +163 -0
- package/dist/cli/addon/registry.js +24 -0
- package/dist/cli/commands/addon.js +149 -0
- package/dist/cli/commands/clean.js +121 -52
- package/dist/cli/commands/connect.js +72 -33
- package/dist/cli/commands/disconnect.js +19 -19
- package/dist/cli/commands/edit-rem.js +8 -36
- package/dist/cli/commands/edit-tree.js +3 -20
- package/dist/cli/commands/health.js +19 -18
- package/dist/cli/commands/read-context.js +3 -20
- package/dist/cli/commands/read-globe.js +3 -20
- package/dist/cli/commands/read-rem.js +6 -32
- package/dist/cli/commands/read-tree.js +3 -20
- package/dist/cli/commands/search.js +97 -21
- package/dist/cli/config.js +148 -72
- package/dist/cli/daemon/daemon.js +104 -24
- package/dist/cli/daemon/dev-server.js +9 -1
- package/dist/cli/daemon/pid.js +36 -22
- package/dist/cli/daemon/registry.js +160 -0
- package/dist/cli/daemon/send-request.js +11 -11
- package/dist/cli/daemon/static-server.js +97 -34
- package/dist/cli/handlers/edit-handler.js +49 -140
- package/dist/cli/handlers/read-handler.js +9 -9
- package/dist/cli/handlers/rem-cache.js +10 -5
- package/dist/cli/handlers/tree-parser.js +16 -9
- package/dist/cli/main.js +67 -19
- package/dist/cli/protocol.js +18 -4
- package/dist/cli/server/config-server.js +280 -14
- package/dist/cli/server/ws-server.js +93 -44
- package/dist/cli/utils/output.js +29 -0
- package/dist/mcp/format.js +43 -0
- package/dist/mcp/index.js +0 -55
- package/dist/mcp/instructions.js +424 -216
- package/dist/mcp/resources/edit-rem-guide.js +37 -158
- package/dist/mcp/resources/edit-tree-guide.js +1 -1
- package/dist/mcp/resources/error-reference.js +9 -13
- package/dist/mcp/resources/rem-object-fields.js +6 -6
- package/dist/mcp/tools/edit-tools.js +69 -8
- package/dist/mcp/tools/infra-tools.js +44 -8
- package/dist/mcp/tools/read-tools.js +136 -20
- package/package.json +2 -2
- package/remnote-plugin/dist/bridge_widget-sandbox.js +17 -17
- package/remnote-plugin/dist/bridge_widget.js +17 -17
- package/remnote-plugin/dist/index-sandbox.js +31 -31
- package/remnote-plugin/dist/index.js +31 -31
- package/remnote-plugin/dist/manifest.json +1 -1
- package/remnote-plugin/package.json +1 -1
- package/remnote-plugin/public/manifest.json +1 -1
- package/remnote-plugin/src/bridge/multi-connection-manager.ts +151 -0
- package/remnote-plugin/src/bridge/websocket-client.ts +62 -16
- package/remnote-plugin/src/services/index.ts +0 -8
- package/remnote-plugin/src/services/read-rem.ts +1 -9
- package/remnote-plugin/src/services/search.ts +13 -10
- package/remnote-plugin/src/settings.ts +9 -7
- package/remnote-plugin/src/utils/index.ts +0 -5
- package/remnote-plugin/src/widgets/bridge_widget.tsx +105 -20
- package/remnote-plugin/src/widgets/index.tsx +41 -44
- package/remnote-plugin/webpack.config.js +35 -0
- package/skills/remnote-bridge/SKILL.md +45 -40
- package/skills/remnote-bridge/instructions/addon.md +134 -0
- package/skills/remnote-bridge/instructions/clean.md +110 -0
- package/skills/remnote-bridge/instructions/connect.md +80 -37
- package/skills/remnote-bridge/instructions/disconnect.md +22 -9
- package/skills/remnote-bridge/instructions/edit-rem.md +113 -327
- package/skills/remnote-bridge/instructions/health.md +23 -13
- package/skills/remnote-bridge/instructions/install-skill.md +58 -0
- package/skills/remnote-bridge/instructions/overall.md +99 -35
- package/skills/remnote-bridge/instructions/read-rem.md +15 -15
- package/skills/remnote-bridge/instructions/search.md +77 -18
- package/skills/remnote-bridge/instructions/setup.md +5 -6
package/dist/mcp/index.js
CHANGED
|
@@ -9,12 +9,6 @@ import { SERVER_INSTRUCTIONS } from './instructions.js';
|
|
|
9
9
|
import { registerReadTools } from './tools/read-tools.js';
|
|
10
10
|
import { registerEditTools } from './tools/edit-tools.js';
|
|
11
11
|
import { registerInfraTools } from './tools/infra-tools.js';
|
|
12
|
-
import { OUTLINE_FORMAT_CONTENT } from './resources/outline-format.js';
|
|
13
|
-
import { REM_OBJECT_FIELDS_CONTENT } from './resources/rem-object-fields.js';
|
|
14
|
-
import { EDIT_REM_GUIDE_CONTENT } from './resources/edit-rem-guide.js';
|
|
15
|
-
import { EDIT_TREE_GUIDE_CONTENT } from './resources/edit-tree-guide.js';
|
|
16
|
-
import { ERROR_REFERENCE_CONTENT } from './resources/error-reference.js';
|
|
17
|
-
import { SEPARATOR_FLASHCARD_CONTENT } from './resources/separator-flashcard.js';
|
|
18
12
|
export async function startMcpServer() {
|
|
19
13
|
const server = new FastMCP({
|
|
20
14
|
name: 'remnote-bridge',
|
|
@@ -24,54 +18,5 @@ export async function startMcpServer() {
|
|
|
24
18
|
registerInfraTools(server);
|
|
25
19
|
registerReadTools(server);
|
|
26
20
|
registerEditTools(server);
|
|
27
|
-
// Resources
|
|
28
|
-
server.addResource({
|
|
29
|
-
uri: 'remnote://outline-format',
|
|
30
|
-
name: 'Markdown 大纲格式规范',
|
|
31
|
-
mimeType: 'text/markdown',
|
|
32
|
-
async load() {
|
|
33
|
-
return { text: OUTLINE_FORMAT_CONTENT };
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
server.addResource({
|
|
37
|
-
uri: 'remnote://rem-object-fields',
|
|
38
|
-
name: 'RemObject 字段完整参考',
|
|
39
|
-
mimeType: 'text/markdown',
|
|
40
|
-
async load() {
|
|
41
|
-
return { text: REM_OBJECT_FIELDS_CONTENT };
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
server.addResource({
|
|
45
|
-
uri: 'remnote://edit-rem-guide',
|
|
46
|
-
name: 'edit_rem 操作指南',
|
|
47
|
-
mimeType: 'text/markdown',
|
|
48
|
-
async load() {
|
|
49
|
-
return { text: EDIT_REM_GUIDE_CONTENT };
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
server.addResource({
|
|
53
|
-
uri: 'remnote://edit-tree-guide',
|
|
54
|
-
name: 'edit_tree 操作指南',
|
|
55
|
-
mimeType: 'text/markdown',
|
|
56
|
-
async load() {
|
|
57
|
-
return { text: EDIT_TREE_GUIDE_CONTENT };
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
server.addResource({
|
|
61
|
-
uri: 'remnote://error-reference',
|
|
62
|
-
name: '错误诊断与恢复参考',
|
|
63
|
-
mimeType: 'text/markdown',
|
|
64
|
-
async load() {
|
|
65
|
-
return { text: ERROR_REFERENCE_CONTENT };
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
server.addResource({
|
|
69
|
-
uri: 'remnote://separator-flashcard',
|
|
70
|
-
name: '分隔符与闪卡参考',
|
|
71
|
-
mimeType: 'text/markdown',
|
|
72
|
-
async load() {
|
|
73
|
-
return { text: SEPARATOR_FLASHCARD_CONTENT };
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
21
|
await server.start({ transportType: 'stdio' });
|
|
77
22
|
}
|