Project workflows
- Build:
npm run build(cleansdist/, runstsc, chmodsdist/index.js). - Run (prod):
npm run start(executesnode dist/index.js). - Run (dev):
npm run dev(build then rundist/index.js). - Tests:
npm run test(Vitest run),npm run test:watch, andnpm run test -- tests/codex-backend.test.tsfor Codex backend regressions. - Typecheck:
npm run lint(tsc --noEmit). - Docs:
npm run docs:dev,npm run docs:build,npm run docs:preview(VitePress).
Maintenance scripts
- Wiki deploy:
./scripts/deploy-wiki.sh(requireswiki-enhanced.mdat repo root andghinstalled; pushes to the GitHub wiki). - Session integration test:
node ./scripts/test-all-sessions.js(expectsdist/to be built first). - Version bump:
npm run bump-version -- <version|major|minor|patch|premajor|preminor|prepatch|prerelease>(updatespackage.json, syncssrc/index.ts, regeneratespackage-lock.json, verifies root metadata/bin aliases, and rebuilds committeddist/).
Guardrails from recent commits
- Tool registry source of truth is
src/tools/index.ts; keep only stable/public tools registered. Do not leave deprecated aliases (for exampleask-gemini) or test-only tools (for exampletimeout-test) in the registry. dist/is intentionally committed fornpx/GitHub usage; after source changes, runnpm run buildand include matchingdist/updates in the same change.- For release/version chores, use
npm run bump-version -- <target>instead of editing version metadata by hand; it is the expected path for keepingpackage.json,package-lock.json,src/index.ts, and committeddist/index.jssynchronized. - Keep package CLI entrypoint aliases stable during release chores; preserve
gemini-mcp-tool,gemini-mcp, andllm-cli-bridgebin mappings unless intentionally making a breaking change. - After package rename/version changes, verify lockfile root package identity (
nameandpackages[""].name) matchespackage.json. - For Codex CLI execution, place global flags (
-m,-a,-s,--config) beforeexec; resume flows usecodex exec resume <threadId>. - For Codex reasoning effort, use
--config model_reasoning_effort="<level>"(not--reasoning-effort). - Codex JSON parsing must include
item.completedevents with nestedagent_messagepayloads, not only legacy event shapes. - When changing Codex backend argument building or JSON parsing, update/add coverage in
tests/codex-backend.test.tsand runnpm run test -- tests/codex-backend.test.ts. - Sessions are stored under
~/.ai-cli-mcp/sessions/<tool-name>/; keep legacy read compatibility from~/.gemini-mcp/sessions/<tool-name>/during migration.