feat(project): run npm install, uv sync, and git init after scaffolding - #1872
Open
tejaskash wants to merge 8 commits into
Open
feat(project): run npm install, uv sync, and git init after scaffolding#1872tejaskash wants to merge 8 commits into
tejaskash wants to merge 8 commits into
Conversation
tejaskash
commented
Jul 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #1872 +/- ##
============================================
- Coverage 96.01% 96.00% -0.01%
============================================
Files 211 212 +1
Lines 9837 9938 +101
============================================
+ Hits 9445 9541 +96
- Misses 392 397 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tejaskash
force-pushed
the
feat/project-create-post-scaffold
branch
from
July 30, 2026 15:46
051a519 to
0a39922
Compare
tejaskash
force-pushed
the
feat/project-create-post-scaffold
branch
2 times, most recently
from
July 30, 2026 18:40
b00c46a to
e52b56e
Compare
Hweinstock
reviewed
Jul 31, 2026
tejaskash
force-pushed
the
feat/project-create-post-scaffold
branch
from
July 31, 2026 16:51
e52b56e to
1516d07
Compare
tejaskash
added a commit
that referenced
this pull request
Jul 31, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
tejaskash
force-pushed
the
feat/project-create-post-scaffold
branch
from
July 31, 2026 16:56
1516d07 to
aa2cb04
Compare
tejaskash
added a commit
that referenced
this pull request
Jul 31, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
Hweinstock
previously approved these changes
Jul 31, 2026
After writing the project tree, `project create` now installs CDK dependencies (npm install), syncs Python dependencies (uv sync, when the template ships a pyproject.toml), and initializes a git repository — skippable via --skip-install and --skip-git. - src/io/exec.ts: minimal subprocess runner + tool-on-PATH check with modeled errors (MissingToolError, CommandFailedError). Uses node:child_process instead of Bun.$ because the npm bundle targets Node, where Bun APIs are unavailable. - Progress steps and the success message stream to stderr through the injected AppIO; subprocess output streams to the file logger and is surfaced in the terminal only on failure, with a retry hint. - A failed step keeps the scaffolded files (crash-only): the error tells the user how to rerun the step manually. - Template gains a README (getting-started guide recommending Strands) wired through pyproject.toml — uv sync previously failed on hatchling metadata validation because the declared README did not exist.
…t PATH CI runners don't have uv installed; FsProjectManager's requireTool calls ran against the real PATH even with the fake command runner. checkTool is now injectable alongside runner, defaulting to the real requireTool.
runCommand spawns through cmd.exe on Windows (shell: true for PATHEXT resolution), which mangles the quoting of node -e one-liners — the 'boom; exit 3' script never ran, so the process exited 0 and the rejection assertion failed. Write the scripts to temp files instead.
…ents - Rename CommandRunner/runCommand/CommandFailedError to ProcessRunner/runProcess/ProcessFailedError: 'command' collides with the CLI's own command vocabulary; 'process' mirrors child_process. - Replace the PATH-probing toolOnPath with toolAvailable, which runs '<tool> --version' — simpler and more reliable than reimplementing PATH/PATHEXT resolution. - onProgress now emits a structured CreateProgressEvent instead of a bare string, leaving room for richer step info without a breaking change.
The emptiness check counted the parsed flags object, where schema and Commander boolean defaults arrive as defined values — a leaf with any defaulted flag (list --max-results, create --template/--skip-*) could never open the TUI on a bare invocation. Use Commander's getOptionValueSource to count only flags the user actually passed, so mounting withTuiOnEmptyFlagsAndArgs on the project router later works with the defaulted create flags.
Routes a real command tree with fully-defaulted flags: bare invocation opens the TUI (TTY error under testIO), explicitly passed defaulted or value flags and --json run the handler.
tejaskash
force-pushed
the
feat/project-create-post-scaffold
branch
from
July 31, 2026 20:19
7d9f510 to
cf22add
Compare
- toolAvailable/requireTool take probeArgs (default --version) for tools like ssh that only support -V. - Collapse the three headless-branch middleware tests into test.each and drop the over-explaining harness comment.
Hweinstock
approved these changes
Jul 31, 2026
tejaskash
added a commit
that referenced
this pull request
Aug 3, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
tejaskash
added a commit
that referenced
this pull request
Aug 3, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
tejaskash
added a commit
that referenced
this pull request
Aug 3, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
tejaskash
added a commit
that referenced
this pull request
Aug 3, 2026
The first executable slice of agentcore project dev. CodeZipDevRunner bootstraps a uv venv (or node_modules) on first run, then serves the entrypoint with uvicorn --reload (or tsx watch). spawnServer owns process lifecycle: line-streamed logs, SIGTERM->SIGKILL escalation on stop, and a process-group reaper so a detached server can't outlive the CLI and hold the port. The DevRunner interface lives with its consumer (handlers/project/dev), per the dependency-inversion convention. Command execution and server spawning are injectable, so runner tests never start real uv or uvicorn; process tests use real short-lived node processes because process handling is the thing under test. run.ts duplicates the CommandRunner shape from #1872 deliberately; fold into src/io/exec.ts once that lands.
notgitika
approved these changes
Aug 4, 2026
notgitika
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me thanks!
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.
Summary
Stacked on #1809. After writing the project tree,
agentcore project createnow finishes the job so the scaffolded project is immediately usable:npm installin<project>/agentcore/cdkuv syncin<project>/app/<agent>(when the template ships apyproject.toml)git initat the project rootNew flags:
--skip-install(skips npm + uv) and--skip-git.Testing
bun test(7 new exec tests, 5 new manager tests, 2 new handler tests); manifest snapshot updated for the README; tsc + Prettier clean.npm install(captured output + retry hint),--json(stdout empty, progress on stderr), duplicate/reserved names,--help.