@chrischall/warapp-mcp 0.23.0 → 0.23.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/analysis/plan/captures.js +1 -1
- package/dist/analysis/plan/deploy-estimates.js +17 -6
- package/dist/analysis/plan/estimates.js +1 -0
- package/dist/analysis/plan/relations.js +1 -1
- package/dist/analysis/plan/targets.js +33 -7
- package/dist/analysis/plan/threats.js +1 -1
- package/dist/analysis/relations.js +40 -7
- package/dist/bundle.js +223 -49
- package/dist/tools/calibration-harness.js +8 -1
- package/dist/tools/calibration-job.js +133 -0
- package/dist/tools/calibration-worker.js +10 -0
- package/dist/tools/calibration.js +52 -9
- package/dist/tools/check-plan.js +2 -1
- package/dist/tools/relations.js +3 -2
- package/dist/tools/turn.js +6 -2
- package/dist/trend.js +1 -0
- package/dist/version.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// warapp_calibration's `harness: true` as a background job. The harness replays every finished game and can run
|
|
2
|
+
// for most of an hour on a hosted data dir; a tool call cannot wait that long: Claude Code ends a call silent for
|
|
3
|
+
// CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT, mcp-host ends any call after 30 minutes, and claude.ai sends no progress token,
|
|
4
|
+
// so per-game progress cannot keep the call alive (mcp-utils docs/CLIENT-BEHAVIOUR.md). So the first call starts
|
|
5
|
+
// the run and returns; later calls read its progress, then its result, which is kept at
|
|
6
|
+
// `<dataDir>/calibration/harness.json` (aggregates only, name-free) so a restart still has it.
|
|
7
|
+
//
|
|
8
|
+
// The run goes in a worker thread (src/tools/calibration-worker.ts): each game is synchronous planner work, and on
|
|
9
|
+
// the main thread a long game would hold every other tool call of the server (the play session's) until it ended.
|
|
10
|
+
// Without the worker's file (a test run from src/) it runs on the main thread, yielding between games.
|
|
11
|
+
import { existsSync } from 'node:fs';
|
|
12
|
+
import { readFile } from 'node:fs/promises';
|
|
13
|
+
import { join } from 'node:path';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
import { Worker } from 'node:worker_threads';
|
|
16
|
+
import { writeJsonAtomic } from '../map-store.js';
|
|
17
|
+
import { calibrationHarness } from './calibration-harness.js';
|
|
18
|
+
/** A run is stopped after this long (a stuck worker must not hold the job forever). */
|
|
19
|
+
export const HARNESS_LIMIT_MS = 3 * 60 * 60 * 1000;
|
|
20
|
+
export const harnessFolder = (dir) => join(dir, 'calibration');
|
|
21
|
+
export const harnessResultPath = (dir) => join(harnessFolder(dir), 'harness.json');
|
|
22
|
+
const jobs = new Map();
|
|
23
|
+
/** Forget every job in memory (a restart, in tests). */
|
|
24
|
+
export function resetHarnessJobs() {
|
|
25
|
+
for (const j of jobs.values())
|
|
26
|
+
if (j.state === 'running')
|
|
27
|
+
j.stop();
|
|
28
|
+
jobs.clear();
|
|
29
|
+
}
|
|
30
|
+
async function readSaved(dir) {
|
|
31
|
+
try {
|
|
32
|
+
const v = JSON.parse(await readFile(harnessResultPath(dir), 'utf8'));
|
|
33
|
+
return typeof v.finishedAt === 'string' && typeof v.result === 'object' && v.result !== null ? v : undefined;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const iso = (ms) => new Date(ms).toISOString();
|
|
40
|
+
const minutes = (ms) => Math.round(ms / 60_000);
|
|
41
|
+
/**
|
|
42
|
+
* The harness job over `dir`: starts a run when none is running and none is saved (or `rerun`), else reports
|
|
43
|
+
* the running one or the saved result. Never waits on the run. `peek` reads the state only: it starts nothing and
|
|
44
|
+
* leaves a failure to be reported (`none` when there is no run and no saved result).
|
|
45
|
+
*/
|
|
46
|
+
export async function harnessJob(dir, opts = {}) {
|
|
47
|
+
const now = opts.now ?? Date.now;
|
|
48
|
+
const limit = opts.limitMs ?? HARNESS_LIMIT_MS;
|
|
49
|
+
const job = jobs.get(dir);
|
|
50
|
+
if (job?.state === 'running') {
|
|
51
|
+
const ran = now() - job.startedAt;
|
|
52
|
+
if (ran > limit) {
|
|
53
|
+
job.stop();
|
|
54
|
+
const error = `The harness was stopped after ${minutes(limit)} minute${minutes(limit) === 1 ? '' : 's'} (${job.done} of ${job.total ?? '?'} games done).`;
|
|
55
|
+
jobs.set(dir, { state: 'failed', error });
|
|
56
|
+
return harnessJob(dir, opts);
|
|
57
|
+
}
|
|
58
|
+
const previous = await readSaved(dir);
|
|
59
|
+
return { status: 'running', done: job.done, total: job.total, startedAt: iso(job.startedAt), minutesRunning: minutes(ran), ...(previous ? { previous } : {}) };
|
|
60
|
+
}
|
|
61
|
+
if (job?.state === 'failed') {
|
|
62
|
+
// Reported once: the next call starts again.
|
|
63
|
+
if (!opts.peek)
|
|
64
|
+
jobs.delete(dir);
|
|
65
|
+
return { status: 'failed', error: job.error };
|
|
66
|
+
}
|
|
67
|
+
const saved = await readSaved(dir);
|
|
68
|
+
if (saved && !opts.rerun)
|
|
69
|
+
return { status: 'done', finishedAt: saved.finishedAt, result: saved.result };
|
|
70
|
+
if (opts.peek)
|
|
71
|
+
return { status: 'none' };
|
|
72
|
+
const startedAt = now();
|
|
73
|
+
const running = { state: 'running', startedAt, done: 0, total: null, stop: () => undefined };
|
|
74
|
+
const handle = (opts.run ?? defaultRunner())(dir, (done, total) => {
|
|
75
|
+
running.done = done;
|
|
76
|
+
running.total = total;
|
|
77
|
+
});
|
|
78
|
+
running.stop = handle.stop;
|
|
79
|
+
jobs.set(dir, running);
|
|
80
|
+
handle.done.then(async (result) => {
|
|
81
|
+
if (jobs.get(dir) !== running)
|
|
82
|
+
return;
|
|
83
|
+
try {
|
|
84
|
+
await writeJsonAtomic(harnessResultPath(dir), harnessFolder(dir), { finishedAt: iso(now()), result });
|
|
85
|
+
jobs.delete(dir);
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
jobs.set(dir, { state: 'failed', error: `The harness finished but its result could not be saved: ${messageOf(e)}` });
|
|
89
|
+
}
|
|
90
|
+
}, (e) => {
|
|
91
|
+
if (jobs.get(dir) === running)
|
|
92
|
+
jobs.set(dir, { state: 'failed', error: messageOf(e) });
|
|
93
|
+
});
|
|
94
|
+
return { status: 'started', startedAt: iso(startedAt), ...(saved ? { previous: saved } : {}) };
|
|
95
|
+
}
|
|
96
|
+
const messageOf = (e) => (e instanceof Error ? e.message : String(e)).slice(0, 300);
|
|
97
|
+
/** The worker's file beside this module, as tsc emits it (dist/tools/) or as the bundle sits (dist/). */
|
|
98
|
+
export function workerFile(base = import.meta.url) {
|
|
99
|
+
for (const rel of ['./calibration-worker.js', './tools/calibration-worker.js']) {
|
|
100
|
+
const p = fileURLToPath(new URL(rel, base));
|
|
101
|
+
if (existsSync(p))
|
|
102
|
+
return p;
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
function defaultRunner() {
|
|
107
|
+
const file = workerFile();
|
|
108
|
+
return file ? workerRunner(file) : inProcessRunner;
|
|
109
|
+
}
|
|
110
|
+
/** The harness in a worker thread: it posts `progress`, then `done` or `error`. */
|
|
111
|
+
export function workerRunner(file) {
|
|
112
|
+
return (dir, onProgress) => {
|
|
113
|
+
const worker = new Worker(file, { workerData: { dir } });
|
|
114
|
+
const done = new Promise((resolve, reject) => {
|
|
115
|
+
worker.on('message', (m) => {
|
|
116
|
+
if (m.type === 'progress')
|
|
117
|
+
onProgress(m.done, m.total);
|
|
118
|
+
else if (m.type === 'done')
|
|
119
|
+
resolve(m.result);
|
|
120
|
+
else if (m.type === 'error')
|
|
121
|
+
reject(new Error(m.message));
|
|
122
|
+
});
|
|
123
|
+
worker.on('error', reject);
|
|
124
|
+
worker.on('exit', (code) => reject(new Error(`The harness worker exited (code ${code}) before it finished.`)));
|
|
125
|
+
});
|
|
126
|
+
return { done, stop: () => void worker.terminate() };
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/** The harness on this thread (no worker file): it yields between games and stops between them. */
|
|
130
|
+
export const inProcessRunner = (dir, onProgress) => {
|
|
131
|
+
const stop = new AbortController();
|
|
132
|
+
return { done: calibrationHarness(dir, { progress: onProgress, signal: stop.signal }), stop: () => stop.abort(new Error('The harness was stopped.')) };
|
|
133
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// The worker thread src/tools/calibration-job.ts runs the #318 harness in, so its synchronous planner work never
|
|
2
|
+
// holds the server's other tool calls. It posts `progress` after each game, then `done` with the result (aggregates
|
|
3
|
+
// only, name-free) or `error` with a message.
|
|
4
|
+
import { parentPort, workerData } from 'node:worker_threads';
|
|
5
|
+
import { calibrationHarness } from './calibration-harness.js';
|
|
6
|
+
const port = parentPort;
|
|
7
|
+
if (port) {
|
|
8
|
+
const { dir } = workerData;
|
|
9
|
+
calibrationHarness(dir, { progress: (done, total) => port.postMessage({ type: 'progress', done, total }) }).then((result) => port.postMessage({ type: 'done', result }), (e) => port.postMessage({ type: 'error', message: e instanceof Error ? e.message : String(e) }));
|
|
10
|
+
}
|
|
@@ -10,10 +10,29 @@ import { profileFormatOf } from '../analysis/opponent-profile.js';
|
|
|
10
10
|
import { listDecisionLogs, readDecisionLog } from '../decision-log.js';
|
|
11
11
|
import { holdsSeat } from '../player-states.js';
|
|
12
12
|
import { readGameRecord } from '../replay.js';
|
|
13
|
-
import {
|
|
13
|
+
import { HARNESS_APPROXIMATIONS } from './calibration-harness.js';
|
|
14
|
+
import { harnessJob } from './calibration-job.js';
|
|
14
15
|
import { respond } from './common.js';
|
|
15
16
|
import { mintMeta } from './hints.js';
|
|
16
17
|
import { refuse } from './write-kit.js';
|
|
18
|
+
/** How long a call waits for a harness run before answering with its progress (a small data dir answers at once). */
|
|
19
|
+
export const HARNESS_WAIT_MS = 25_000;
|
|
20
|
+
/**
|
|
21
|
+
* The harness job (src/tools/calibration-job.ts) as one call reads it: started or read, then waited on up to
|
|
22
|
+
* `waitMs` for the result. Never waits longer, so no call outlasts a client's timeout.
|
|
23
|
+
*/
|
|
24
|
+
export async function harnessView(dir, rerun, waitMs = HARNESS_WAIT_MS) {
|
|
25
|
+
let view = await harnessJob(dir, { rerun });
|
|
26
|
+
const until = Date.now() + waitMs;
|
|
27
|
+
while ((view.status === 'started' || view.status === 'running') && Date.now() < until) {
|
|
28
|
+
await new Promise((r) => setTimeout(r, Math.min(500, Math.max(0, until - Date.now()))));
|
|
29
|
+
const peek = await harnessJob(dir, { peek: true });
|
|
30
|
+
if (peek.status === 'none')
|
|
31
|
+
break;
|
|
32
|
+
view = peek.status === 'failed' ? await harnessJob(dir) : peek;
|
|
33
|
+
}
|
|
34
|
+
return view;
|
|
35
|
+
}
|
|
17
36
|
/** Scored rows returned at most with `samples: true`. */
|
|
18
37
|
export const MAX_SAMPLES = 2000;
|
|
19
38
|
export const CALIBRATION_NOTE = 'Each sample is one income estimate a planned turn worked from, against that opponent\'s true income (base plus ' +
|
|
@@ -71,17 +90,23 @@ export function registerCalibrationTool(server, dataDir) {
|
|
|
71
90
|
'two thirds of the truth, the tracker step that held it (rise cap, tripwire, window, could-earn ceiling, ' +
|
|
72
91
|
'ambiguous armies, readings, a later stage, or no track; logged since #586); and what correcting the ' +
|
|
73
92
|
'tracked figure by its coverage band would have read at dampings 0 to 1 (leave one game out). `samples: true` adds the scored rows ' +
|
|
74
|
-
`(at most ${MAX_SAMPLES}), name-free, as a fixture set; \`harness: true\`
|
|
75
|
-
'cached boards (tracker, fog prior and plan estimate by coverage band, and the opening benchmark)
|
|
76
|
-
'
|
|
77
|
-
'
|
|
93
|
+
`(at most ${MAX_SAMPLES}), name-free, as a fixture set; \`harness: true\` adds the #318 harness over the ` +
|
|
94
|
+
'cached boards (tracker, fog prior and plan estimate by coverage band, and the opening benchmark): it runs in the ' +
|
|
95
|
+
'background, since it can take most of an hour on many games, so the first call starts it and later calls say ' +
|
|
96
|
+
'`running` (games done of total) until it is `done`; the result is kept, so a later call returns it at once ' +
|
|
97
|
+
'(`rerun: true` starts a fresh run). Games are numbered by their place in the report, never by id, and no player ' +
|
|
98
|
+
'is named. Makes no war.app request; writes only the harness result, in this server\'s own data. Read-only.',
|
|
78
99
|
annotations: toolAnnotations({ title: 'Income estimate calibration', readOnly: true, destructive: false, idempotent: true, openWorld: false }),
|
|
79
100
|
inputSchema: z.object({
|
|
80
101
|
samples: z.boolean().optional().describe(`Also return the scored rows, name-free (default false; at most ${MAX_SAMPLES}).`),
|
|
81
|
-
harness: z
|
|
102
|
+
harness: z
|
|
103
|
+
.boolean()
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Also the #318 harness over the cached boards and the opening benchmark (default false): started in the background on the first call; call again until its status is `done`.'),
|
|
106
|
+
rerun: z.boolean().optional().describe('With `harness`, start a fresh harness run over a kept result (default false).'),
|
|
82
107
|
format: z.enum(['1v1', 'ffa', 'team']).optional().describe('Only games of this format.'),
|
|
83
108
|
}),
|
|
84
|
-
}, async ({ samples, harness, format }) => {
|
|
109
|
+
}, async ({ samples, harness, rerun, format }) => {
|
|
85
110
|
const dir = dataDir();
|
|
86
111
|
if (!dir)
|
|
87
112
|
refuse('This server has no data directory, so there is nothing to score.', 'Nothing to do here.');
|
|
@@ -89,7 +114,7 @@ export function registerCalibrationTool(server, dataDir) {
|
|
|
89
114
|
const games = format ? src.games.filter((g) => g.format === format) : src.games;
|
|
90
115
|
const report = incomeCalibration(games);
|
|
91
116
|
const rows = samples ? incomeSamples(games) : [];
|
|
92
|
-
const
|
|
117
|
+
const job = harness ? await harnessView(dir, rerun === true) : undefined;
|
|
93
118
|
return respond(undefined, ['compact'], () => ({
|
|
94
119
|
readAs: CALIBRATION_NOTE,
|
|
95
120
|
sources: {
|
|
@@ -107,7 +132,25 @@ export function registerCalibrationTool(server, dataDir) {
|
|
|
107
132
|
"game's history is read (warapp_backfill_history, warapp_my_games' sweep, warapp_get_game on it).",
|
|
108
133
|
}),
|
|
109
134
|
...(samples ? { samples: rows.slice(0, MAX_SAMPLES), ...(rows.length > MAX_SAMPLES ? { samplesLeftOut: rows.length - MAX_SAMPLES } : {}) } : {}),
|
|
110
|
-
...(
|
|
135
|
+
...(job ? { harness: harnessOut(job) } : {}),
|
|
111
136
|
}));
|
|
112
137
|
});
|
|
113
138
|
}
|
|
139
|
+
/** The job as the tool reports it: the result with its approximations, or where the run stands and what to do. */
|
|
140
|
+
function harnessOut(job) {
|
|
141
|
+
switch (job.status) {
|
|
142
|
+
case 'done':
|
|
143
|
+
return { status: 'done', finishedAt: job.finishedAt, ...job.result, approximations: HARNESS_APPROXIMATIONS, note: 'A kept result: `rerun: true` starts a fresh run.' };
|
|
144
|
+
case 'failed':
|
|
145
|
+
return { status: 'failed', error: job.error, note: 'Call again with `harness: true` to start a fresh run.' };
|
|
146
|
+
case 'started':
|
|
147
|
+
case 'running':
|
|
148
|
+
return {
|
|
149
|
+
...job,
|
|
150
|
+
...(job.previous ? { previous: { finishedAt: job.previous.finishedAt, ...job.previous.result, approximations: HARNESS_APPROXIMATIONS } } : {}),
|
|
151
|
+
note: 'The harness runs in the background: call warapp_calibration with `harness: true` again in a few minutes for its progress, then its result.',
|
|
152
|
+
};
|
|
153
|
+
default:
|
|
154
|
+
return job;
|
|
155
|
+
}
|
|
156
|
+
}
|
package/dist/tools/check-plan.js
CHANGED
|
@@ -33,6 +33,7 @@ import { resolveTeamsFor } from './team-source.js';
|
|
|
33
33
|
import { stressOpponents } from './stress-opponents.js';
|
|
34
34
|
import { observedLowWarning } from '../analysis/opponents.js';
|
|
35
35
|
import { statedShiftWarning } from '../analysis/plan/estimates.js';
|
|
36
|
+
import { trackCalibrationDampingFor } from '../analysis/plan/deploy-estimates.js';
|
|
36
37
|
import { sanctionPercentage } from '../analysis/cards-in-effect.js';
|
|
37
38
|
import { CARD_SANCTIONS, sanctionsPlayed } from './sanctions-played.js';
|
|
38
39
|
import { COMMANDER_SIZING, commanderCheckOn, defaultFoggedCount, foggedAttackersArg, foggedCommanderOn, foggedCommanderText, myLargestStack } from './commander-check.js';
|
|
@@ -381,7 +382,7 @@ export function registerCheckPlanTool(server, ctx) {
|
|
|
381
382
|
info,
|
|
382
383
|
...(opening ? { opening } : {}),
|
|
383
384
|
...(mapPace ? { mapPace } : {}),
|
|
384
|
-
...(trackCalibration ? { trackCalibration } : {}),
|
|
385
|
+
...(trackCalibration ? { trackCalibration, trackCalibrationDamping: trackCalibrationDampingFor(profileFormatOf(game.players)) } : {}),
|
|
385
386
|
...(enemy_deploy !== undefined ? { enemyDeploy: enemy_deploy } : {}),
|
|
386
387
|
assumeCards,
|
|
387
388
|
// #444: the stated incomes scale the other opponents' prior, as warapp_plan_turn has them.
|
package/dist/tools/relations.js
CHANGED
|
@@ -24,7 +24,7 @@ import { lookupMeta, mintMeta } from './hints.js';
|
|
|
24
24
|
import { loadLiveGame } from './live-context.js';
|
|
25
25
|
import { BRIDGE_NOTE, playerArg, resolveMe } from './live.js';
|
|
26
26
|
import { mapOf } from './map.js';
|
|
27
|
-
import { recordProfile } from './profile-hook.js';
|
|
27
|
+
import { cardsInPlay, recordProfile } from './profile-hook.js';
|
|
28
28
|
import { resolveBonus, resolvePlayer, resolveTerritory } from './resolve.js';
|
|
29
29
|
import { boardHistory, plannerSettings } from './turn.js';
|
|
30
30
|
import { captureObservation } from './decision-capture.js';
|
|
@@ -248,7 +248,7 @@ export async function updateAgreementRecord(o) {
|
|
|
248
248
|
let context;
|
|
249
249
|
if (agreement.status !== before?.status && (agreement.status === 'broken-by-them' || agreement.status === 'broken-by-me')) {
|
|
250
250
|
const boards = await cachedBoards(dir, game, me);
|
|
251
|
-
breachFlag = strongestFlag(breachWatch({ agreement, graph, boards, me: me.id }));
|
|
251
|
+
breachFlag = strongestFlag(breachWatch({ agreement, graph, boards, me: me.id, ...cardsInPlay(game) }));
|
|
252
252
|
const incomes = incomesOf(graph, boards, game, me, map);
|
|
253
253
|
const partnerIncome = incomes.opponents.get(agreement.with) ?? null;
|
|
254
254
|
context = {
|
|
@@ -495,6 +495,7 @@ export function registerRelationsTools(server, ctx, opts = {}) {
|
|
|
495
495
|
graph,
|
|
496
496
|
boards,
|
|
497
497
|
me: me.id,
|
|
498
|
+
...cardsInPlay(game),
|
|
498
499
|
...(live_ && incomes.mine !== null ? { incomes: { mine: incomes.mine, partner: incomes.opponents.get(a.with) ?? null } } : {}),
|
|
499
500
|
})
|
|
500
501
|
: [];
|
package/dist/tools/turn.js
CHANGED
|
@@ -6,6 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
import { CARD_BLOCKADE, CARD_ORDER_DELAY, CARD_ORDER_PRIORITY, holdsOrderPriority, playsOrderPriority, advisedOrderPriority, CARD_REINFORCEMENT, cardRules, cardTypeByName, cardTypeName, chooseCardPlays, normalizeGuid, cardsToShed, handReadable, isMyCard, readHand, reinforcementArmies, } from '../cards.js';
|
|
7
7
|
import { chargeDeploys, DEFAULT_OFFENSIVE_KILL_RATE, deployPools, expectedKills, specialUnitStrength, winChance, incomeDetail, armyCapPoolsUncertainty, deployCheckUncertainties, unreadSanctionsUncertainty, overrideUncertainties, neighborsOf, PAYBACK_TURNS, planTurn, planEnemyEstimates, repulsedAttacks, borderGuess, guessSeed, AHEAD_PRESSURE_FACTOR, PRESSURE_FACTOR, symmetricStart, unevenStart, trackGame, trackOpponents, } from '../analysis/index.js';
|
|
8
8
|
import { statedShifts, statedShiftWarning } from '../analysis/plan/estimates.js';
|
|
9
|
+
import { trackCalibrationDampingFor } from '../analysis/plan/deploy-estimates.js';
|
|
9
10
|
import { parseGameId } from '../client.js';
|
|
10
11
|
import { COMMANDER_STRENGTH, luckFraction, straightKills } from '../analysis/combat.js';
|
|
11
12
|
import { guardOffExposure } from '../analysis/guard-off.js';
|
|
@@ -1074,6 +1075,8 @@ export function myOrdersOf(orders) {
|
|
|
1074
1075
|
...(o.from !== undefined ? { from: o.from } : {}),
|
|
1075
1076
|
...(o.to !== undefined ? { to: o.to } : {}),
|
|
1076
1077
|
...(o.target !== undefined ? { target: o.target } : {}),
|
|
1078
|
+
// #665: the truce watch counts what an Airlift took out of or landed on a territory.
|
|
1079
|
+
...(o.card === 'Airlift' && o.armies !== undefined ? { armies: o.armies } : {}),
|
|
1077
1080
|
},
|
|
1078
1081
|
]
|
|
1079
1082
|
: []),
|
|
@@ -1318,6 +1321,7 @@ export async function truceRelations(ctx, a) {
|
|
|
1318
1321
|
boards: [...a.boards, { turn, board: a.board }],
|
|
1319
1322
|
me: me.id,
|
|
1320
1323
|
turn,
|
|
1324
|
+
...cardsInPlay(game),
|
|
1321
1325
|
players: game.players.map((p) => ({
|
|
1322
1326
|
id: p.id,
|
|
1323
1327
|
...(p.isAI ? { isAI: true } : {}),
|
|
@@ -1521,7 +1525,7 @@ export async function livePlanSetup(ctx, a) {
|
|
|
1521
1525
|
...(mapPace ? { mapPace } : {}),
|
|
1522
1526
|
// #568: this format's own calibration raises each tracked figure by its coverage band's damped factor
|
|
1523
1527
|
// (none in a 1v1, where the fog prior already lifts the tracker: trackCalibrationFor).
|
|
1524
|
-
...(trackCalibration ? { trackCalibration } : {}),
|
|
1528
|
+
...(trackCalibration ? { trackCalibration, trackCalibrationDamping: trackCalibrationDampingFor(profileFormatOf(game.players)) } : {}),
|
|
1525
1529
|
// #164: an opponent's Reinforcement card, from the turn the card clock says one can be in hand.
|
|
1526
1530
|
...(opponentReinforcement(game.settings, hand) ? { reinforcement: opponentReinforcement(game.settings, hand) } : {}),
|
|
1527
1531
|
// #427: the Reinforcement plays seen in the turns' orders (card plays not fogged): a play restarts the clock.
|
|
@@ -2016,7 +2020,7 @@ async function commanderCheck(ctx, a) {
|
|
|
2016
2020
|
info: a.info,
|
|
2017
2021
|
...(opening ? { opening } : {}),
|
|
2018
2022
|
...(mapPace ? { mapPace } : {}),
|
|
2019
|
-
...(trackCalibration ? { trackCalibration } : {}),
|
|
2023
|
+
...(trackCalibration ? { trackCalibration, trackCalibrationDamping: trackCalibrationDampingFor(profileFormatOf(a.game.players)) } : {}),
|
|
2020
2024
|
});
|
|
2021
2025
|
// #275: an untrusted opponent's reply is sized at least at the figure its tripwire gave it, as
|
|
2022
2026
|
// warapp_check_plan's stress test tries it (read only: warapp_plan_turn keeps the marks).
|
package/dist/trend.js
CHANGED
package/dist/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Single source of truth for the server version. release-please bumps the
|
|
2
2
|
// literal on the marked line (registered in release-please-config.json
|
|
3
3
|
// extra-files); every other module imports VERSION from here.
|
|
4
|
-
export const VERSION = '0.23.
|
|
4
|
+
export const VERSION = '0.23.2'; // x-release-please-version
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "warapp-mcp",
|
|
5
5
|
"display_name": "war.app (Warzone)",
|
|
6
|
-
"version": "0.23.
|
|
6
|
+
"version": "0.23.2",
|
|
7
7
|
"description": "war.app (Warzone) game advisor for Claude — your games, maps, bonuses, board analysis and routes via the GameFeed API, plus your games list (waiting on you first), opponent scouting with your head-to-head, the live board, territory picks, cards, turn planning and submission, turn notifications, and chat through your signed-in war.app tab (ContextMint Bridge). Creating, joining, leaving or surrendering a game, accepting game invitations, closing out a finished game, accepting another player's surrender, a team surrender, a vote to end a game, booting a stalled player, Begin on a speed first turn, picks, turn orders, withdrawing them, chat sends, nudging a player, joining or leaving a ladder, answering a clan invite, joining or leaving a clan, changing quickmatch settings, voting on quickmatch templates, joining or declining a tournament, showing a tournament among your favourites, mail (new threads, replies, adding players, deleting threads), forum posts (new threads, replies, votes, watching a thread), chat reactions, marking notifications and chat read, deleting notifications, importing local history into a hosted server and linking a session (local only) are confirm-gated.",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrischall/warapp-mcp",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
4
4
|
"mcpName": "io.github.chrischall/warapp-mcp",
|
|
5
5
|
"description": "war.app (Warzone) game advisor MCP server for Claude — games, maps, bonuses and board analysis via the GameFeed API, plus your games list, opponent scouting, the live board, territory picks, cards, turn planning and submission, turn notifications and chat through your signed-in war.app tab. Developed and maintained by AI (Claude Code).",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/warapp-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.23.
|
|
9
|
+
"version": "0.23.2",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@chrischall/warapp-mcp",
|
|
14
|
-
"version": "0.23.
|
|
14
|
+
"version": "0.23.2",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|