@myclaw163/clawclaw-cli 0.6.90 → 0.6.92
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/bin/clawclaw-cli.mjs +3 -3
- package/package.json +1 -1
- package/skills/clawclaw/SKILL.md +1 -1
- package/skills/clawclaw/references/CLAUDE-CODE-MONITOR.md +1 -1
- package/skills/clawclaw/references/COMMANDS.md +1 -1
- package/skills/clawclaw/references/STREAM.md +1 -1
- package/src/commands/config.ts +30 -30
- package/src/commands/game.ts +2 -2
- package/src/commands/setup/hermes.test.ts +96 -96
- package/src/commands/setup/hermes.ts +76 -76
- package/src/commands/setup/index.ts +13 -13
- package/src/commands/setup/openclaw.test.ts +114 -114
- package/src/commands/setup/openclaw.ts +147 -147
- package/src/lib/game-client.ts +1 -1
- package/src/lib/host-config-patcher.test.ts +130 -130
- package/src/lib/host-config-patcher.ts +151 -151
- package/src/sdk/types.ts +2 -0
- package/src/strategies/goals/crab-sabotage-top.ts +30 -1
- package/src/strategies/strategy-loop.ts +6 -0
- package/src/strategies/types.ts +5 -0
|
@@ -338,6 +338,7 @@ export async function runStrategyLoop(strategyId: string, args?: string[]): Prom
|
|
|
338
338
|
lastProgressNotifyAt: 0,
|
|
339
339
|
teammates,
|
|
340
340
|
alarmDone: false,
|
|
341
|
+
alarmOnCooldown: false,
|
|
341
342
|
rooms: [],
|
|
342
343
|
playerNamesBySeat,
|
|
343
344
|
forcePatrolAdvance: false,
|
|
@@ -417,6 +418,10 @@ export async function runStrategyLoop(strategyId: string, args?: string[]): Prom
|
|
|
417
418
|
if (actionType === 'task' || actionType === 'kill' || actionType === 'report' || actionType === 'trigger_alarm') {
|
|
418
419
|
activeMoveTarget = null;
|
|
419
420
|
}
|
|
421
|
+
if (actionType === 'trigger_alarm') {
|
|
422
|
+
// on_cooldown = 撞上 20s 阵营共享 CD,破坏仍装填、CD 好后可补打——透给蟹策略回滚乐观去重、退避重试。
|
|
423
|
+
ctx.alarmOnCooldown = errorMessage.includes('on_cooldown');
|
|
424
|
+
}
|
|
420
425
|
if (actionType === 'kill' && errorMessage.includes('cannot_kill_teammate')) {
|
|
421
426
|
const target = action.toJSON().target;
|
|
422
427
|
if (typeof target === 'string' && target.length > 0) teammates.add(target);
|
|
@@ -464,6 +469,7 @@ export async function runStrategyLoop(strategyId: string, args?: string[]): Prom
|
|
|
464
469
|
}
|
|
465
470
|
|
|
466
471
|
if (!failed && actionType === 'trigger_alarm') {
|
|
472
|
+
ctx.alarmOnCooldown = false;
|
|
467
473
|
activeMoveTarget = null;
|
|
468
474
|
}
|
|
469
475
|
|
package/src/strategies/types.ts
CHANGED
|
@@ -76,6 +76,11 @@ export interface StrategyContext {
|
|
|
76
76
|
lastProgressNotifyAt: number;
|
|
77
77
|
teammates: Set<string>;
|
|
78
78
|
alarmDone: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* loop→蟹策略回传:上一发 trigger_alarm 是否撞了 20s 阵营共享 CD 被服务端拒(on_cooldown)。
|
|
81
|
+
* 蟹策略据此撤销乐观去重标记并退避补打;仅 crab-sabotage 用,其余策略不涉及,故可选。
|
|
82
|
+
*/
|
|
83
|
+
alarmOnCooldown?: boolean;
|
|
79
84
|
rooms: RoomTarget[];
|
|
80
85
|
playerNamesBySeat: Record<string, string>;
|
|
81
86
|
/** Set by strategy-loop when a move target is unreachable too many times. Patrol strategies should advance past the current room. */
|