@meet-im/meet 1.1.1 → 1.1.2
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/package.json +1 -1
- package/skills/meet-at/SKILL.md +11 -8
- package/src/channel.ts +3 -12
- package/src/reply-dispatcher.ts +6 -2
- package/src/send.ts +7 -0
package/package.json
CHANGED
package/skills/meet-at/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: meet-at
|
|
3
|
-
description: "Meet IM messaging.
|
|
3
|
+
description: "Meet IM messaging. CRITICAL: Use EXACT format <@USER_ID> with BOTH angle brackets. <@553> is CORRECT. <@553 or @553> is WRONG - missing bracket. Always include opening < and closing > around the user ID."
|
|
4
4
|
metadata: { "openclaw": { "emoji": "💬", "requires": { "config": ["channels.meet"] } } }
|
|
5
5
|
allowed-tools: ["message"]
|
|
6
6
|
---
|
|
@@ -9,16 +9,19 @@ allowed-tools: ["message"]
|
|
|
9
9
|
|
|
10
10
|
Use the `message` tool for all Meet messaging operations.
|
|
11
11
|
|
|
12
|
-
## CRITICAL: Mention Format
|
|
12
|
+
## CRITICAL: Mention Format - MUST HAVE BOTH BRACKETS
|
|
13
13
|
|
|
14
|
-
**
|
|
14
|
+
**Correct format: `<@USER_ID>` with opening `<` and closing `>`**
|
|
15
15
|
|
|
16
|
-
| Format |
|
|
17
|
-
|
|
18
|
-
| <@USER_ID> |
|
|
19
|
-
| <@-1> |
|
|
16
|
+
| Format | Status | Example |
|
|
17
|
+
|--------|--------|---------|
|
|
18
|
+
| <@USER_ID> | ✅ CORRECT | <@553> |
|
|
19
|
+
| <@-1> | ✅ CORRECT | <@-1> |
|
|
20
|
+
| <@553 | ❌ WRONG - missing `>` | Will not trigger mention |
|
|
21
|
+
| @553> | ❌ WRONG - missing `<` | Will not trigger mention |
|
|
22
|
+
| @553 | ❌ WRONG - no brackets | Will not trigger mention |
|
|
20
23
|
|
|
21
|
-
**
|
|
24
|
+
**The format MUST be complete: `<@` + number + `>`**
|
|
22
25
|
|
|
23
26
|
## Examples
|
|
24
27
|
|
package/src/channel.ts
CHANGED
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
} from "./accounts.js";
|
|
19
19
|
import { meetOutbound } from "./outbound.js";
|
|
20
20
|
import { probeMeet } from "./probe.js";
|
|
21
|
-
import { resolveMeetGroupPolicy } from "./policy.js";
|
|
22
21
|
import {
|
|
23
22
|
parseMeetTarget,
|
|
24
23
|
looksLikeMeetId,
|
|
@@ -74,17 +73,9 @@ export const meetPlugin: ChannelPlugin<ResolvedMeetAccount> = {
|
|
|
74
73
|
accountId,
|
|
75
74
|
groupId,
|
|
76
75
|
}): GroupToolPolicyConfig | undefined => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
groupAllowFrom: account.config.groupAllowFrom ?? [],
|
|
81
|
-
chatId: groupId ?? "",
|
|
82
|
-
groups: account.config.groups,
|
|
83
|
-
});
|
|
84
|
-
if (!groupPolicy.allowed) {
|
|
85
|
-
return { deny: ["*"] };
|
|
86
|
-
}
|
|
87
|
-
return undefined;
|
|
76
|
+
// 群组访问控制在 bot.ts 中处理,这里只返回工具策略配置
|
|
77
|
+
// 不使用 { deny: ["*"] } 拒绝所有工具,否则会导致 tools: []
|
|
78
|
+
return undefined
|
|
88
79
|
},
|
|
89
80
|
},
|
|
90
81
|
reload: { configPrefixes: ["channels.meet"] },
|
package/src/reply-dispatcher.ts
CHANGED
|
@@ -50,8 +50,12 @@ export function protectMentionsInChunks(chunks: string[]): string[] {
|
|
|
50
50
|
if (endMatch) {
|
|
51
51
|
// 将不完整的部分移到下一个 chunk 前面
|
|
52
52
|
const splitIndex = chunk.lastIndexOf("<@")
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
// splitIndex >= 0 时处理(包括 chunk 只有 "<@" 的情况)
|
|
54
|
+
if (splitIndex >= 0) {
|
|
55
|
+
// 如果 splitIndex 之前有内容,保留到 result
|
|
56
|
+
if (splitIndex > 0) {
|
|
57
|
+
result.push(chunk.slice(0, splitIndex))
|
|
58
|
+
}
|
|
55
59
|
pendingSuffix = chunk.slice(splitIndex)
|
|
56
60
|
continue
|
|
57
61
|
}
|
package/src/send.ts
CHANGED
|
@@ -78,7 +78,9 @@ export function setSendMessageLogger(logger: RuntimeEnv): void {
|
|
|
78
78
|
function log(message: string): void {
|
|
79
79
|
if (_logger) {
|
|
80
80
|
_logger.log(message);
|
|
81
|
+
return;
|
|
81
82
|
}
|
|
83
|
+
console.log(message);
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
function logError(message: string): void {
|
|
@@ -118,6 +120,11 @@ export async function sendMessageMeet(
|
|
|
118
120
|
if (!account.configured) {
|
|
119
121
|
throw new Error(`Meet account not configured: ${accountId ?? "default"}`);
|
|
120
122
|
}
|
|
123
|
+
// logLevel: info 时记录 AI 输出的原始内容,方便调试 mention 格式问题
|
|
124
|
+
// 默认为 silent,只有显式设置为 info 时才输出
|
|
125
|
+
if (account.config.logLevel === "info") {
|
|
126
|
+
console.log(`[${account.accountId}] AI output raw text: ${JSON.stringify(text)}`);
|
|
127
|
+
}
|
|
121
128
|
const token = account.apiToken;
|
|
122
129
|
if (!token) {
|
|
123
130
|
throw new Error("Meet API token not configured");
|