Skip to content

Feat/ts tools#130

Open
kartikloops wants to merge 51 commits into
The-OpenROAD-Project:feat/ts-migrationfrom
kartikloops:feat/ts-tools
Open

Feat/ts tools#130
kartikloops wants to merge 51 commits into
The-OpenROAD-Project:feat/ts-migrationfrom
kartikloops:feat/ts-tools

Conversation

@kartikloops

Copy link
Copy Markdown
Collaborator

The full business logic layer is complete. This covers the PTY session management (spawning OpenROAD processes, reading output, handling termination), all 10 MCP tools with identical input/output schemas to the Python server, the command whitelist with security fixes that go beyond the Python baseline, report image listing and compression, settings, ANSI output cleaning, and path validation.

402 unit tests cover all of the above, plus an integration script that validates the full lifecycle against a real OpenROAD process.

kartikloops and others added 30 commits June 16, 2026 11:31
* add vscode workspace settings for typescript sdk path

* add plan doc

* add core session state and error models

* add interactive session error models

* add circular buffer for pty output

* add pty handler for managing node-pty processes

* add interactive session manager

* add tests for circular buffer

* add tests for command validation

* add tests for pty handler

* add tests for interactive session

* update eslint config with coverage ignore and stricter rules

* fix pending waiters, env cast and resolver types in pty handler

* guard read chunk size against zero in session onData handler

* add test for cleanup resolving pending waitForExit waiters

* add real openroad repl integration check script

* code cleanup

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kartik Mittal <100078751+kartikloops@users.noreply.github.com>

* added case for READ_CHUNK_SIZE is larger than limit

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kartik Mittal <100078751+kartikloops@users.noreply.github.com>

* fix isAlive signaling shutdown when process death is detected

* add test for isAlive shutdown signal on process death

* fix force terminate returning before alive flag clears

* update tests for force terminate waiting for exit

* fix terminate not disposing pty listeners and pending waiters

* update terminate tests to assert pty cleanup is called

* fix clear not waking pending waitForData callers

* add regression test for clear waking pending waitForData callers

* signal shutdown in readOutput drain path so writer task does not loop indefinitely

* add regression test for readOutput signaling shutdown on dead session

* fix waitForData not re-checking dataAvailable under mutex after runExclusive

* add regression test for waitForData race between fast-path check and mutex

* handle append rejection in onData handler to avoid silent data loss

* add regression test for append rejection transitioning session to terminated

* move MacOSPTYHandler to production and add create_pty_handler factory

* use create_pty_handler so macOS gets the keepalive and drain subclass

* remove duplicate MacOSPTYHandler from test file and import from production

* remove MacOSPTYHandler and create_pty_handler — not needed for PoC

* await SIGKILL exit in terminateProcess so cleanup cannot race the exit listener

* block path traversal sequences in validateCommand argument check

* reject absolute paths in python validateCommand to match typescript behavior

* truncate single oversized chunk to maxSize to enforce capacity invariant

* throw on unrecognised boolean env vars and lazily init settings to prevent silent security disable

* fix ansi decoder escape coverage, annotate mode cr handling, mode validation and pre-compile sequence patterns

* wait for exit after kill() throw to observe natural death rather than returning blind

* bound waitForExit after SIGKILL to 5s to prevent indefinite hang on D-state processes

* revert python absolute path change and align typescript to accept absolute paths via basename check

* revert python pty handler and integration test to main

---------

Signed-off-by: Kartik Mittal <100078751+kartikloops@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…annot be bypassed via catch/if/foreach or set x [exec ls]
Copilot AI review requested due to automatic review settings June 18, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kartikloops

Copy link
Copy Markdown
Collaborator Author

@luarss Once PR #127 gets merged I will rebase this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants