All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
EventsandGoOptionsare now re-exported from the package root — consumers can import them directly:import UCI, { type GoOptions } from '@echecs/uci'
start()no longer re-sendssetoptioncommands on every call — engine config is now applied exactly once after the UCI handshake
- README updated to reflect v3.0.0 API (constructor
configoption,GoOptions, pondering, correctedstop()/reset()descriptions,sbhitsinInfoCommand) - CHANGELOG: moved
reset()andstop()entries fromAddedtoChanged
GoOptionsinterface — typed parameters forgocommand:wtime,btime,winc,binc,movestogo,movetime,nodes,mate,searchmoves,depthstart(options?: GoOptions)— time controls and search limits as typed optionsmove(input, options?: GoOptions)— per-move time controls forwarded togo- Constructor
configoption —setoptionoverrides applied once after UCI handshake:new UCI(path, { config: { Hash: 64 } }) ponder(move, options?)— sendsgo ponderfor pondering on a move; guards against double-callponderhit()— commits ponder move, switches engine from ponder to normal searchsbhitsfield onInfoCommand— Shredder endgame database hits
start()parameter changed fromRecord<string, unknown>(setoptions) toGoOptions(search parameters) — breaking change- Engine
setoptionoverrides now passed via constructorconfigoption instead ofstart()argument reset()now sendsucinewgamebeforeposition startposstop()now clears pondering state
// v2
const uci = new UCI('/path/to/engine');
await uci.start({ MultiPV: 4, Hash: 128 });
// v3
const uci = new UCI('/path/to/engine', { config: { Hash: 128 } });
uci.lines = 4; // MultiPV is still set via the lines property
await uci.start(); // no args needed for engine config
await uci.start({ movetime: 1000 }); // time-controlled searchdebug(on)— sendsdebug on/debug offto the engineEventsinterface exported fromsrc/types.ts— consumers can now type their listeners directly[Symbol.dispose]()— sendsquitand terminates the engine process (replaces usingstop()for shutdown)stop()— now correctly sendsstop(halts search, keeps engine alive)
UCIno longer extendsEmittery— the public event API is now limited to expliciton(),off(), andonce()methods. Emittery internals (onAny,offAny,anyEvent,clearListeners,listenerCount,bindMethods) are no longer accessible.ready()now fails fast on process exit or timeout instead of hanging indefinitely — errors are emitted on the'error'event
stop()was sendingquitinstead ofstopcombooptionvarvalues were parsed as a single string instead of an array, breaking option validationlowerbound/upperboundscore flags now parsed order-independentlystart()now emits an error instead of throwing when the engine handshake fails
Initial public release.
UCIclass — wraps a UCI chess engine process with a typed event-emitter API- Full UCI handshake (
uci,isready,uciok,readyok) start(options?)— appliessetoptionoverrides and sendsgomove(move)— sends a move in long algebraic notation and restarts searchstop()— sendsquitand terminates the engine processreset()— resets position tostartposexecute(command)— sends an arbitrary UCI command stringdepthandlinesproperties for controlling search parameterspositionsetter for FEN orstartpos- Typed
infoevents: depth, selective depth, score (cp/matewithlowerbound/upperbound), PV moves, nodes, NPS, time, hashfull, CPU load - Typed
bestmove,id,option,copyprotection,registration,error,output,readyok,uciokevents - Engine option validation via Zod schemas