rote-toolkit 0.3.0 → 0.3.1

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 CHANGED
@@ -25,6 +25,7 @@ rote config
25
25
  ```
26
26
 
27
27
  系统会提示你输入:
28
+
28
29
  1. **Rote API URL**:例如 `https://your-rote-domain.com`
29
30
  2. **OpenKey**:你的 API 密钥
30
31
 
@@ -38,18 +39,26 @@ rote config
38
39
  rote add "今天学到了 MCP 协议,非常有趣!"
39
40
  ```
40
41
 
41
- 附带标签:
42
+ 附带标签、设为公开并置顶:
42
43
 
43
44
  ```bash
44
- rote add "实现了一个新的前端组件" -t "代码,前端,React"
45
+ rote add "实现了一个新的前端组件" -t "代码,前端,React" --public --pin
45
46
  ```
46
47
 
47
- ### 2) 搜索笔记
48
+ ### 2) 搜索和获取笔记
49
+
50
+ 搜索包含 "MCP" 的笔记:
48
51
 
49
52
  ```bash
50
53
  rote search "MCP"
51
54
  ```
52
55
 
56
+ 获取最近的笔记(支持过滤归档和标签):
57
+
58
+ ```bash
59
+ rote list --limit 5 --archived -t "知识管理"
60
+ ```
61
+
53
62
  ## MCP 模式使用指南
54
63
 
55
64
  启动 MCP Server:
@@ -71,11 +80,7 @@ rote-mcp
71
80
  "mcpServers": {
72
81
  "rote-toolkit": {
73
82
  "command": "npx",
74
- "args": [
75
- "-y",
76
- "rote-toolkit",
77
- "mcp"
78
- ]
83
+ "args": ["-y", "rote-toolkit", "mcp"]
79
84
  }
80
85
  }
81
86
  }
@@ -88,7 +93,9 @@ rote-mcp
88
93
  - `rote_list_notes`
89
94
 
90
95
  ## 本地开发
96
+
91
97
  [text](../../../Downloads/API-KEY-GUIDE.md)
98
+
92
99
  ```bash
93
100
  npm install
94
101
  npm run build
@@ -117,6 +124,7 @@ npm run release:major
117
124
  ```
118
125
 
119
126
  发布脚本会执行:
127
+
120
128
  1. 检查 git 工作区是否干净
121
129
  2. 检查 npm 登录状态
122
130
  3. `npm run build`
package/dist/api.js CHANGED
@@ -16,8 +16,7 @@ export class RoteClient {
16
16
  content: input.content,
17
17
  title: input.title ?? "",
18
18
  tags: input.tags ?? [],
19
- state: input.state ?? "private",
20
- type: input.type ?? "rote",
19
+ state: input.isPublic ? "public" : "private",
21
20
  pin: input.pin ?? false,
22
21
  ...(input.articleId ? { articleId: input.articleId } : {}),
23
22
  };
package/dist/cli.js CHANGED
@@ -30,8 +30,7 @@ program
30
30
  .argument("<content>", "note content")
31
31
  .option("-t, --tags <tags>", "comma-separated tags")
32
32
  .option("--title <title>", "title")
33
- .option("--state <state>", "note state", "private")
34
- .option("--type <type>", "note type", "rote")
33
+ .option("--public", "publish as public note")
35
34
  .option("--pin", "pin the note")
36
35
  .option("--article-id <articleId>", "bind to an existing article")
37
36
  .action(async (content, options) => {
@@ -41,8 +40,7 @@ program
41
40
  content,
42
41
  tags,
43
42
  title: options.title,
44
- state: options.state,
45
- type: options.type,
43
+ isPublic: options.public,
46
44
  pin: options.pin,
47
45
  articleId: options.articleId,
48
46
  });
@@ -89,6 +87,8 @@ program
89
87
  .argument("<action>", "action to perform (get|update)")
90
88
  .option("--nickname <nickname>", "new nickname")
91
89
  .option("--description <description>", "new description")
90
+ .option("--avatar <url>", "new avatar URL")
91
+ .option("--cover <url>", "new cover URL")
92
92
  .option("--username <username>", "new username")
93
93
  .action(async (action, options) => {
94
94
  const client = new RoteClient();
@@ -100,6 +100,8 @@ program
100
100
  const profile = await client.updateProfile({
101
101
  nickname: options.nickname,
102
102
  description: options.description,
103
+ avatar: options.avatar,
104
+ cover: options.cover,
103
105
  username: options.username,
104
106
  });
105
107
  console.log(`Updated profile for: ${profile.username}`);
package/dist/mcp.js CHANGED
@@ -15,21 +15,19 @@ export async function startMcpServer() {
15
15
  content: z.string().min(1).describe("Note content"),
16
16
  title: z.string().optional().describe("Optional note title"),
17
17
  tags: z.array(z.string()).optional().describe("Optional list of tags"),
18
- state: z.string().optional().describe("Note state, default private"),
19
- type: z.string().optional().describe("Note type, default rote"),
18
+ isPublic: z.boolean().optional().describe("Publish as public note"),
20
19
  pin: z.boolean().optional().describe("Whether to pin the note"),
21
20
  articleId: z
22
21
  .string()
23
22
  .optional()
24
23
  .describe("Optional article ID to bind to"),
25
24
  },
26
- }, async ({ content, title, tags, state, type, pin, articleId }) => {
25
+ }, async ({ content, title, tags, isPublic, pin, articleId }) => {
27
26
  const note = await client.createNote({
28
27
  content,
29
28
  title,
30
29
  tags,
31
- state,
32
- type,
30
+ isPublic,
33
31
  pin,
34
32
  articleId,
35
33
  });
package/dist/types.d.ts CHANGED
@@ -8,7 +8,6 @@ export interface RoteNote {
8
8
  title?: string;
9
9
  tags?: string[];
10
10
  state?: string;
11
- type?: string;
12
11
  createdAt?: string;
13
12
  updatedAt?: string;
14
13
  }
@@ -21,8 +20,7 @@ export interface CreateNoteInput {
21
20
  content: string;
22
21
  title?: string;
23
22
  tags?: string[];
24
- state?: string;
25
- type?: string;
23
+ isPublic?: boolean;
26
24
  pin?: boolean;
27
25
  articleId?: string;
28
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rote-toolkit",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI and MCP toolkit for Rote OpenKey API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",