Skip to content

Validate agent invocation input in generated templates - #1898

Open
jariy17 wants to merge 1 commit into
mainfrom
tjariy/runtime-input-validation
Open

Validate agent invocation input in generated templates#1898
jariy17 wants to merge 1 commit into
mainfrom
tjariy/runtime-input-validation

Conversation

@jariy17

@jariy17 jariy17 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

Validate agent invocation input in the generated HTTP agent templates and document the practice.

  • Python templates reject non-string prompts before forwarding to the framework.
  • TypeScript templates validate prompts with a Zod string schema.
  • Python Strands template adds strip_trailing_tool_use() to normalize a caller-supplied message-history tail.
  • Docs/READMEs and AGENTS.md note to keep prompts typed as strings and pass only prompt text to the agent.

Testing

vitest run — 152 tests pass (new input-validation.test.ts, regenerated asset snapshots, import translator + wire suites). Pre-commit hooks (prettier, secretlint, typecheck) pass.

@jariy17
jariy17 requested a review from a team August 3, 2026 23:34
@github-actions github-actions Bot added the size/m PR size: M label Aug 3, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.25.0.tgz

How to install

gh release download pr-1898-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.25.0.tgz

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 40.44% 15151 / 37462
🔵 Statements 39.71% 16158 / 40680
🔵 Functions 34.69% 2596 / 7482
🔵 Branches 33.82% 10108 / 29882
Generated in workflow #4295 for commit 3041029 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant