Skip to content

feat(project): scaffold add harness handler - #1998

Open
Hweinstock wants to merge 4 commits into
aws:refactorfrom
Hweinstock:feat/add-harness
Open

feat(project): scaffold add harness handler#1998
Hweinstock wants to merge 4 commits into
aws:refactorfrom
Hweinstock:feat/add-harness

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

We're missing functionality to add resources to a project. This PR sets up the handler for agentcore project add harness as an example, and scaffolds the remaining work for add.

Solution

  • setup a handler that takes the same flags at the imperative harness create (with a extra few project specific ones). Alternatively considered using different flags from imperative, but this creates an inconsistent UX where project command inputs are similar to api shapes, but slightly different (ex. containerUri is top level, vs nested in json).
  • convert those flags into the spec format expected by the schemas.
  • scaffold an add function for the shared functionality.

Testing / Verification

  • created a project, attempted to add a harness and got the not implemented error.
  • add unit tests for the flag parsing.

Next Steps

  • I want to move the scaffolding of runtime into the add function, then call that from the handler when we're scaffolding. This will make it easier to re-use the logic, and handle harness in the same place.
  • implement the rest of add via json source.

@Hweinstock Hweinstock changed the title Feat/add harness feat(project): scaffold add harness handler Aug 13, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 13, 2026
@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.50860% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.96%. Comparing base (9398c03) to head (d9138cd).
⚠️ Report is 1 commits behind head on refactor.

Files with missing lines Patch % Lines
src/handlers/project/add/harness/index.ts 99.48% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #1998      +/-   ##
============================================
+ Coverage     96.91%   96.96%   +0.04%     
============================================
  Files           356      357       +1     
  Lines         20136    20531     +395     
============================================
+ Hits          19515    19908     +393     
- Misses          621      623       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 13, 2026
Comment thread src/core/project/manager.tsx Outdated
}

// eslint-disable-next-line require-yield
public async *add<TResource extends ProjectResource>(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm imagining minimal special casing here. We'll want to scaffold files for runtime/harness, then the rest should be simple shared logic to write the schema changes. We will also need some special casing for harness since it links to the config in the scaffolded files.

});

/** Converts the SDK's tagged-union model config into the flat project-schema shape. */
function toModelConfig(modelConfig: HarnessModelConfiguration): HarnessModel {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we handle all the api shape --> project schema conversion in the handler to keep the shared logic clean.

@Hweinstock
Hweinstock marked this pull request as ready for review August 13, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants