Contributing
Thank you for your interest in contributing to @cognipeer/agent-server!
Development Setup
- Clone the repository:
bash
git clone https://github.com/Cognipeer/agent-server.git
cd agent-server- Install dependencies:
bash
npm install- Start development mode:
bash
npm run devRunning Tests
bash
npm testThe storage tests (test/storage/, and the human-in-the-loop tests) run against all four storage providers with real databases: memory, SQLite (better-sqlite3), MongoDB and PostgreSQL. Nothing needs to be set up by hand:
- MongoDB:
mongodb-memory-serverstarts amongod(MONGOMS_VERSION, default 7.0.14). SetMONGODB_URLto use a server you run instead. - PostgreSQL: set
PG_URLto use a server you run; otherwise the tests start one throwawaypostgres:16-alpinedocker container on a random port and remove it afterwards.AGENT_SERVER_TEST_PG=offskips it. - A provider that cannot run on your machine is reported as a skipped suite with the reason. CI sets
REQUIRE_ALL_PROVIDERS=1, which turns every skip into a failure.
runStorageContract (test/storage/contract.ts) is the provider contract; a new provider (or a change to an existing one) must pass it. See Custom Storage.
Building
bash
npm run buildCode Style
We use ESLint for code linting:
bash
npm run lintPull Requests
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
Reporting Issues
Please report bugs and feature requests on GitHub Issues.

