Skip to content

fix: upgrade npm for OIDC trusted publishing#350

Merged
notgitika merged 1 commit intomainfrom
fix/npm-trusted-publishing
Feb 19, 2026
Merged

fix: upgrade npm for OIDC trusted publishing#350
notgitika merged 1 commit intomainfrom
fix/npm-trusted-publishing

Conversation

@tejaskash
Copy link
Copy Markdown
Contributor

Summary

  • Upgrade Node.js to 22.x and add npm install -g npm@latest to ensure npm >= 11.5.1 (required for OIDC trusted publishing)
  • Add --tag latest to npm publish (npm 11.5.1+ requires explicit --tag for prerelease versions)
  • Keep --provenance for build attestations (works since repo is public)

Context

Preemptive fix based on the same issues hit in aws/agentcore-l3-cdk-constructs. Without npm 11.5.1+, the OIDC token exchange for trusted publishing doesn't work. Without --tag latest, prerelease versions are rejected.

Test plan

  • Run the release workflow and verify publish succeeds

- Upgrade Node.js to 22.x and add npm upgrade to ensure 11.5.1+
  (required for OIDC trusted publishing)
- Add --tag latest for prerelease versions (npm 11.5.1+ requires it)
- Clean up permissions comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tejaskash tejaskash requested a review from a team February 19, 2026 22:31
@github-actions github-actions bot added the size/xs PR size: XS label Feb 19, 2026
@notgitika notgitika merged commit ec44120 into main Feb 19, 2026
16 of 18 checks passed
@notgitika notgitika deleted the fix/npm-trusted-publishing branch February 19, 2026 22:34
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 43.33% 2860 / 6600
🔵 Statements 42.89% 3008 / 7012
🔵 Functions 45.49% 606 / 1332
🔵 Branches 48.23% 1871 / 3879
Generated in workflow #454 for commit 1f8638a by the Vitest Coverage Report Action

tejaskash added a commit that referenced this pull request Mar 17, 2026
Align templates with bedrock-agentcore-sdk-python PRs #349 and #350:

A2A templates now use serve_a2a() from bedrock_agentcore.runtime:
- Strands: StrandsA2AExecutor from strands.multiagent.a2a.executor
- GoogleADK: A2aAgentExecutor with Runner + AgentCard from a2a-sdk
- LangGraph: custom AgentExecutor subclass with AgentCard from a2a-sdk
- Dependencies: bedrock-agentcore[a2a], removed uvicorn/langgraph-a2a

AGUI templates now use serve_ag_ui() and AGUIApp from runtime:
- Strands: StrandsAgent from ag_ui_strands + serve_ag_ui()
- GoogleADK: AGUIApp decorator with Runner, yields AG-UI events
- LangGraph: AGUIApp decorator with graph.ainvoke, yields AG-UI events
- Dependencies: bedrock-agentcore[ag-ui], removed uvicorn/fake adapters
notgitika pushed a commit that referenced this pull request Mar 18, 2026
* feat: add protocol mode support (HTTP, MCP, A2A, AGUI)

Add the protocol dimension to all agent creation flows: non-interactive
CLI, TUI wizard, and BYO agent. Each protocol mode routes to the correct
template directory under a new protocol-first layout
(python/{protocol}/{framework}/base/).

Key changes:
- Schema: ProtocolModeSchema, PROTOCOL_FRAMEWORK_MATRIX, helpers
- Templates: restructure under http/, add mcp/, a2a/, agui/ dirs
- Rendering: BaseRenderer uses protocol in template path, new McpRenderer
- CLI: --protocol flag on add agent and create commands with validation
- TUI: protocol step in wizard, conditional framework/model filtering
- Schema mapper: protocolMode passthrough, MCP skips model/memory/creds
- Tests: unit tests for schema, validation, rendering, and mapping

* test: add integration tests for protocol mode creation flows

Add create-protocols.test.ts covering MCP, A2A, AGUI, and HTTP create
and add-agent flows. Fix MCP create defaulting undefined model provider
by falling back to Bedrock (no credential needed). Add protocol option
to createTestProject helper.

* fix: always set explicit protocolMode (including HTTP)

Previously HTTP agents omitted protocolMode for backwards compatibility.
Now all agents have an explicit protocolMode field set to HTTP, MCP,
A2A, or AGUI. This makes the config self-documenting and consistent.

* fix: update A2A and AGUI templates to use bedrock-agentcore-sdk APIs

Align templates with bedrock-agentcore-sdk-python PRs #349 and #350:

A2A templates now use serve_a2a() from bedrock_agentcore.runtime:
- Strands: StrandsA2AExecutor from strands.multiagent.a2a.executor
- GoogleADK: A2aAgentExecutor with Runner + AgentCard from a2a-sdk
- LangGraph: custom AgentExecutor subclass with AgentCard from a2a-sdk
- Dependencies: bedrock-agentcore[a2a], removed uvicorn/langgraph-a2a

AGUI templates now use serve_ag_ui() and AGUIApp from runtime:
- Strands: StrandsAgent from ag_ui_strands + serve_ag_ui()
- GoogleADK: AGUIApp decorator with Runner, yields AG-UI events
- LangGraph: AGUIApp decorator with graph.ainvoke, yields AG-UI events
- Dependencies: bedrock-agentcore[ag-ui], removed uvicorn/fake adapters

* fix: rename protocolMode to protocol, remove AGUI, fix TUI crash

- Rename `protocolMode` field to `protocol` in AgentEnvSpec schema and
  all downstream types (GenerateConfig, AddAgentConfig, AgentRenderConfig)
- Remove AGUI protocol support (CDK L1 does not support it yet):
  delete all agui templates, remove from enums/matrix/tests/options
- Fix TUI crash in Add Agent -> New Agent flow: ADD_AGENT_STEP_LABELS
  was missing the 'protocol' step, causing StepIndicator to crash on
  undefined.length
- Pass protocol selection through AddAgentConfig so it isn't silently
  dropped when creating agents via the TUI add-agent flow
- Fix type error in create/validate.ts: capture validated ProtocolMode
  from safeParse instead of using untyped string

* Fix lint and format errors from CI

- Remove unnecessary type assertion on cliOptions.protocol
- Remove unused SDK_OPTIONS import from GenerateWizardUI
- Remove unused getSDKOptionsForProtocol import from useGenerateWizard
- Prefix unused destructured variable with underscore in test
- Run prettier on 4 files that failed format check

* Fix integration test: rename protocolMode to protocol, remove AGUI test

The integration test still referenced the old `protocolMode` field name
instead of `protocol`, and included an AGUI test case that was removed
from the schema.

* Fix review findings: missing __init__.py, build validation order

- Add model/__init__.py to all A2A template directories (strands,
  googleadk, langchain_langgraph) matching HTTP template structure
- Move build type validation before MCP early return in create/validate
  so invalid --build values are caught for MCP agents too
- Add clarifying comment for phantom framework/modelProvider defaults
  in MCP path of create/command.tsx

* Address review feedback: McpRenderer, phantom defaults, required protocol

- Add shouldRenderMemory() hook to BaseRenderer, override in McpRenderer
  to return false instead of reimplementing entire render() method
- Make framework/modelProvider optional in CreateWithAgentOptions, resolve
  defaults explicitly in createProjectWithAgent for MCP path
- Make protocol field required in AgentEnvSpecSchema (no backwards compat
  needed per reviewer)
- Update tests for required protocol field

* Add required protocol field to all AgentEnvSpec test fixtures

Making protocol required on AgentEnvSpecSchema means every test fixture
that constructs an AgentCoreRuntime object needs protocol: 'HTTP'.

* Remove accidentally committed ProtocolTesting directory

Local test directory was inadvertently staged during merge commit.
Added to .gitignore to prevent recurrence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants