@lih-x-x/kmr 1.0.30 → 1.0.32
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 +3 -3
- package/dist/cli.js +31 -3
- package/dist/index.js +40 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **飞书任务创建**:提取待办后自动发送确认消息,回复 `/confirm` 创建飞书任务,`/reject` 取消,3 分钟超时自动取消。自动通过群成员列表解析负责人并指派任务
|
|
9
9
|
- **AI 对话**:发送非指令文本即可与 AI 自由对话,基于 acpx 持久化 session,按用户隔离,支持 claude 和 codex 两种 agent
|
|
10
10
|
- **历史会议查询**:通过 `/find` 指令用自然语言搜索历史会议记录
|
|
11
|
-
- **记录管理**:`/
|
|
11
|
+
- **记录管理**:`/list` 列出所有记录,`/show <id>` 查看详情,`/del <id>` 删除记录
|
|
12
12
|
- **群聊智能识别**:群聊中非 @消息自动识别会议纪要文档链接(通过文档标题判断),@机器人可使用所有指令和 AI 对话
|
|
13
13
|
- **本地持久化**:所有数据以 JSON 文件存储在 `~/.kmr/` 目录下,支持 grep 检索
|
|
14
14
|
- **Web 管理界面**:服务启动时自动打开浏览器,查看会议记录、AI 会话、管理配置
|
|
@@ -129,7 +129,7 @@ https://xxx.feishu.cn/docx/abc123
|
|
|
129
129
|
### 管理会议记录
|
|
130
130
|
|
|
131
131
|
```
|
|
132
|
-
/
|
|
132
|
+
/list # 列出所有记录(ID + 标题 + 链接)
|
|
133
133
|
展示所有记录 # 自然语言同样支持
|
|
134
134
|
|
|
135
135
|
/show meeting_1714380000 # 查看某条记录的完整详情
|
|
@@ -174,7 +174,7 @@ https://xxx.feishu.cn/docx/abc123
|
|
|
174
174
|
**@机器人**:可使用所有指令和 AI 对话,与私聊体验一致。
|
|
175
175
|
|
|
176
176
|
```
|
|
177
|
-
@KMR /
|
|
177
|
+
@KMR /list
|
|
178
178
|
@KMR /find 技术方案评审
|
|
179
179
|
@KMR https://xxx.feishu.cn/docx/abc123
|
|
180
180
|
```
|
package/dist/cli.js
CHANGED
|
@@ -6,9 +6,9 @@ async function checkUpdate() {
|
|
|
6
6
|
try {
|
|
7
7
|
const res = await fetch(`https://registry.npmjs.org/${"@lih-x-x/kmr"}/latest`, { signal: AbortSignal.timeout(3e3) });
|
|
8
8
|
const data = await res.json();
|
|
9
|
-
if (data.version && data.version !== "1.0.
|
|
9
|
+
if (data.version && data.version !== "1.0.32") {
|
|
10
10
|
console.log(`
|
|
11
|
-
\u2B06\uFE0F \u65B0\u7248\u672C\u53EF\u7528: ${"1.0.
|
|
11
|
+
\u2B06\uFE0F \u65B0\u7248\u672C\u53EF\u7528: ${"1.0.32"} \u2192 ${data.version}`);
|
|
12
12
|
console.log(` \u8FD0\u884C npm install -g ${"@lih-x-x/kmr"} \u66F4\u65B0
|
|
13
13
|
`);
|
|
14
14
|
}
|
|
@@ -49,12 +49,13 @@ KMR\uFF08Key Meetings Record\uFF09\u2014 \u4F1A\u8BAE\u6316\u6398\u673A
|
|
|
49
49
|
kmr \u542F\u52A8\u670D\u52A1\uFF08\u98DE\u4E66\u673A\u5668\u4EBA + Web \u7BA1\u7406\u754C\u9762\uFF09
|
|
50
50
|
kmr list \u5217\u51FA\u6240\u6709\u4F1A\u8BAE\u8BB0\u5F55
|
|
51
51
|
kmr show <id> \u67E5\u770B\u8BB0\u5F55\u8BE6\u60C5
|
|
52
|
+
kmr task \u67E5\u770B\u6240\u6709\u4EFB\u52A1
|
|
52
53
|
kmr del <id> \u5220\u9664\u8BB0\u5F55
|
|
53
54
|
kmr find <q> \u641C\u7D22\u4F1A\u8BAE\u8BB0\u5F55
|
|
54
55
|
kmr --help \u663E\u793A\u5E2E\u52A9
|
|
55
56
|
`);
|
|
56
57
|
} else if (command === "--version" || command === "-v") {
|
|
57
|
-
console.log("1.0.
|
|
58
|
+
console.log("1.0.32");
|
|
58
59
|
} else if (command === "list") {
|
|
59
60
|
const { loadConfig } = await import("./config-L2SVVMAR.js");
|
|
60
61
|
const { JsonStore } = await import("./jsonStore-AL73KEUG.js");
|
|
@@ -95,6 +96,32 @@ KMR\uFF08Key Meetings Record\uFF09\u2014 \u4F1A\u8BAE\u6316\u6398\u673A
|
|
|
95
96
|
process.exit(1);
|
|
96
97
|
}
|
|
97
98
|
console.log(JSON.stringify(record, null, 2));
|
|
99
|
+
} else if (command === "task") {
|
|
100
|
+
const { loadConfig } = await import("./config-L2SVVMAR.js");
|
|
101
|
+
const { JsonStore } = await import("./jsonStore-AL73KEUG.js");
|
|
102
|
+
const { createLarkClient } = await import("./client-CKWRSYEN.js");
|
|
103
|
+
const { TaskCreator } = await import("./taskCreator-QVSOLXXU.js");
|
|
104
|
+
const { syncTaskStatuses } = await import("./sync-E4SW7QFZ.js");
|
|
105
|
+
const config = loadConfig();
|
|
106
|
+
const store = new JsonStore(config.storage.dataDir);
|
|
107
|
+
const client = createLarkClient(config);
|
|
108
|
+
const taskCreator = new TaskCreator(client);
|
|
109
|
+
await syncTaskStatuses(store, taskCreator);
|
|
110
|
+
const meetings = await store.list();
|
|
111
|
+
let count = 0;
|
|
112
|
+
for (const m of meetings) {
|
|
113
|
+
if (!m.createdTasks) continue;
|
|
114
|
+
for (const t of m.createdTasks) {
|
|
115
|
+
const icon = t.status === "completed" ? "\u2705" : "\u23F3";
|
|
116
|
+
console.log(`${icon} ${t.summary}`);
|
|
117
|
+
console.log(` \u6765\u6E90\uFF1A${m.summary.title}`);
|
|
118
|
+
console.log(` \u521B\u5EFA\uFF1A${t.createdAt}${t.completedAt ? " | \u5B8C\u6210\uFF1A" + t.completedAt : ""}`);
|
|
119
|
+
if (t.url) console.log(` ${t.url}`);
|
|
120
|
+
console.log("");
|
|
121
|
+
count++;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (count === 0) console.log("\u6682\u65E0\u5DF2\u521B\u5EFA\u7684\u4EFB\u52A1\u3002");
|
|
98
125
|
} else if (command === "del") {
|
|
99
126
|
const id = argv[3];
|
|
100
127
|
if (!id) {
|
|
@@ -140,6 +167,7 @@ KMR\uFF08Key Meetings Record\uFF09\u2014 \u4F1A\u8BAE\u6316\u6398\u673A
|
|
|
140
167
|
\u53EF\u7528\u547D\u4EE4:
|
|
141
168
|
kmr list \u5217\u51FA\u6240\u6709\u4F1A\u8BAE\u8BB0\u5F55
|
|
142
169
|
kmr show <id> \u67E5\u770B\u8BB0\u5F55\u8BE6\u60C5
|
|
170
|
+
kmr task \u67E5\u770B\u6240\u6709\u4EFB\u52A1
|
|
143
171
|
kmr del <id> \u5220\u9664\u8BB0\u5F55
|
|
144
172
|
kmr find <q> \u641C\u7D22\u4F1A\u8BAE\u8BB0\u5F55
|
|
145
173
|
kmr --help \u663E\u793A\u5B8C\u6574\u5E2E\u52A9
|
package/dist/index.js
CHANGED
|
@@ -304,9 +304,12 @@ function parseMessage(text) {
|
|
|
304
304
|
raw: text
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
if (/^\/listall$/i.test(trimmed) || /^(展示|列出|显示|查看)(所有|全部|历史)(记录|会议)/.test(trimmed)) {
|
|
307
|
+
if (/^\/(?:list|listall)$/i.test(trimmed) || /^(展示|列出|显示|查看)(所有|全部|历史)(记录|会议)/.test(trimmed)) {
|
|
308
308
|
return { type: "list_all" /* LIST_ALL */, raw: text };
|
|
309
309
|
}
|
|
310
|
+
if (/^\/task$/i.test(trimmed) || /^(展示|列出|显示|查看)(所有|全部)?(任务|待办)/.test(trimmed)) {
|
|
311
|
+
return { type: "list_tasks" /* LIST_TASKS */, raw: text };
|
|
312
|
+
}
|
|
310
313
|
const findMatch = text.match(/^\/find\s+(.+)/);
|
|
311
314
|
if (findMatch) {
|
|
312
315
|
return {
|
|
@@ -559,7 +562,7 @@ var SESSION_SKILL = `\u4F60\u662F KMR\uFF08Key Meetings Record\uFF09\u7684\u667A
|
|
|
559
562
|
- \u6BCF\u4E2A JSON \u6587\u4EF6\u5305\u542B\uFF1Asummary\uFF08\u6807\u9898/\u65E5\u671F/\u53C2\u4E0E\u4EBA/\u8981\u70B9\uFF09\u3001todos\u3001risks\u3001commitments\u3001reusableInsights\u3001rawContent
|
|
560
563
|
- \u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u547D\u4EE4\u67E5\u8BE2\u4F1A\u8BAE\u6570\u636E\uFF1Akmr list\uFF08\u5217\u51FA\u5168\u90E8\uFF09\u3001kmr show <id>\uFF08\u67E5\u770B\u8BE6\u60C5\uFF09\u3001kmr find <query>\uFF08\u641C\u7D22\uFF09
|
|
561
564
|
- \u5F53\u7528\u6237\u95EE\u5230\u4F1A\u8BAE/\u4EFB\u52A1\u76F8\u5173\u7684\u95EE\u9898\u65F6\uFF0C\u76F4\u63A5\u6267\u884C kmr \u547D\u4EE4\u83B7\u53D6\u6570\u636E\u5E76\u56DE\u7B54
|
|
562
|
-
- \u63D0\u793A\u7528\u6237\u5728\u98DE\u4E66\u5BF9\u8BDD\u4E2D\u53EF\u4EE5\u4F7F\u7528\uFF1A/find \u641C\u7D22\u3001/
|
|
565
|
+
- \u63D0\u793A\u7528\u6237\u5728\u98DE\u4E66\u5BF9\u8BDD\u4E2D\u53EF\u4EE5\u4F7F\u7528\uFF1A/find \u641C\u7D22\u3001/list \u5217\u51FA\u5168\u90E8\u3001/show <id> \u67E5\u770B\u8BE6\u60C5\u3001/del <id> \u5220\u9664; \u6216\u8005\u5728\u7EC8\u7AEF\u4F7F\u7528\u4E0A\u8FF0kmr\u547D\u4EE4\u8FDB\u884C\u64CD\u4F5C
|
|
563
566
|
|
|
564
567
|
\u5BF9\u8BDD\u8981\u6C42\uFF1A
|
|
565
568
|
- \u7B80\u6D01\u3001\u4E13\u4E1A\u3001\u6709\u5E2E\u52A9
|
|
@@ -847,6 +850,41 @@ async function main() {
|
|
|
847
850
|
console.log(`[reply] \u5DF2\u53D1\u9001\u8BB0\u5F55\u5217\u8868`);
|
|
848
851
|
break;
|
|
849
852
|
}
|
|
853
|
+
case "list_tasks" /* LIST_TASKS */: {
|
|
854
|
+
console.log(`[process] \u5217\u51FA\u6240\u6709\u4EFB\u52A1`);
|
|
855
|
+
await syncTaskStatuses(store, taskCreator);
|
|
856
|
+
const meetings = await store.list();
|
|
857
|
+
const tasks = [];
|
|
858
|
+
for (const m of meetings) {
|
|
859
|
+
if (!m.createdTasks) continue;
|
|
860
|
+
for (const t of m.createdTasks) {
|
|
861
|
+
tasks.push({
|
|
862
|
+
summary: t.summary,
|
|
863
|
+
status: t.status || "open",
|
|
864
|
+
url: t.url,
|
|
865
|
+
createdAt: t.createdAt,
|
|
866
|
+
completedAt: t.completedAt,
|
|
867
|
+
meetingTitle: m.summary.title
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
if (tasks.length === 0) {
|
|
872
|
+
await messenger.replyText(messageId, "\u6682\u65E0\u5DF2\u521B\u5EFA\u7684\u4EFB\u52A1\u3002");
|
|
873
|
+
} else {
|
|
874
|
+
const lines = [`\u{1F4CB} \u5171 ${tasks.length} \u6761\u4EFB\u52A1\uFF1A`, ""];
|
|
875
|
+
for (const t of tasks) {
|
|
876
|
+
const icon = t.status === "completed" ? "\u2705" : "\u23F3";
|
|
877
|
+
lines.push(`${icon} ${t.summary}`);
|
|
878
|
+
lines.push(` \u6765\u6E90\uFF1A${t.meetingTitle}`);
|
|
879
|
+
lines.push(` \u521B\u5EFA\uFF1A${t.createdAt}${t.completedAt ? " | \u5B8C\u6210\uFF1A" + t.completedAt : ""}`);
|
|
880
|
+
if (t.url) lines.push(` ${t.url}`);
|
|
881
|
+
lines.push("");
|
|
882
|
+
}
|
|
883
|
+
await messenger.replyText(messageId, lines.join("\n"));
|
|
884
|
+
}
|
|
885
|
+
console.log(`[reply] \u5DF2\u53D1\u9001\u4EFB\u52A1\u5217\u8868`);
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
850
888
|
case "delete_record" /* DELETE_RECORD */: {
|
|
851
889
|
console.log(`[process] \u5220\u9664\u8BB0\u5F55: id=${parsed.deleteId}`);
|
|
852
890
|
const deleted = await store.delete(parsed.deleteId);
|