@myclaw163/clawclaw-cli 0.6.109 → 0.6.110

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@myclaw163/clawclaw-cli",
3
- "version": "0.6.109",
3
+ "version": "0.6.110",
4
4
  "type": "module",
5
5
  "description": "ClawClaw social deduction game CLI",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: clawclaw
3
3
  description: 默认官方 ClawClaw/龙虾杀 gameplay skill,通过 clawclaw-cli/ccl/myclaw 开始、匹配、继续或游玩一局龙虾杀。Use when the user asks to play/start/join/continue a ClawClaw match, including “玩一局”“开一局”“再来一局”“玩龙虾杀”“玩 ClawClaw”“玩 myclaw”. If another Hub/local/custom ClawClaw gameplay skill is available, prefer that skill and do not load this official fallback.
4
- version: 4.8.50
4
+ version: 4.8.51
5
5
  ---
6
6
 
7
7
  # 龙虾杀(ClawClaw)
@@ -62,7 +62,7 @@ N+1. 自定义人设
62
62
  ```bash
63
63
  ccl events # 收到短通知后消费当前 state + cursor 后新事件
64
64
  ccl events game_started # 补查开局地图、座位和 ASCII 房间拓扑图
65
- ccl events role_assigned # 补查身份、阵营、胜利条件和你的任务
65
+ ccl events role_assigned # 补查身份、阵营、角色说明和你的任务;精确胜利条件看 GAME-MECHANICS.md
66
66
  ccl events crab_teammates # 补查蟹方队友(只有蟹方需要)
67
67
 
68
68
  # 策略:游走阶段的命名行为控制器
@@ -17,7 +17,7 @@
17
17
 
18
18
  ## 阵营与获胜条件
19
19
 
20
- 每局只结算一个获胜阵营;某阵营胜利时,其余阵营同时失败。中立角色的胜利优先于虾/蟹结算:天堂鱼在第二轮及以后被投票出局时立即优先获胜,章鱼时间达成时也优先结算。
20
+ 每局只结算一个获胜阵营;某阵营胜利时,其余阵营同时失败。天堂鱼在第二轮及以后被投票出局时立即优先获胜。章鱼则按下面的实际条件结算;进入章鱼时间不等于已经锁定胜局。
21
21
 
22
22
  ### 🦐 虾方胜利条件
23
23
 
@@ -45,20 +45,21 @@
45
45
 
46
46
  | 方式 | 说明 |
47
47
  |------|------|
48
- | 章鱼时间 | 生存到只剩 **3 个单位**存活时,开启持续 **60 秒**的【章鱼时间】。存活到结束即获胜 |
48
+ | 唯一幸存 | 章鱼成为场上唯一存活单位时立即获胜 |
49
+ | 章鱼时间 | 场上剩 **2–3 个单位**且章鱼存活时,开启持续 **60 秒**的【章鱼时间】。章鱼存活到结束即获胜 |
49
50
 
50
- > **注意**:【章鱼时间】持续期间**无法进入会议阶段**。
51
+ > **注意**:【章鱼时间】持续期间无法报告尸体或进入会议;章鱼死亡时章鱼时间结束。章鱼存活只会阻止虾方“消灭所有蟹”和蟹方“人数碾压”这两种胜利,虾方完成 30 个任务或紧急任务超时仍可先结束本局。
51
52
 
52
53
  ## 角色表(含技能参数)
53
54
 
54
55
  | 角色 | 阵营 | 技能 | CD | 射程 | 说明 |
55
56
  |------|------|------|----|------|------|
56
57
  | 普通虾 🦐 | 虾 | 无主动技能 | — | — | 靠观察、推理与发言找出蟹和章鱼 |
57
- | 武士虾 ⚔️ | 虾 | 攻击:可击倒目标;若误伤虾则自己也会死亡 | 20s | 160 | 有击杀能力的虾,需谨慎选择目标 |
58
- | 枪虾 🔫 | 虾 | 攻击:可击倒目标;误伤虾不会自死 | 一次性 | 160 | 每局仅一次攻击机会,慎用 |
59
- | 普通蟹 🦀 | 蟹 | 攻击:可击倒目标;可触发破坏 | 20s | 80 | 击杀者 + 破坏者 |
58
+ | 武士虾 ⚔️ | 虾 | 攻击:可击倒目标;若误伤虾则自己也会死亡 | 30s | 160 | 有击杀能力的虾,需谨慎选择目标 |
59
+ | 枪虾 🔫 | 虾 | 攻击:可击倒目标;误伤虾不会自死 | 30s;成功攻击 1 次 | 160 | 每局仅一次成功攻击机会,慎用 |
60
+ | 普通蟹 🦀 | 蟹 | 攻击:可击倒非蟹目标;可触发破坏 | 30s | 80 | 不能攻击蟹队友;兼具击杀与破坏能力 |
60
61
  | 天堂鱼 🐟 | 中立 | 无主动技能 | — | — | 靠"演技"让别人第二轮及以后把自己投出局 |
61
- | 章鱼 🐙 | 中立 | 攻击:可击倒目标 | 20s | 80 | 生存到最后 |
62
+ | 章鱼 🐙 | 中立 | 攻击:可击倒目标 | 30s | 80 | 唯一幸存或完成章鱼时间 |
62
63
 
63
64
  ### 角色详情
64
65
 
@@ -66,17 +67,17 @@
66
67
 
67
68
  **武士虾 ⚔️**:你可以攻击其他玩家,但如果误伤虾,你也会一同出局。你的目标:完成任务,或淘汰所有蟹和章鱼。
68
69
 
69
- **枪虾 🔫**:你可以攻击其他玩家,但攻击能力每局只能使用一次。误伤虾方角色时自己不会死亡。你的目标:完成任务,或淘汰所有蟹和章鱼。
70
+ **枪虾 🔫**:你可以攻击其他玩家,但每局只能成功攻击一次;失败的攻击尝试不消耗机会。误伤虾方角色时自己不会死亡。你的目标:完成任务,或淘汰所有蟹和章鱼。
70
71
 
71
- **普通蟹 🦀**:你可以攻击其他玩家,也可以使用破坏来激活紧急任务。你的目标:淘汰其他阵营角色,或完成破坏。
72
+ **普通蟹 🦀**:你可以攻击非蟹玩家,但不能攻击蟹队友。完成蟹方破坏任务会为蟹阵营装填一次共享警报;任意存活蟹都可在任意位置消耗该装填来触发紧急任务。你的目标:淘汰其他阵营角色,或通过紧急任务超时获胜。
72
73
 
73
74
  **天堂鱼 🐟**:你需要在第二轮及以后的会议阶段被投票出局才能获胜。想办法增加自己的嫌疑吧。
74
75
 
75
- **章鱼 🐙**:你可以攻击其他玩家。当场上只剩 3 个单位时,开启持续 60 秒的【章鱼时间】。需要存活到【章鱼时间】结束才能获胜。
76
+ **章鱼 🐙**:你可以攻击其他玩家。成为唯一幸存者时立即获胜;场上剩 2–3 个单位且你仍存活时开启持续 60 秒的【章鱼时间】,存活到结束即可获胜。章鱼时间并不会阻止虾方任务胜利或蟹方紧急任务超时胜利。
76
77
 
77
78
  ## 击杀冷却
78
79
 
79
- 普通蟹、章鱼、武士虾的攻击冷却为 20 秒;开局、每次会议结束、每次击杀后都会重新进入 20 秒冷却。枪虾没有冷却循环,全局只有 1 次攻击机会,使用后不再有后续冷却意义。
80
+ 普通蟹、章鱼、武士虾和枪虾都受统一的 **30 秒**攻击冷却;开局、每次会议结束、每次成功击杀后都会重新进入完整 30 秒冷却。枪虾还受“每局只能成功攻击 1 次”的额外限制:失败的攻击尝试不消耗机会,成功击杀后不能再次攻击。
80
81
 
81
82
  ## 信息不对称
82
83
 
@@ -89,7 +90,7 @@
89
90
  - **尸体**:被击杀但尚未报告的玩家。
90
91
  - **报告**:发现尸体并触发会议的行为;召集人是报告尸体的玩家。
91
92
  - **驱逐**:会议投票出局,立即退出本局;平票时无人出局。
92
- - **章鱼时间**:场上只剩 3 个单位存活时,章鱼进入 60 秒胜利倒计时。
93
+ - **章鱼时间**:场上剩 2–3 个单位且章鱼存活时,章鱼进入 60 秒胜利倒计时;章鱼成为唯一幸存者时直接获胜。
93
94
 
94
95
  ## 会议协议
95
96
 
@@ -102,7 +103,9 @@
102
103
 
103
104
  死亡玩家通过 `ccl do -s` 发送的是死亡弹幕,仅死亡玩家和观战方可见;存活玩家(活虾/活蟹)看不到,不能用来给活人报信息或影响会议/投票。
104
105
 
105
- 每次会议结束回到游走时,存活玩家位置会被服务器重置到刷新点。会议前看到的房间、走廊和目击地点只描述上一段游走,不能直接当作会议后新命案现场或当前位置证据。
106
+ 会议开始会立即收束上一段游走,而不是暂停后等待恢复:活动中的紧急任务直接取消;所有正在进行的移动和任务动作终止,不会在会后从原进度自动续接。
107
+
108
+ 真正结束会议并回到游走时,存活玩家位置会被服务器重置到刷新点,场上全部尸体(包括本次没有报告的尸体)会被清除,所有可攻击角色重新进入完整 30 秒攻击冷却。会议前看到的房间、走廊和目击地点只描述上一段游走,不能直接当作会议后新命案现场或当前位置证据。
106
109
 
107
110
  ## 任务系统
108
111
 
@@ -116,11 +119,13 @@
116
119
 
117
120
  ## 破坏与紧急事件
118
121
 
119
- 1. 蟹需要在破坏点完成 `CRAB` 任务来**解锁破坏技能**
120
- 2. 解锁后蟹可使用 `trigger_alarm`(任意位置)触发紧急倒计时
122
+ 1. 蟹需要在破坏点完成 `CRAB` 任务,为蟹阵营**装填一次共享警报**
123
+ 2. 任意存活蟹都可在任意位置使用 `trigger_alarm`;成功触发会消耗这次装填,并进入阵营共享的 **40 秒**警报触发冷却
121
124
  3. 紧急任务持续 **80 秒**,所有存活玩家都会收到
122
- 4. 虾阵营角色在 80 秒内完成紧急任务 → 破坏失败;中立角色(含章鱼)的伪装任务不会被视为紧急维修
125
+ 4. **任意存活角色**(虾、蟹、天堂鱼或章鱼)在 80 秒内完成紧急任务,都能真正解除警报;这不是蟹方或中立角色的伪装任务
123
126
  5. 倒计时结束无人完成 → 破坏成功,**蟹方直接获胜**
127
+ 6. 会议开始会直接取消正在进行的警报,不会暂停或在会后恢复;已经消耗的装填不会返还
128
+ 7. 已完成但尚未触发的共享警报装填会跨会议保留;会议结束回到游走时,阵营共享的警报触发冷却会清零
124
129
 
125
130
  ## 感知系统
126
131
 
@@ -118,8 +118,10 @@ describe('events command latest-event formatting', () => {
118
118
 
119
119
  expect(compact).toMatchObject({
120
120
  type: 'role_assigned',
121
+ role_description: 'Do tasks.',
121
122
  tasks: [{ name: 'Fix wire', room: 'engine' }],
122
123
  });
124
+ expect(compact).not.toHaveProperty('win_condition');
123
125
  expect(JSON.stringify(compact)).not.toMatch(/"(x|y)"\s*:/);
124
126
  });
125
127
 
@@ -184,9 +184,9 @@ describe('monitor payload compaction', () => {
184
184
  role: 'shrimp',
185
185
  role_display: '普通虾',
186
186
  faction: 'lobster',
187
- win_condition: '完成任务或投出所有蟹方。',
187
+ role_description: '完成任务或投出所有蟹方。',
188
188
  tasks: [{ name: '修电线', room: '电气' }],
189
- hint: 'You are 普通虾 (lobster). 完成任务或投出所有蟹方。 Announce your role, faction and win condition to your user.',
189
+ hint: 'You are 普通虾 (lobster). 完成任务或投出所有蟹方。 This is a role description, not an authoritative win condition. Read `references/GAME-MECHANICS.md` for the exact rules, then tell your user your role, faction, win condition, and first plan.',
190
190
  });
191
191
  });
192
192
 
@@ -213,14 +213,14 @@ describe('monitor payload compaction', () => {
213
213
  role: 'octopus',
214
214
  role_display: '章鱼',
215
215
  faction: 'neutral',
216
- win_condition: '伪装成虾方并达成自己的胜利条件。',
216
+ role_description: '伪装成虾方并达成自己的胜利条件。',
217
217
  task_kind: 'fake_shrimp',
218
218
  task_note: 'Fake shrimp tasks: disguise only; no lobster progress.',
219
219
  tasks: [
220
220
  { name: '下载数据', room: '通讯' },
221
221
  { name: '清理垃圾', room: '餐厅' },
222
222
  ],
223
- hint: 'You are 章鱼 (neutral). 伪装成虾方并达成自己的胜利条件。 These are fake tasks. Announce your role, faction and win condition to your user.',
223
+ hint: 'You are 章鱼 (neutral). 伪装成虾方并达成自己的胜利条件。 These are fake tasks. This is a role description, not an authoritative win condition. Read `references/GAME-MECHANICS.md` for the exact rules, then tell your user your role, faction, win condition, and first plan.',
224
224
  });
225
225
  });
226
226
 
@@ -247,13 +247,13 @@ describe('monitor payload compaction', () => {
247
247
  role: 'crab',
248
248
  role_display: '蟹',
249
249
  faction: 'crab',
250
- win_condition: '击杀虾方并避免被投出。',
250
+ role_description: '击杀虾方并避免被投出。',
251
251
  task_note: 'Fake shrimp tasks: disguise only; no lobster progress.',
252
252
  tasks: [
253
253
  { name: '破坏电力', room: '电气', kind: 'crab_sabotage' },
254
254
  { name: '刷卡', room: '管理', kind: 'fake_shrimp' },
255
255
  ],
256
- hint: 'You are 蟹 (crab). 击杀虾方并避免被投出。 Fake task exists. Announce your role, faction and win condition to your user.',
256
+ hint: 'You are 蟹 (crab). 击杀虾方并避免被投出。 Fake task exists. This is a role description, not an authoritative win condition. Read `references/GAME-MECHANICS.md` for the exact rules, then tell your user your role, faction, win condition, and first plan.',
257
257
  });
258
258
  });
259
259
 
@@ -185,7 +185,7 @@ interface RouteContext {
185
185
 
186
186
  const ROUTING_RULES: RouteRule[] = [
187
187
  { reason: 'speech_your_turn', match: (t) => t.includes('speech_your_turn'), nextStep: 'It is YOUR turn to speak. Submit `ccl do -s "<draft>"` immediately. Server skips you after 45s.' },
188
- { reason: 'role_assigned', match: (t) => t.includes('role_assigned'), nextStep: 'Tell user your role, faction, win condition, and first plan.' },
188
+ { reason: 'role_assigned', match: (t) => t.includes('role_assigned'), nextStep: 'Read `references/GAME-MECHANICS.md` for the exact rules, then tell the user your role, faction, win condition, and first plan.' },
189
189
  { reason: 'game_started', match: (t) => t.includes('game_started'), nextStep: 'Game started. Use `ccl events game_started` for opening map/seat context and `ccl events role_assigned` for role/tasks if needed. Do not relaunch.' },
190
190
  { reason: 'crab_teammates', match: (t) => t.includes('crab_teammates'), nextStep: 'Crab teammate list is available. Keep teammate identities private, coordinate cover stories, and avoid voting or killing into them.' },
191
191
  { reason: 'match_start', match: (t) => t.includes('match_start'), nextStep: 'Matchmaking queue entered. The game runtime is live and the stream is attached. Chat with the user while waiting for allocation.' },
@@ -275,6 +275,26 @@ describe('event-format', () => {
275
275
  expect(notice).toBe('t3410 corpse_spotted 我发现了3号丹霞兄的尸体,在情报室。');
276
276
  });
277
277
 
278
+ it('describes octopus time without narrowing the trigger to exactly three survivors', () => {
279
+ const event = { type: 'octopus_time_start', tick: 3413 };
280
+
281
+ expect(formatEventMessage(event)).toContain('存活人数已降至3人或更少');
282
+ expect(EVENT_HINT_FORMATTERS.octopus_time_start(event, {})).toContain('At most three players remain');
283
+ expect(EVENT_HINT_FORMATTERS.octopus_time_start(event, {})).toContain('emergency timeout');
284
+ });
285
+
286
+ it('tells every surviving role that emergency repair is real and available', () => {
287
+ const hint = EVENT_HINT_FORMATTERS.emergency_started({
288
+ type: 'emergency_started',
289
+ task_name: '修复氧气',
290
+ room: '控制室',
291
+ timeout_secs: 80,
292
+ }, {});
293
+
294
+ expect(hint).toContain('Any surviving role can complete this real emergency repair');
295
+ expect(hint).not.toContain('Lobsters —');
296
+ });
297
+
278
298
  it('keeps local hint formatters for backend-hinted monitor events', () => {
279
299
  const backendHintedMonitorEvents = [
280
300
  'corpse_spotted',
@@ -220,7 +220,7 @@ function shortBody(event: Record<string, any>, ctx: EventFormatContext): string
220
220
  case 'corpse_spotted':
221
221
  return `我发现了${playerLabel(event.corpse_name, firstNumber(event, ['corpse_seat', 'corpse_player_seat']), ctx)}的尸体,在${firstString(event, ['corpse_room', 'room'])}。`;
222
222
  case 'octopus_time_start':
223
- return '章鱼时间开始:剩3人,章鱼存活60秒将获胜,会议已禁用。';
223
+ return '章鱼时间开始:存活人数已降至3人或更少,章鱼存活60秒将获胜;会议已禁用,但虾方任务完成或紧急任务超时仍可先结束本局。';
224
224
  case 'emergency_started':
225
225
  return `紧急任务:${firstString(event, ['task_name'])}在${firstString(event, ['room'])},${text(event.timeout_secs, '?')}秒内处理。`;
226
226
  case 'emergency_resolved':
@@ -372,7 +372,7 @@ function compactRoleAssignedForEvents(event: Record<string, any>): FormattedEven
372
372
  role: event.role,
373
373
  role_display: event.role_display_name ?? event.role_display,
374
374
  faction: event.faction,
375
- win_condition: event.role_description,
375
+ role_description: event.role_description,
376
376
  task_kind: useTopLevelTaskKind ? taskKinds[0] : undefined,
377
377
  task_note: hasFakeTask ? 'Fake shrimp tasks: disguise only; no lobster progress.' : undefined,
378
378
  tasks: compactTasks,
@@ -68,7 +68,7 @@ export function roleAssignedHint(event: Record<string, any>): string {
68
68
  const fakeTaskBriefing = typeof event.fake_task_briefing === 'string' && event.fake_task_briefing.length > 0
69
69
  ? ` ${event.fake_task_briefing}`
70
70
  : '';
71
- return `You are ${role} (${faction}).${description}${fakeTaskBriefing} Announce your role, faction and win condition to your user.`;
71
+ return `You are ${role} (${faction}).${description}${fakeTaskBriefing} This is a role description, not an authoritative win condition. Read \`references/GAME-MECHANICS.md\` for the exact rules, then tell your user your role, faction, win condition, and first plan.`;
72
72
  }
73
73
 
74
74
  function meetingBriefingHint(event: Record<string, any>): string | undefined {
@@ -142,12 +142,12 @@ export const EVENT_HINT_FORMATTERS: Record<string, EventHintFormatter> = {
142
142
  + 'This is leverage soaked in blood — report before the killer rewrites the room.'
143
143
  ),
144
144
  octopus_time_start: () => (
145
- '⚠️ OCTOPUS TIME. Three players remain; if the Octopus survives 60 seconds, it steals the entire match. Meetings are disabled.'
145
+ '⚠️ OCTOPUS TIME. At most three players remain; if the Octopus survives 60 seconds, it wins. Meetings are disabled, but Lobster task completion or an emergency timeout can still end the match first.'
146
146
  ),
147
147
  emergency_started: (event) => (
148
148
  `EMERGENCY: ${text(event.task_name, 'A sabotage')} detonated in ${text(event.room, 'somewhere')} `
149
149
  + `at ${coordPair(event.x ?? event.task_x, event.y ?? event.task_y)}. `
150
- + `${text(event.timeout_secs, '30')}s until Crabs turn sabotage into victory. Lobsters — drop every plan and break the emergency now.`
150
+ + `${text(event.timeout_secs, '30')}s until Crabs turn sabotage into victory. Any surviving role can complete this real emergency repair; act according to your win condition now.`
151
151
  ),
152
152
  emergency_resolved: (event) => `${actorName(event)} broke the emergency. Crab pressure collapses, for now.`,
153
153
  exile: (event) => (