Summary
Migrate the 3 remaining unblocked CJS modules in bin/lib/ to TypeScript:
File
Lines
Notes
resolve-openshell.js
58
Path resolution for openshell binary, DI-friendly
version.js
43
Reads package.json + git describe for CLI version
chat-filter.js
29
New file, small utility
Total: ~130 lines. This completes the "everything not blocked is converted" goal.
Approach
For each file:
Write the TS implementation in src/lib/
Replace bin/lib/*.js with a thin re-export shim: module.exports = require("../../dist/lib/...")
Co-locate tests in src/lib/*.test.ts, importing from ../../dist/lib/ for coverage attribution
Follow the established pattern from refactor(cli): extract pure functions from onboard.js to typed TypeScript modules #1240 , refactor(cli): migrate preflight.js to TypeScript #1262 , refactor(cli): migrate inference-config.js to TypeScript #1265 , refactor(cli): migrate runtime-recovery.js to TypeScript #1268 , refactor(cli): migrate local-inference.js to TypeScript #1270 , refactor(cli): migrate nim.js to TypeScript #1271 , refactor(cli): migrate onboard-session.js to TypeScript #1272
Can be done as one PR (all 3 files are small and independent) or three separate PRs.
Context
Not blocked by
Any of the #924 blocker PRs (#781 , #782 , #819 , #672 , #794 , #634 ).
Summary
Migrate the 3 remaining unblocked CJS modules in
bin/lib/to TypeScript:resolve-openshell.jsversion.jschat-filter.jsTotal: ~130 lines. This completes the "everything not blocked is converted" goal.
Approach
For each file:
src/lib/bin/lib/*.jswith a thin re-export shim:module.exports = require("../../dist/lib/...")src/lib/*.test.ts, importing from../../dist/lib/for coverage attributionCan be done as one PR (all 3 files are small and independent) or three separate PRs.
Context
Not blocked by
Any of the #924 blocker PRs (#781, #782, #819, #672, #794, #634).