@chrischall/warapp-mcp 0.7.0 → 0.9.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +5 -4
- package/dist/analysis/card-support.js +12 -4
- package/dist/analysis/coalition.js +55 -0
- package/dist/analysis/local-deploy.js +14 -0
- package/dist/analysis/opponents.js +2 -1
- package/dist/analysis/picks.js +270 -37
- package/dist/analysis/plan/after-leftover.js +26 -4
- package/dist/analysis/plan/captures.js +86 -14
- package/dist/analysis/plan/completed.js +8 -1
- package/dist/analysis/plan/conceded-out.js +16 -11
- package/dist/analysis/plan/deploy-estimates.js +544 -0
- package/dist/analysis/plan/doomed-out.js +135 -0
- package/dist/analysis/plan/estimates.js +4 -1
- package/dist/analysis/plan/free-capture.js +34 -0
- package/dist/analysis/plan/holds.js +8 -309
- package/dist/analysis/plan/horizon.js +42 -0
- package/dist/analysis/plan/leftover.js +43 -5
- package/dist/analysis/plan/observe.js +896 -0
- package/dist/analysis/plan/orders.js +35 -1
- package/dist/analysis/plan/report.js +10 -4
- package/dist/analysis/plan/shared.js +4 -1376
- package/dist/analysis/plan/spread-bind.js +49 -0
- package/dist/analysis/plan/stand-still.js +5 -3
- package/dist/analysis/plan/state.js +12 -0
- package/dist/analysis/plan/strike-stack.js +467 -0
- package/dist/analysis/plan/strike.js +3 -463
- package/dist/analysis/plan/targets.js +219 -28
- package/dist/analysis/plan/threats.js +23 -9
- package/dist/analysis/plan/transfers.js +24 -1
- package/dist/analysis/plan/two-move.js +1 -1
- package/dist/analysis/plan/withdraw.js +316 -0
- package/dist/analysis/planner.js +106 -43
- package/dist/analysis/player.js +4 -0
- package/dist/analysis/relations.js +8 -2
- package/dist/analysis/stress.js +1 -1
- package/dist/bundle.js +4578 -3405
- package/dist/cards.js +37 -0
- package/dist/my-games.js +2 -0
- package/dist/my-orders.js +134 -0
- package/dist/open-games.js +94 -10
- package/dist/team-cards.js +2 -2
- package/dist/team-orders.js +51 -23
- package/dist/tools/card-advice.js +57 -13
- package/dist/tools/card-support-advice.js +17 -1
- package/dist/tools/check-plan.js +2 -1
- package/dist/tools/commander-check.js +2 -1
- package/dist/tools/decision-capture.js +4 -2
- package/dist/tools/index.js +3 -0
- package/dist/tools/join-game.js +44 -8
- package/dist/tools/live.js +43 -5
- package/dist/tools/my-orders.js +110 -0
- package/dist/tools/open-games.js +2 -2
- package/dist/tools/picks.js +128 -51
- package/dist/tools/team-brief.js +1 -1
- package/dist/tools/team.js +25 -9
- package/dist/tools/turn.js +61 -6
- package/dist/tools/uncommit.js +27 -5
- package/dist/trend.js +36 -1
- package/dist/version.js +1 -1
- package/manifest.json +5 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/warapp-mcp/SKILL.md +9 -2
package/dist/analysis/player.js
CHANGED
|
@@ -98,6 +98,10 @@ export function armyCapPoolsUncertainty(c, localDeployments) {
|
|
|
98
98
|
}
|
|
99
99
|
/** What the army cap's figure rests on: six live cases, and the card armies' place (from the client's guide, unverified). */
|
|
100
100
|
export const ARMY_CAP_BASIS = "the formula is verified by six live cases (2026-11-15: received 41, 49, 25, 27 and 71 where the cap bit, among them the binding case sent through warapp_submit_turn, and a room of 61 it did not bind), the cap taken on this turn's income; Reinforcement card armies are outside it (the client's guide: they are not income and always pay in full, unverified live)";
|
|
101
|
+
/** #433: the game's own base income (`MinimumArmyBonus`; 0 and 3 exist), the default only when it does not say. One accessor for the planner and the stress test. */
|
|
102
|
+
export function gameBaseIncome(settings) {
|
|
103
|
+
return Math.max(0, Math.floor(settings?.baseIncome ?? settings?.minimumArmyBonus ?? DEFAULT_BASE_INCOME));
|
|
104
|
+
}
|
|
101
105
|
/** {@link IncomeRules} from a game's settings (the defaults when it does not say). */
|
|
102
106
|
export function incomeRules(settings) {
|
|
103
107
|
return { base: settings?.minimumArmyBonus ?? DEFAULT_BASE_INCOME, per: settings?.bonusArmyPer ?? 0 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { carriesTeam } from '../teams.js';
|
|
1
|
+
import { carriesTeam, teammatesOf } from '../teams.js';
|
|
2
2
|
import { bonusTerritories } from './bonuses.js';
|
|
3
3
|
import { bfsDistances, neighborsOf } from './graph.js';
|
|
4
4
|
import { ownerShown, OWNERS_SHOWN_FOG, visibleState, } from './plan/shared.js';
|
|
@@ -606,7 +606,13 @@ export function planRelationsFrom(input) {
|
|
|
606
606
|
card: 'Diplomacy',
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
|
-
|
|
609
|
+
// #435: a teammate's quiet border is no tacit truce (#246): left out like a partner with an open
|
|
610
|
+
// agreement, as warapp_get_relations already did — plan_turn, check_plan and advise_diplomacy listed them.
|
|
611
|
+
const self = players.find((p) => p.id === me);
|
|
612
|
+
const open = new Set([
|
|
613
|
+
...input.agreements.filter((a) => !TERMINAL_STATUSES.has(a.status)).map((a) => a.with),
|
|
614
|
+
...(self ? teammatesOf(players, self).map((p) => p.id) : []),
|
|
615
|
+
]);
|
|
610
616
|
return { relations, tacit: tacitTruces({ graph, boards: input.boards, me, exclude: open }) };
|
|
611
617
|
}
|
|
612
618
|
// ---------- B3: pricing a deal (docs/PLAN-TEAMS.md section 8 B3) ----------
|
package/dist/analysis/stress.js
CHANGED
|
@@ -134,7 +134,7 @@ export function stressPlan(input) {
|
|
|
134
134
|
const pools = input.localDeployments ? couldHoldBonusPools(graph, input.opponents.map((o) => o.id), shownOwner) : undefined;
|
|
135
135
|
const deployOn = (opp, on) => {
|
|
136
136
|
const all = Math.max(0, Math.floor(opp.deploy));
|
|
137
|
-
return pools ? enemyDeployReaching(all, freeIncome(opp.base ?? 0, DEFAULT_BASE_INCOME, opp.card ?? 0), pools.get(opp.id) ?? [], [on], input.perTerritoryIncome === true) : all;
|
|
137
|
+
return pools ? enemyDeployReaching(all, freeIncome(opp.base ?? 0, input.baseIncome ?? DEFAULT_BASE_INCOME, opp.card ?? 0), pools.get(opp.id) ?? [], [on], input.perTerritoryIncome === true) : all;
|
|
138
138
|
};
|
|
139
139
|
/** Luck-free: `sent` armies (and a commander, when it goes along) take `t` as it stands. */
|
|
140
140
|
const breaks = (sent, withCommander, t) => breaksLuckFree(sent, withCommander, t, { offensiveKillRate: off, defensiveKillRate: def });
|