Commit graph

2 commits

Author SHA1 Message Date
chirag-nighut
1e309c1ec1 fix: address PR review — remove redundancies and add wiki help test
- Cache detectCursorCLI() result to avoid spawning `agent --version`
  on every LLM call
- Fix stale JSDoc in cursor-client.ts (no longer uses stdin or
  stream-json)
- Remove unused WikiOptions fields (model, baseUrl, apiKey) that were
  passed but never read by WikiGenerator
- Fix inconsistent progress callback phase tracking in --review
  continuation path
- Add wiki CLI help test covering --provider, --review, --verbose flags

Made-with: Cursor
2026-03-25 11:39:37 +05:30
Shockang
9d5ec5d19a
Improve MCP startup compatibility and lazy-load CLI commands (#207)
* Fix MCP startup transport compatibility

* Preserve CLI flags in MCP startup fix

* Harden MCP transport error handling

* Harden transport security and improve type safety

Transport hardening:
- Add MAX_BUFFER_SIZE (10 MB) cap to prevent OOM from oversized
  Content-Length or unbounded newline-delimited input
- Replace recursive readNewlineMessage with iterative loop to prevent
  stack overflow from consecutive empty lines
- Tighten looksLikeContentLength to require 14+ bytes before matching
- Add closed-state guard and error handling to send()
- Simplify processReadBuffer loop to break on error
- Fix loose equality (==) to strict (===)
- Widen constructor param types to ReadableStream/WritableStream

Type safety:
- Constrain createLazyAction generics so export name is validated
  against the module's actual exports at compile time
- Use proper type guard instead of lint suppression
- Fix test tsconfig type errors

Regression tests for all hardening fixes (13 tests passing).

---------

Co-authored-by: Gergo Magyar <gergomagyar@icloud.com>
2026-03-07 07:47:09 +00:00