Skip to content

feat(FR-2440): add CLI command parser utility for Paste Your Command#6341

Open
agatha197 wants to merge 1 commit into04-02-feat_fr-2439_add_paste_your_command_feature_specfrom
04-02-feat_fr-2440_add_cli_command_parser_utility_for_paste_your_command
Open

feat(FR-2440): add CLI command parser utility for Paste Your Command#6341
agatha197 wants to merge 1 commit into04-02-feat_fr-2439_add_paste_your_command_feature_specfrom
04-02-feat_fr-2440_add_cli_command_parser_utility_for_paste_your_command

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 2, 2026

Resolves #6337 (FR-2440)

Summary

  • Add pure TypeScript CLI command parser utility (parseCliCommand.ts) that parses CLI commands (vllm serve, sglang, docker run, etc.) and extracts runtime type, port, GPU hints, docker env vars, and shell-tokenized start_command arrays
  • All client-side parsing for closed-network compatibility — no external API calls
  • Includes shell-aware tokenizer (tokenizeShellCommand) supporting quoted strings, escape characters, and multi-line commands
  • 38 unit tests covering all spec acceptance criteria
  • Add spec files and dev plan for the "Paste Your Command" feature (FR-2438)

@github-actions github-actions bot added the size:XL 500~ LoC label Apr 2, 2026
Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 2, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
9.37% (+0.7% 🔼)
1689/18023
🔴 Branches
8.51% (+0.91% 🔼)
1068/12553
🔴 Functions
5.72% (+0.11% 🔼)
284/4963
🔴 Lines
9.02% (+0.66% 🔼)
1580/17525
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / parseCliCommand.ts
84.43% 73.56% 100% 84.77%

Test suite run success

822 tests passing in 38 suites.

Report generated by 🧪jest coverage report action from ee6fe60

@agatha197 agatha197 marked this pull request as ready for review April 2, 2026 05:22
Copilot AI review requested due to automatic review settings April 2, 2026 05:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the Wave 1 (FR-2440) client-side CLI command parsing utility that will back the upcoming “Paste Your Command” workflow in the Service Launcher UI, plus unit tests and planning/context docs under .specs/.

Changes:

  • Introduce parseCliCommand() + tokenizeShellCommand() utility to detect runtime, port, GPU hint, docker env/port mappings, and produce start_command tokens.
  • Add Jest unit tests covering runtime detection, flag extraction, docker parsing, and spec examples.
  • Add the “Paste Your Command” dev plan and project context tracking docs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
react/src/helper/parseCliCommand.ts New command tokenizer + parser (runtime/port/GPU/docker) for “Paste Your Command”.
react/src/helper/parseCliCommand.test.ts New Jest coverage for tokenizer + parser behaviors and spec examples.
.specs/paste-your-command/dev-plan.md Implementation plan and integration notes for the stacked PRs (FR-2440/2441/2442).
.specs/paste-your-command/.context/tasks.md Task tracking snapshot for the epic waves.
.specs/paste-your-command/.context/progress.md Progress tracking snapshot for the epic.
.specs/paste-your-command/.context/findings.md Placeholder findings/decisions log for the epic.

Pure TypeScript utility that parses CLI commands (vllm serve, sglang,
docker run, etc.) and extracts runtime type, port, GPU hints, docker
env vars, and shell-tokenized start_command arrays. All client-side
parsing for closed-network compatibility. Includes 38 unit tests
covering all spec acceptance criteria.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants