chatccc 0.2.124 → 0.2.125

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 CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "chatccc",
3
- "version": "0.2.124",
4
- "description": "Feishu bot bridge for Claude Code",
5
- "license": "Apache-2.0",
6
- "type": "module",
7
- "main": "./src/index.ts",
8
- "bin": {
9
- "chatccc": "bin/chatccc.mjs"
10
- },
11
- "files": [
12
- "src/",
13
- "bin/",
14
- "scripts/postinstall-sharp-check.mjs",
15
- "demo/ilink_echo_probe.ts",
16
- "im-skills/",
17
- "images/img_readme_*.jpg",
18
- "images/img_readme_*.png",
19
- "images/avatars/status_*.png",
20
- "images/avatars/badges/",
21
- "package.json",
22
- "README.md",
23
- "config.sample.json"
24
- ],
25
- "scripts": {
26
- "dev": "tsx src/index.ts",
27
- "chatccc": "tsx src/index.ts",
28
- "start": "tsx src/index.ts",
29
- "demo:bot-test": "tsx demo/bot_test.ts",
30
- "demo:bot-test:local": "tsx demo/bot_test.ts --local",
31
- "demo:create-group": "tsx src/index.ts",
32
- "demo:create-group:local": "tsx src/index.ts --local",
33
- "demo:permission-check": "tsx demo/permission_check.ts",
34
- "demo:claude-hi": "tsx demo/claude_say_hi.ts",
35
- "demo:codex-hi": "tsx demo/codex_say_hi.ts",
36
- "demo:ilink-echo": "tsx demo/ilink_echo_probe.ts",
37
- "test": "vitest run",
38
- "test:watch": "vitest",
39
- "postinstall": "node scripts/postinstall-sharp-check.mjs"
40
- },
41
- "dependencies": {
42
- "@ai-sdk/openai-compatible": "^2.0.47",
43
- "@anthropic-ai/claude-agent-sdk": "0.2.133",
44
- "@larksuiteoapi/node-sdk": "^1.59.0",
45
- "@openilink/openilink-sdk-node": "^0.6.0",
46
- "ai": "^6.0.184",
47
- "nodemailer": "^8.0.7",
48
- "qrcode-terminal": "^0.12.0",
49
- "sharp": "^0.34.5",
50
- "tsx": "^4.0.0",
51
- "ws": "^8.18.0"
52
- },
53
- "devDependencies": {
54
- "@types/node": "^20.0.0",
55
- "@types/qrcode-terminal": "^0.12.2",
56
- "@types/ws": "^8.18.1",
57
- "typescript": "^5.0.0",
58
- "vitest": "^3.2.4"
59
- },
60
- "engines": {
61
- "node": ">=20"
62
- }
63
- }
1
+ {
2
+ "name": "chatccc",
3
+ "version": "0.2.125",
4
+ "description": "Feishu bot bridge for Claude Code",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./src/index.ts",
8
+ "bin": {
9
+ "chatccc": "bin/chatccc.mjs"
10
+ },
11
+ "files": [
12
+ "src/",
13
+ "bin/",
14
+ "scripts/postinstall-sharp-check.mjs",
15
+ "demo/ilink_echo_probe.ts",
16
+ "im-skills/",
17
+ "images/img_readme_*.jpg",
18
+ "images/img_readme_*.png",
19
+ "images/avatars/status_*.png",
20
+ "images/avatars/badges/",
21
+ "package.json",
22
+ "README.md",
23
+ "config.sample.json"
24
+ ],
25
+ "scripts": {
26
+ "dev": "tsx src/index.ts",
27
+ "chatccc": "tsx src/index.ts",
28
+ "start": "tsx src/index.ts",
29
+ "demo:bot-test": "tsx demo/bot_test.ts",
30
+ "demo:bot-test:local": "tsx demo/bot_test.ts --local",
31
+ "demo:create-group": "tsx src/index.ts",
32
+ "demo:create-group:local": "tsx src/index.ts --local",
33
+ "demo:permission-check": "tsx demo/permission_check.ts",
34
+ "demo:claude-hi": "tsx demo/claude_say_hi.ts",
35
+ "demo:codex-hi": "tsx demo/codex_say_hi.ts",
36
+ "demo:ilink-echo": "tsx demo/ilink_echo_probe.ts",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "postinstall": "node scripts/postinstall-sharp-check.mjs"
40
+ },
41
+ "dependencies": {
42
+ "@ai-sdk/openai-compatible": "^2.0.47",
43
+ "@anthropic-ai/claude-agent-sdk": "0.2.133",
44
+ "@larksuiteoapi/node-sdk": "^1.59.0",
45
+ "@openilink/openilink-sdk-node": "^0.6.0",
46
+ "ai": "^6.0.184",
47
+ "nodemailer": "^8.0.7",
48
+ "qrcode-terminal": "^0.12.0",
49
+ "sharp": "^0.34.5",
50
+ "tsx": "^4.0.0",
51
+ "ws": "^8.18.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^20.0.0",
55
+ "@types/qrcode-terminal": "^0.12.2",
56
+ "@types/ws": "^8.18.1",
57
+ "typescript": "^5.0.0",
58
+ "vitest": "^3.2.4"
59
+ },
60
+ "engines": {
61
+ "node": ">=20"
62
+ }
63
+ }
@@ -151,8 +151,6 @@ export interface DisplayCardState {
151
151
  lastSentFinalReply?: string;
152
152
  /** 点点点动画计数器(统一 display loop 每个卡片独立计数) */
153
153
  dotCount: number;
154
- /** stream-state 连续读取失败次数,超过阈值才删除 display entry */
155
- readFailCount?: number;
156
154
  }
157
155
 
158
156
  export const displayCards = new Map<string, DisplayCardState>();
package/src/session.ts CHANGED
@@ -1279,21 +1279,15 @@ export function startUnifiedDisplayLoop(): void {
1279
1279
  const sessionId = display.sessionId;
1280
1280
  const state = await readStreamState(sessionId);
1281
1281
  if (!state) {
1282
- display.readFailCount = (display.readFailCount ?? 0) + 1;
1283
- if (display.readFailCount >= 3) {
1284
- console.log(`[${ts()}] [DISPLAY] readStreamState ${display.readFailCount} consecutive failures for ${sessionId}, removing display entry for chat ${chatId}`);
1285
- displayCards.delete(chatId);
1286
- }
1282
+ displayCards.delete(chatId);
1287
1283
  continue;
1288
1284
  }
1289
- display.readFailCount = 0;
1290
1285
 
1291
1286
  // 交叉验证:chat 当前绑定的 session 是否仍是 display 记录的 session。
1292
1287
  // 若 chat 已被切换到其他 session(如 /newh),旧 display 必须停推。
1293
1288
  const currentSessionForChat = sessionInfoMap.get(chatId)?.sessionId;
1294
1289
  if (currentSessionForChat && currentSessionForChat !== sessionId) {
1295
1290
  if (state.status !== "running") {
1296
- console.log(`[${ts()}] [DISPLAY] chat ${chatId} now bound to ${currentSessionForChat}, removing stale display for ${sessionId} (terminal: ${state.status})`);
1297
1291
  displayCards.delete(chatId);
1298
1292
  }
1299
1293
  continue;
@@ -1303,7 +1297,6 @@ export function startUnifiedDisplayLoop(): void {
1303
1297
  const lastActive = getLastActiveChat(sessionId);
1304
1298
  if (lastActive !== chatId) {
1305
1299
  if (state.status !== "running") {
1306
- console.log(`[${ts()}] [DISPLAY] lastActive mismatch for ${sessionId}: display chat=${chatId} lastActive=${lastActive ?? "undefined"}, removing display entry (terminal: ${state.status})`);
1307
1300
  displayCards.delete(chatId);
1308
1301
  }
1309
1302
  continue;