feat(project): add project-aware invoke - #2115
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## refactor #2115 +/- ##
============================================
- Coverage 97.41% 97.30% -0.11%
============================================
Files 453 459 +6
Lines 27637 28054 +417
============================================
+ Hits 26922 27299 +377
- Misses 715 755 +40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Nice split: the shared invokeRuntimeTarget / invokeHarnessTurn helpers cleanly refactor the existing handlers into reusable operations, the new project-level invoke composes those without duplication, and the resolveDeployedResource layering (manager → backend → deployment helpers) is easy to follow. Tests use real temp dirs + fake backends, and only mock at true I/O boundaries (readStack, per the guidelines).
One thing worth double-checking before this fully lights up end-to-end:
src/core/project/backends/cdk/deployment.ts:28looks up harnesses by CloudFormation export name${stackName}-Harness-${resourceName}-Id. Scanningagentcore-l3-cdk-constructs, the harness constructs (AgentCoreHarnessEnvironment,AgentCoreHarnessRole,AgentCoreApplication) currently only emitHarness-<name>-RoleArnandHarness-<name>-ImageUrioutputs — noHarness-<name>-Id. Runtime lookup will work today (AgentEnvironment.tsemits<agentName>-RuntimeId), butagentcore invoke --harness ...will always fail with the "not deployed" error until the L3 emits that export. If a coordinated L3 change is in flight this is fine; if not, this handler and its export-name contract will need to land together with the construct change (and ideally the runtime path inAgentEnvironment.tsshould probably also be prefixed like-Runtime-<name>-Idfor symmetry withHarness-<name>-Id, but that's a naming choice).
Not blocking — tests all pass with a fake backend, and if the harness export is a known follow-up this is just a heads-up. Everything else (validation, mutual-exclusion, --json requiring content, session-id length rule, bearer-token restricted to runtime, TUI launch with inputMode: "prompt", region override from the resolved target) reads correctly.
f2c164c to
c6796be
Compare
|
Claude Security Review: no high-confidence findings. (run) |
|
Claude Security Review: no high-confidence findings. (run) |
|
Claude Security Review: no high-confidence findings. (run) |
|
Claude Security Review: no high-confidence findings. (run) |
Description
Add a project-aware top-level
agentcore invokecommand for Runtimes and Harnesses declared by the project enclosing the current directory.{"prompt": content}contentBlockDeltaevents as streaming assistant text in headless and prompt-TUI invocation--jsonGateway project invoke and non-Strands response adapters are intentionally outside this PR.
This draft depends on the following refactor work landing first:
Related Issue
N/A
Documentation PR
N/A - documentation is included.
Type of Change
Testing
bun test src:2166 pass, 0 fail104 pass, 0 failbun run typecheckbun run lint:checkbun run format:checkbun run buildgit diff --checkLive verification in account
603141041947, regionus-west-2:RUNTIME_RENDER_OKwithout SSE framingHARNESS_INVOKE_OKwithend_turnTUI_RENDER_OKwithout SSE framing or serialized Strands events--jsonpreserved SSE metadata, framing, and Strands eventsInvokeTuiE2E825project for continued manual testingChecklist