feat(project): implement resolve() + container template on FsTreeNode - #1946
Conversation
Locate an existing project by walking up to the agentcore/agentcore.json
marker, parse it through ProjectSpecSchema, and return { name, rootPath,
runtimes }. A malformed config surfaces as InputValidationError (user-
correctable) rather than a raw DeserializationError.
- extend Project with rootPath + runtimes (what withProject and the dev
server actually consume)
- inject ReadWriteJson into FsProjectManager (tests read fixtures, not disk)
- create() returns the same shape resolve() would
…ed no-project error - add hello-world-python-container template (Dockerfile + assets) and its TEMPLATES entry (build: Container, dockerfile). z.enum(PROJECT_TEMPLATES) exposes it as a --template choice automatically. - fix fsTree renderName regex to rename dockerignore.template -> .dockerignore (previously only git/npm), so the container template's ignore file lands right. - scaffold a root .gitignore and agentcore/.env.local from shared/ templates. - withProject: throw InputValidationError when no project encloses the cwd, replacing the placeholder raw Error (unblocked by resolve()).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor #1946 +/- ##
=========================================
Coverage 95.74% 95.75%
=========================================
Files 291 291
Lines 16234 16273 +39
=========================================
+ Hits 15544 15582 +38
- Misses 690 691 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aidandaly24
left a comment
There was a problem hiding this comment.
This looks good to me! Very clean PR.
jariy17
left a comment
There was a problem hiding this comment.
If you can do this as a follow up PR, that would be great
|
|
||
|
|
||
| @app.entrypoint | ||
| async def invoke(payload, context): |
There was a problem hiding this comment.
Can you apply stripping_tool_use function to the request? We had a sev2 about this issue. https://github.com/aws/agentcore-cli/pull/1898/changes
| requires-python = ">=3.10" | ||
| dependencies = [ | ||
| "aws-opentelemetry-distro", | ||
| "bedrock-agentcore >= 1.9.1", |
There was a problem hiding this comment.
Can we set this version a little higher?
| dependencies = [ | ||
| "aws-opentelemetry-distro", | ||
| "bedrock-agentcore >= 1.9.1", | ||
| "botocore[crt] >= 1.35.0", |
There was a problem hiding this comment.
Can we set this version a little higher?
| "aws-opentelemetry-distro", | ||
| "bedrock-agentcore >= 1.9.1", | ||
| "botocore[crt] >= 1.35.0", | ||
| "strands-agents >= 1.15.0", |
There was a problem hiding this comment.
Can we set this version a little higher?
Summary
ProjectManager.resolve()by locating and validating the nearestagentcore/agentcore.jsonhello-world-python-containertemplate and scaffold shared.gitignoreandagentcore/.env.localfilesSupersedes #1880 after the project schema and
FsTreeNodescaffolding landed separately.Testing
bun test(972 pass)