Repository navigation
feat(typescript): migrate codebase to TypeScript - #9
Merged
Merged
Conversation
P0 baseline toolchain (tsconfig NodeNext, @swc/jest, typecheck/build scripts). P1 leaf modules (retry, contracts, anthropic). P2 tool-runtime middle layer. P3 split proxy.js 3999 lines into errors/config/backend/stream/routes. P4 core to TS with src/types. P5 switch start/Docker/CI to dist, sync docs. typecheck/build/test 191 green.
1. index.ts resolves config.json from dist sibling, project root, and cwd (prod dist/index.js could not find root config). 2. Remove dead isOperationalEndpointBypassed helper. 3. Drop 16 unused imports + void retention block in proxy.ts (6 used imports kept). 4. Restore || merge semantics for numeric config to match original JS.
parseToolAllowlist array branch back to || (drop 0/false entries). readFileNumber falls through on 0 like fileConfig.X || default. buildBackendAuthHeaders coerces truthy non-strings via String() as before. Document that Docker images do not bake local config.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
全量 TS 遷移,P0-P5 分階段執行,每階段 review/fix 循環,最終 3 組全面 review 通過。
驗證:tsc --noEmit 0錯、npm run build 綠、npm test 7 suites/191 tests 綠、node dist smoke /health 200、docker build+run smoke 通過。