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.24% 97.22% -0.02%
============================================
Files 471 478 +7
Lines 28911 29593 +682
============================================
+ Hits 28114 28773 +659
- Misses 797 820 +23 ☔ 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) |
|
Claude Security Review: no high-confidence findings. (run) |
Description
Add
agentcore project invokefor 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.
The required refactor dependencies have landed:
Related Issue
N/A
Documentation PR
N/A - documentation is included.
Type of Change
Testing
bun test src:2274 pass, 0 fail133 pass, 0 failbun run typecheckbun run lint:checkbun run format:checkbun run secrets:checkbun run buildgit diff --checkLive verification in account
603141041947, regionus-west-2, using the retainedInvokeMatrix827project:invokeshorthand while direct Runtime and Gateway invokes remain registeredagentcore invokeshowed type/name/protocol/source for ambiguous project Runtime/Harness rows and delegated each selection to its existing TUIPROJECT_RUNTIME_FIXED_OKwithout SSE framingresponseandstatus=...PROJECT_HARNESS_FIXED_OKwithend_turnPROJECT_TUI_HARNESS_OKwhile the Runtime response was stillstreaming…complete · 22 bytesand returned toReadyResponse · ...headingPROJECT_HARNESS_TUI_OK,end_turn, and a reusable session promptChecklist