{
  "name": "@bytelyst/trading-backend",
  "version": "0.1.0",
  "type": "module",
  "description": "ByteLyst Trading backend and execution control service",
  "main": "index.js",
  "scripts": {
    "test": "npm run check:websocket-contract && npm run check:session-rule-normalization && npm run check:api-contract && npm run check:audit-repository && npm run check:market-data-endpoints && npm run check:chat-copilot-contract && npm run check:chat-copilot-fallbacks && npm run check:fmp-cache && npm run check:backtest-strategy-safety",
    "dev": "node --import tsx src/bootstrap.ts",
    "build": "tsc",
    "typecheck": "tsc --noEmit",
    "start": "node dist/backend/src/bootstrap.js",
    "check:schema-contract": "node --import tsx verifySchemaContract.ts",
    "check:rls-policies": "node --import tsx verifyRlsPolicies.ts",
    "check:secret-hygiene": "node --import tsx verifySecretHygiene.ts",
    "check:security-guards": "node --import tsx verifySecurityGuards.ts",
    "check:tenant-isolation": "node --import tsx verifyTenantIsolation.ts",
    "check:trade-executor-lifecycle": "node --import tsx testTradeExecutorLifecycle.ts",
    "check:lifecycle-regressions": "node --import tsx testLifecycleRegressions.ts",
    "check:order-sync-regressions": "node --import tsx testOrderStatusSyncRegressions.ts",
    "check:supabase-order-persistence-regressions": "node --import tsx testSupabaseOrderPersistenceRegressions.ts",
    "check:failure-injection": "node --import tsx testFailureInjection.ts",
    "check:alpaca-subtag": "node --import tsx testAlpacaSubTag.ts",
    "check:strict-capital-guard": "node --import tsx testStrictCapitalGuard.ts",
    "check:reconciliation-parity-heartbeat": "node --import tsx testReconciliationParityHeartbeat.ts",
    "check:reconciliation-watchdog-auto-resume": "node --import tsx testReconciliationWatchdogAutoResume.ts",
    "check:reconciliation-exit-backfill-evidence-guard": "node --import tsx testReconciliationExitBackfillEvidenceGuard.ts",
    "check:backtest-isolation": "node --import tsx testBacktestIsolation.ts",
    "check:session-rule-normalization": "node --import tsx testSessionRuleNormalization.ts",
    "check:api-contract": "node --import tsx verifyApiContract.ts",
    "check:audit-repository": "node --import tsx verifyAuditRepository.ts",
    "check:market-data-endpoints": "node --import tsx verifyMarketDataEndpoints.ts",
    "check:chat-copilot-contract": "node --import tsx verifyChatCopilotContract.ts",
    "check:chat-copilot-fallbacks": "node --import tsx testChatCopilotFallbacks.ts",
    "check:fmp-cache": "node --import tsx testFmpCache.ts",
    "check:backtest-strategy-safety": "node --import tsx testBacktestStrategySafety.ts",
    "check:websocket-contract": "node --import tsx src/scripts/verifyWebsocketContract.ts",
    "coverage:run": "node --loader ts-node/esm runCoverageSuite.ts",
    "coverage:full": "npm run coverage:integration",
    "coverage:integration": "c8 --all --include=src/**/*.ts --exclude=src/index.ts --exclude=src/scripts/** --reporter=text-summary --reporter=json-summary --reporter=lcov node --loader ts-node/esm runCoverageSuite.ts",
    "coverage": "c8 --all --include=src/domain/tradingEnums.ts --include=src/utils/symbolMapper.ts --include=src/connectors/factory.ts --check-coverage --lines 80 --functions 80 --branches 80 --statements 80 --reporter=text-summary --reporter=json-summary --reporter=lcov npx tsx runCriticalCoverageSuite.ts",
    "reconcile:lifecycle-history": "node --loader ts-node/esm reconcileTradeHistoryLifecycle.ts",
    "reconcile:exit-backfill-once": "node --loader ts-node/esm reconcileExitBackfillOnce.ts",
    "reconcile:missing-order-coverage": "node --loader ts-node/esm reconcileMissingOrderCoverage.ts",
    "reconcile:closed-order-fill-data": "node --loader ts-node/esm reconcileClosedOrderFillData.ts",
    "reconcile:subtag-repair": "node --loader ts-node/esm reconcileSubTagRepair.ts",
    "reconcile:attribution-repair": "node --loader ts-node/esm reconcileAttributionRepair.ts",
    "reconcile:capital-ledger-state": "node --loader ts-node/esm reconcileCapitalLedgerState.ts",
    "lint": "npm run check:schema-contract && npm run check:rls-policies && npm run check:secret-hygiene && npm run check:security-guards && npm run check:tenant-isolation",
    "format": "npm run check:trade-executor-lifecycle && npm run check:lifecycle-regressions && npm run check:order-sync-regressions && npm run check:supabase-order-persistence-regressions && npm run check:failure-injection && npm run check:alpaca-subtag && npm run check:strict-capital-guard && npm run check:reconciliation-parity-heartbeat && npm run check:reconciliation-watchdog-auto-resume && npm run check:reconciliation-exit-backfill-evidence-guard && npm run check:backtest-isolation && npm run check:session-rule-normalization && npm run check:websocket-contract",
    "check": "npm run build && npm run lint && npm run format",
    "pre-deploy": "npm run check",
    "cleanup-stale-orders": "node --import tsx src/scripts/cleanupStaleOrders.ts",
    "revert-expired-orders": "node --import tsx src/scripts/revertExpiredOrders.ts"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@azure/cosmos": "^4.3.0",
    "@azure/identity": "^4.10.0",
    "@azure/keyvault-secrets": "^4.9.0",
    "@bytelyst/auth": "file:../vendor/bytelyst/auth",
    "@bytelyst/config": "file:../vendor/bytelyst/config",
    "@bytelyst/cosmos": "file:../vendor/bytelyst/cosmos",
    "@bytelyst/llm": "file:../vendor/bytelyst/llm",
    "@alpacahq/alpaca-trade-api": "^3.1.3",
    "@supabase/supabase-js": "^2.90.1",
    "@types/cors": "^2.8.19",
    "@types/express": "^5.0.6",
    "ccxt": "^4.5.31",
    "cors": "^2.8.5",
    "dotenv": "^17.2.3",
    "express": "^5.2.1",
    "jose": "^6.1.2",
    "prom-client": "^15.1.3",
    "socket.io": "^4.8.3",
    "winston": "^3.19.0"
  },
  "devDependencies": {
    "@types/node": "^25.0.3",
    "c8": "^10.1.3",
    "ts-node": "^10.9.2",
    "tsx": "^4.21.0",
    "typescript": "^5.9.3"
  }
}
