Build & Test — Phoenix Agentic Engine Interface (TypeScript SDK)
Mandatory first step: terminal scope check
Before build/test commands, verify terminal scope:
Set-Location "C:\Users\rivie\vsCodeProjects\Phoenix-Agentic-Engine-Interface"Get-Locationgit rev-parse --show-toplevelgit branch --show-current
If scope is wrong, open a fresh Interface-scoped terminal and retry.
Repo Identity
This is the public Interface SDK (TypeScript). It defines contracts between Engine and Backend.
Quick Commands
# Install dependencies
npm install
# TypeScript compilation
npm run build
# Lint
npm run lint
# Type-check only (no emit)
npm run typecheck
# Run all tests (contract + compatibility)
npm test
# Watch mode during development
npm run test:watch
# Local smoke test against configured public gateway URL
npm run test:smoke
Validation checklist
- Lint passes —
npm run lintmust succeed with zero errors - Typecheck passes —
npm run typecheckmust succeed with zero errors - All tests pass —
npm test(vitest) - Golden fixtures valid — contract tests in
tests/contract/must pass - Build succeeds —
npm run buildcompiles without errors
Testing rules
- All contract and compatibility tests must pass before merging
- Tests must be deterministic — no network access (except explicit smoke tests)
- Golden fixture compatibility tests must pass — fixture drift is a breaking change
- Smoke tests (
npm run test:smoke) requirePHOENIX_PUBLIC_GATEWAY_URL(typically App Service URL)
Contract fixture locations
Golden fixtures live in contracts/v1/:
session_start.request.json/session_start.response.jsondelta_update.request.json/delta_update.response.jsontask_request.request.json/task_request.response.jsonapproval_decision.request.json/approval_decision.response.jsonauth_handshake.response.jsontools_list.response.jsontools_invoke.request.json/tools_invoke.response.json
Common issues
| Error | Fix |
|---|---|
| Type errors after fixture change | Update types in sdk/client/types.ts to match new fixture shape |
| Vitest failures | Check vitest.config.ts and ensure npm install was run |
strict: true errors |
Fix type annotations — do not disable strict mode |
| Fixture drift | Sync Interface contracts/v1 with Backend contracts/fixtures/v1 |