1. **`ai_diplomacy` Directory:**
* I've fully converted all Python files to TypeScript.
* This included agent logic, LLM client wrappers, game history management, planning, negotiation, and prompt construction modules.
* I also added dependencies like `json5` and `csv-writer`.
2. **`diplomacy/client` Directory:**
* I've fully converted all Python files to TypeScript.
* I translated `Channel`, `Connection` (using `ws` for WebSockets), `GameInstancesSet`, `NetworkGame`, and notification/response management.
* I also adapted Tornado-based async patterns to Node.js `async/await` and `EventEmitter`.
3. **`diplomacy/communication` Directory:**
* I've fully converted all Python files to TypeScript.
* I defined TypeScript interfaces for all request, response, and notification messages, including base types and parsing functions.
4. **`diplomacy/daide` Directory:**
* I've fully converted all Python files, including server-side components and tests.
* I translated DAIDE token, clause, and message parsing/serialization logic.
* I converted the DAIDE server (`DaideServer`, `ConnectionHandlerTs`) to use the Node.js `net` module.
* I translated DAIDE-specific request/response/notification types.
* I ported the DAIDE tests to Jest, including a client communication simulator.
5. **`diplomacy/engine` Directory (Partial Conversion):**
* I converted `__init__.py`.
* I converted `map.py` to `map.ts`: The `DiplomacyMap` class structure has been created. Core functionality like the constructor, caching, basic adjacency, and some `load()` directive parsing (for map files) are implemented. The full `load()` method and complex validation are partially complete.
* I converted `power.py` to `power.ts`: The `PowerTs` class is fully translated with properties and methods.
* I converted `message.py` to `message.ts`: The `DiplomacyMessage` class has been translated.
* I initiated the conversion of `game.py` to `game.ts`: The `DiplomacyGame` class structure has been created, and the constructor, properties, and some basic/setup methods have been translated. The core, complex adjudication logic is largely stubbed out.
**Overall Status:**
I've made significant progress, particularly in the `ai_diplomacy`, `diplomacy/client`, `diplomacy/communication`, and `diplomacy/daide` modules. The `diplomacy/engine` module, which contains the core game logic, is my current focus and is partially converted. The most complex parts of the engine (adjudication in `game.ts` and full map parsing in `map.ts`) require substantial further work. Many other directories and test suites also remain to be converted.
Sometimes there is an animation missing, or we can't find the unit we
expect to find for the animation, and it throws an error. This was
cancelling the move forward. "Fixing" with a catch for now.
Updated some of the start game functionality to properly reject the
promises so we can catch them later and update them. Updated tsNoCheck
so that we can build without it screaming about type errors
The git gods appear to have swallowed the code I previously wrote for
loadNextGame. Here is a fix for that. The games load in order, from 0 =>
infinity (more likely max of int).
When creating a game.json, you can set the top level key "power" to any
valid key of PowerENUM and the game will always run from that power's
perspective.
Adding diary, name of powers, name of moment type, and some supporting
thoughts.
Added a debug menu item to disable or enable the eleven labs speech.
Useful for removing it when debugging
The moments are now triggered correctly and have the phases happen as
expected.
Also added an instant chat tool that skips the playing out of all the
messages and instead lets us quickly move through a game
Adds a debug panel that allows typing province names to highlight them on the map with a flashing yellow animation. Only visible when debug mode is enabled.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>