fix(scaffold): allow certain template values to be overriden - #5
Draft
Hweinstock wants to merge 8 commits into
Draft
fix(scaffold): allow certain template values to be overriden#5Hweinstock wants to merge 8 commits into
Hweinstock wants to merge 8 commits into
Conversation
…solution (aws#2122) @aws-cdk/toolkit-lib's yaml-cfn.js does require("yaml/types") at import time, a subpath that only exists in yaml v1. When an install topology resolves toolkit-lib's yaml to the hoisted yaml v2 (whose exports map blocks ./types), the module fails to load with ERR_PACKAGE_PATH_NOT_EXPORTED ("Cannot find module 'yaml/types'"). This bites bun compile, which inlines toolkit-lib and embeds whatever the build machine resolves. Add a nested override forcing toolkit-lib's yaml to ^1 so it always resolves the v1 nested copy that ships yaml/types. Co-authored-by: gitikavj <gitikavj@amazon.com>
* feat: persist minimal deploy state to top-level deployed-state.json Move the deploy-state file from agentcore/.cli/deployed-state.json to a committed agentcore/deployed-state.json, and stop storing a full snapshot of every resource. State is now keyed per target and holds only the deployed CloudFormation stack ARN (captured from the toolkit deploy result) plus the imperatively-created credential ARNs the synth step needs. Everything else is read live from CloudFormation, so the file never goes stale. Adds a DeployedState schema with readDeployedState/updateTargetState (merge-not-clobber, preserving sibling targets and unowned keys), surfaces stackArn from the CDK toolkit runner, and points the vended CDK app at the new path. * fix: harden deployed-state integrity (review feedback) Address review of the deployed-state work: - Validate any existing state before deploy, so a malformed file fails before AWS is mutated rather than after (leaving the new stack ARN unrecorded). The vended app likewise only treats a missing file as absent and surfaces a malformed one. - Require a stack ARN on a deploy result; a successful CDK deploy always has one, so its absence is malformed -- fail instead of silently skipping persistence. - Write the state file atomically (temp + rename) so an interruption can't leave unparseable JSON that blocks later deploys. - Passthrough the credential-entry schema so a stack-ARN-only rewrite doesn't strip fields a newer CLI records. - Qualify the merge guarantee: safe for sequential deploys, not concurrent. * refactor: keep deployed-state under agentcore/.cli/ Move the state file back under agentcore/.cli/ to match the released CLI's location, so a project created by an older CLI keeps reading the same path after upgrading (the vended app isn't re-vended on deploy). The scaffolded .gitignore ignores the rest of .cli/ but re-includes deployed-state.json, so the stack binding + credential ARNs stay committed and shared. --------- Co-authored-by: gitikavj <gitikavj@amazon.com>
* feat: read project stack state live from CloudFormation Adds a reader that describes a project's CloudFormation stack and classifies its lifecycle into not-deployed / in-progress / failed / ready, returning the stack outputs (resource ARNs/IDs) only when settled and successful. This is the source-of-truth side of the deploy-state refactor: resource details come from CloudFormation on demand rather than a local snapshot that can go stale. Generalizes the existing bootstrap not-found helper to isStackNotFound and reuses it. No command is wired to this yet; project status consumes it in a follow-up. * refactor: trim reader to the raw DescribeStacks API Per review, drop the stack-status classification (not-deployed / in-progress / failed / ready) and the StackState shape — that's a project status interface decision and belongs with whoever builds it, not baked in ahead of the consumer. Keep just describeStack: a DescribeStacks call that returns the stack or undefined when it doesn't exist. The CloudFormation call is injectable at the function seam (lazy-loaded like environment.ts), so it's unit-tested without a real client; wiring it through CoreClient/the project manager is left to the consumer. * fix: throw on an empty successful DescribeStacks response A missing stack is reported by a thrown ValidationError, so that stays the only not-found (undefined) signal. A successful response with no stack is malformed, not not-found; return undefined there would misreport a service problem as 'not deployed'. Throw MalformedServiceResponseError instead, matching the bootstrap reader. --------- Co-authored-by: gitikavj <gitikavj@amazon.com>
* feat: support imperative eval recommendation command * chore: leverage shared utils + delete stale tests * fix: create recommendation input interface + update required flag handling
Hweinstock
force-pushed
the
refactor-templates-pt2
branch
from
August 27, 2026 16:43
812bee4 to
917cc91
Compare
…es/sessions (aws#2098) * feat(eval): batch simulate — --ingestion-wait-ms flag + per-example failures/sessions Follow-ups from the batch-evaluation simulate review: - Add --ingestion-wait-ms (default 180000, 0 skips); thread via InvokeDatasetInput.waitIngestionMs. Removes the SIMULATE_INGESTION_WAIT_MS env var — tests pass the value through the input. - runExamples now returns per-item failures (item + error), not a bare count + firstError; invokeDataset surfaces failures: [{ exampleId, error }] so a partial failure names which examples dropped and why. - batch simulate output renders sessions[] (exampleId <-> sessionId join key for a later get) and failures[] (omitted when empty). * chore: drop explanatory comments from batch simulate follow-up * fix: always render failures[] in batch simulate output * test(eval): simulate fixture golden via id seam + stream-aware recorder - inject newSessionId into EvalClient (default randomUUID) so replay fixtures + goldens are deterministic - teach makeRecordingSend to freeze/revive a streaming SDK response (InvokeAgentRuntime), which stringify couldn't serialize - add simulate fixture-golden case; move handler edges to batch-evaluation.test.tsx - split invokeDataset.test.ts into run.test.ts (pool) + load.test.ts (parse + GT-shape); delete it and simulate.test.tsx * test(eval): drop run.test.ts + load.test.ts * chore: drop explanatory comments from the simulate test refactor * test(eval): simulate fixture asserts via matchGolden only (drop redundant expects) --------- Co-authored-by: jariy17 <tjariy+jariy17@users.noreply.github.com>
* feat(templates): add support for dynamic templates * docs(assets): update readme reccomended commands * feat(runtime): wire up runtime version * fix(templates): use key function to key templates * docs(templates): fix comment with missing the * docs(templates): fix incorrect wording on template types * fix(manager): render in correct directory * test(template): add a snapshot test for the new template * fix(template): avoid double nesting runtimes * fix(templates): remove dead parameters * refactor(harness): adapt harness to leverage template resolver * refactor(manager): rename project template to project tree to avoid confusion * fix(renderer): add missing handlebar helpers * fix(templates): add harnesses to merge entries * fix(handlebars): add missing helpers from upstream * fix(harness): address hardcoded path * fix(hello-world): reject non-HTTP protocol on template * docs(strands-python): remove non-existent command from readme * feat(template): install runtime dependencies in scaffolding * fix(python): normalize names before being sent to python templates * fix(templates): validate dockerfile for harness/ * fix(handlers): add strands as handler input * fix(spec): avoid writing windows paths
Hweinstock
force-pushed
the
feat/allow-flag-overrides
branch
from
August 27, 2026 19:53
0f8493c to
f71c191
Compare
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.
Problem
Dependent on aws#2099. Likely will conflict with memory one.
Not all template fields that we'd expect to be able to overwrite are able to be overwritten. For example, in the create flow runtimeName is fixed since passing runtimeName + template is invalid.
Solution
allow all flags (except language and framework) to overwrite the template defaults.
Testing
./dist/bin/agentcore-linux-x64 project create --template strands-python --runtimeName bob --name testPnow names the runtime correctly.