@aws/nx-plugin 1.0.0-rc.70 → 1.0.0-rc.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/migrations.json +11 -1
  2. package/package.json +1 -1
  3. package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +1 -1
  4. package/src/agentcore-harness/generator.d.ts +1 -1
  5. package/src/infra/app/generator.d.ts +1 -1
  6. package/src/init/generator.d.ts +1 -1
  7. package/src/license/dependency-check/evaluator.js +55 -10
  8. package/src/license/dependency-check/evaluator.js.map +1 -1
  9. package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/metadata.json +3 -0
  10. package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.d.ts +6 -0
  11. package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js +329 -0
  12. package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js.map +1 -0
  13. package/src/migrations/latest/py-agent-session-management-support/metadata.json +3 -0
  14. package/src/migrations/latest/py-agent-session-management-support/migration.d.ts +2 -0
  15. package/src/migrations/latest/py-agent-session-management-support/migration.js +308 -0
  16. package/src/migrations/latest/py-agent-session-management-support/migration.js.map +1 -0
  17. package/src/preset/generator.d.ts +1 -1
  18. package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +615 -6
  19. package/src/py/agent/__snapshots__/generator.core.spec.ts.snap +186 -0
  20. package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +47 -3
  21. package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +668 -3
  22. package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +55 -14
  23. package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +1 -3
  24. package/src/py/agent/files/langchain/common/__init__.py.template +0 -0
  25. package/src/py/agent/files/langchain/common/agent.py.template +3 -3
  26. package/src/py/agent/files/langchain/common/session.py.template +61 -0
  27. package/src/py/agent/files/strands/ag-ui/main.py.template +5 -1
  28. package/src/py/agent/files/strands/common/agent.py.template +9 -2
  29. package/src/py/agent/files/strands/common/session.py.template +36 -0
  30. package/src/py/agent/generator.d.ts +11 -1
  31. package/src/py/agent/generator.js +78 -28
  32. package/src/py/agent/generator.js.map +1 -1
  33. package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +2 -0
  34. package/src/py/agent/react-connection/generator.d.ts +1 -1
  35. package/src/py/agent/schema.d.js.map +1 -1
  36. package/src/py/agent/schema.d.ts +1 -1
  37. package/src/py/agent/schema.json +3 -3
  38. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  39. package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +12 -12
  40. package/src/py/fast-api/react/generator.d.ts +1 -1
  41. package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  42. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  43. package/src/py/rdb/__snapshots__/generator.spec.ts.snap +1 -1
  44. package/src/smithy/project/generator.d.ts +1 -1
  45. package/src/smithy/react-connection/generator.d.ts +1 -1
  46. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +7 -7
  47. package/src/terraform/project/generator.d.ts +1 -1
  48. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +12 -12
  49. package/src/trpc/react/generator.d.ts +1 -1
  50. package/src/ts/agent/__snapshots__/generator.spec.ts.snap +28 -7
  51. package/src/ts/agent/a2a-connection/generator.d.ts +1 -1
  52. package/src/ts/agent/gateway-connection/generator.d.ts +1 -1
  53. package/src/ts/agent/mcp-connection/generator.d.ts +1 -1
  54. package/src/ts/agent/react-connection/generator.d.ts +1 -1
  55. package/src/ts/astro-docs/generator.d.ts +1 -1
  56. package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +1 -1
  57. package/src/ts/dcr-proxy/generator.d.ts +1 -1
  58. package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  59. package/src/ts/dynamodb/generator.d.ts +1 -1
  60. package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  61. package/src/ts/lambda-function/generator.d.ts +1 -1
  62. package/src/ts/lib/generator.d.ts +1 -1
  63. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  64. package/src/ts/nx-generator/generator.d.ts +1 -1
  65. package/src/ts/nx-migration/generator.d.ts +1 -1
  66. package/src/ts/nx-plugin/generator.d.ts +1 -1
  67. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +4 -4
  68. package/src/ts/rdb/generator.d.ts +1 -1
  69. package/src/ts/react-website/agui/generator.d.ts +1 -1
  70. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +2 -2
  71. package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +1 -1
  72. package/src/utils/agent-connection/agent-connection.d.ts +10 -0
  73. package/src/utils/agent-connection/agent-connection.js +15 -0
  74. package/src/utils/agent-connection/agent-connection.js.map +1 -1
  75. package/src/utils/agent-connection/files/core-runtime-config/runtime-config.ts.template +5 -3
  76. package/src/utils/agent-connection/files/py-core-langchain/a2a/agentcore_a2a_client_langchain.py.template +26 -20
  77. package/src/utils/agent-connection/files/py-core-langchain/s3/s3_checkpoint_saver_langchain.py.template +360 -0
  78. package/src/utils/agent-connection/files/py-core-runtime-config/runtime_config.py.template +2 -4
  79. package/src/utils/agent-connection/files/py-core-strands/a2a/agentcore_a2a_client_strands.py.template +55 -10
  80. package/src/utils/agent-connection/files/py-core-strands/base/tool_errors_strands.py.template +24 -0
  81. package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +1 -1
  82. package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
  83. package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +113 -13
  84. package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +76 -7
  85. package/src/utils/versions.d.ts +5 -2
  86. package/src/utils/versions.js +4 -1
  87. package/src/utils/versions.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/agent/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { ensureLicenseExceptions } from '../../license/config';\nimport { AG_UI_LANGGRAPH_EXCEPTIONS } from '../../license/known-exceptions';\nimport {\n addPyDependencies,\n addTsDependencies,\n} from '../../utils/add-dependencies';\nimport { addAgentChatScripts } from '../../utils/agent-chat/agent-chat';\nimport {\n AGENT_CONNECTION_PY_DEPENDENCIES,\n addPythonFrameworkBase,\n ensurePythonAgentConnectionProject,\n getPythonAgentConnectionModuleName,\n getPythonAgentConnectionProject,\n} from '../../utils/agent-connection/agent-connection';\nimport { addAgentInfra } from '../../utils/agent-core-constructs/agent-core-constructs';\nimport { addPythonBundleTarget } from '../../utils/bundle/bundle';\nimport { resolveContainers } from '../../utils/containers';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../utils/declared-dependencies';\nimport { addDockerScanTarget, DOCKER_DEPENDENCIES } from '../../utils/docker';\nimport { formatFilesInSubtree } from '../../utils/format';\nimport { FS_DEPENDENCIES, FsCommands } from '../../utils/fs';\nimport { updateGitIgnore } from '../../utils/git';\nimport { resolveIac } from '../../utils/iac';\nimport { installDependencies } from '../../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics';\nimport { kebabCase, toClassName, toSnakeCase } from '../../utils/names';\nimport { getNpmScope } from '../../utils/npm-scope';\nimport {\n addComponentDevTarget,\n addComponentGeneratorMetadata,\n addDependencyToTargetIfNotPresent,\n getGeneratorInfo,\n type NxGeneratorInfo,\n normalizeTargetKeyOrder,\n readProjectConfigurationUnqualified,\n} from '../../utils/nx';\nimport { sortObjectKeys } from '../../utils/object';\nimport { toProjectRelativePath } from '../../utils/paths';\nimport { assignPort } from '../../utils/port';\nimport { addWorkspaceDependencyToPyProject } from '../../utils/py';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../utils/shared-constructs';\nimport type { IacMetadata } from '../../utils/shared-constructs-constants';\nimport { BASE_IMAGES } from '../../utils/versions';\nimport type {\n AgentProtocol,\n PyAgentFramework,\n PyAgentGeneratorSchema,\n} from './schema';\n\n/** The metadata this generator records, which its predicates read. */\nexport interface PyAgentMetadata extends IacMetadata {\n readonly port: number;\n readonly rc: string;\n readonly auth: string;\n readonly protocol: AgentProtocol;\n /**\n * The mcp / gateway connection generators dispatch on this field to pick the\n * Strands vs LangChain Layer-2 client + agent.py transform.\n */\n readonly framework: PyAgentFramework;\n}\n\n/** Whether the chat CLI signs its requests, which only IAM auth needs. */\nconst isIam = (m: PyAgentMetadata) => m.auth === 'iam';\n\n// Each entry names the framework and protocol branch it belongs to, so the same\n// declaration drives both adding and the version sync.\nexport const DEPENDENCIES = declareDependencies<PyAgentMetadata>()({\n ts: [\n // The chat CLI, which runs standalone via tsx for every protocol and\n // resolves the deployed agent from AppConfig. `agent-chat-cli` transitively\n // bundles the protocol clients (@a2a-js/sdk, @ag-ui/client).\n { name: 'agent-chat-cli', dev: true, root: true },\n { name: 'tsx', dev: true, root: true },\n { name: '@types/node', dev: true, root: true },\n { name: '@aws-lambda-powertools/parameters', dev: true, root: true },\n { name: '@aws-sdk/client-appconfigdata', dev: true, root: true },\n { name: 'aws4fetch', when: isIam, dev: true, root: true },\n {\n name: '@aws-sdk/credential-providers',\n when: isIam,\n dev: true,\n root: true,\n },\n {\n name: '@a2a-js/sdk',\n when: (m) => m.protocol === 'a2a',\n dev: true,\n root: true,\n },\n // Added by the helpers that own the projects they belong to.\n ...ownedElsewhere(FS_DEPENDENCIES),\n ...ownedElsewhere(DOCKER_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: [\n { name: 'aws-lambda-powertools' },\n { name: 'aws-opentelemetry-distro' },\n { name: 'bedrock-agentcore' },\n { name: 'boto3' },\n { name: 'fastapi' },\n { name: 'mcp' },\n // langchain pulls no Strands dependencies — the langchain model binding\n // plus the per-protocol server adapter: ag-ui-langgraph for AG-UI, a2a-sdk\n // for A2A, nothing extra for HTTP (FastAPI is added for every agent).\n { name: 'langchain', when: (m) => m.framework === 'langchain' },\n { name: 'langchain-aws', when: (m) => m.framework === 'langchain' },\n { name: 'langgraph', when: (m) => m.framework === 'langchain' },\n {\n name: 'ag-ui-protocol',\n when: (m) => m.framework === 'langchain' && m.protocol === 'ag-ui',\n },\n {\n name: 'ag-ui-langgraph',\n when: (m) => m.framework === 'langchain' && m.protocol === 'ag-ui',\n },\n {\n name: 'a2a-sdk',\n when: (m) => m.framework === 'langchain' && m.protocol === 'a2a',\n },\n {\n name: 'strands-agents[a2a]',\n when: (m) => m.framework !== 'langchain' && m.protocol === 'a2a',\n },\n {\n name: 'strands-agents',\n when: (m) => m.framework !== 'langchain' && m.protocol !== 'a2a',\n },\n {\n name: 'strands-agents-tools',\n when: (m) => m.framework !== 'langchain',\n },\n // Declared again here so a Strands AG-UI agent lists it in the same order\n // the generated pyproject.toml had before.\n {\n name: 'ag-ui-protocol',\n when: (m) => m.framework !== 'langchain' && m.protocol === 'ag-ui',\n },\n {\n name: 'ag-ui-strands',\n when: (m) => m.framework !== 'langchain' && m.protocol === 'ag-ui',\n },\n { name: 'uvicorn' },\n // `fastapi dev` runs the local server for every protocol.\n { name: 'fastapi[standard]', group: 'dev' },\n // The agent-connection helper adds these to its own project.\n ...ownedElsewhere(AGENT_CONNECTION_PY_DEPENDENCIES),\n ],\n});\n\nexport const PY_AGENT_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport const pyAgentGenerator = async (\n tree: Tree,\n options: PyAgentGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const project = readProjectConfigurationUnqualified(tree, options.project);\n\n const pyProjectPath = joinPathFragments(project.root, 'pyproject.toml');\n\n // Check if the project has a pyproject.toml file\n if (!pyProjectPath) {\n throw new Error(\n `Unsupported project ${options.project}. Expected a Python project (with a pyproject.toml)`,\n );\n }\n\n if (!project.sourceRoot) {\n throw new Error(\n `This project does not have a source root. Please add a source root to the project configuration before running this generator.`,\n );\n }\n\n // Module name is the last part of the source root,\n const sourceParts = project.sourceRoot.split('/');\n const moduleName = sourceParts[sourceParts.length - 1];\n\n const name = kebabCase(\n options.name || `${kebabCase(project.name.split('.').pop())}-agent`,\n );\n const agentTargetPrefix = options.name ? name : 'agent';\n\n const agentNameSnakeCase = toSnakeCase(options.name || 'agent');\n const agentNameClassName = toClassName(name);\n\n const targetSourceDir = joinPathFragments(\n project.sourceRoot,\n agentNameSnakeCase,\n );\n\n const infra = options.infra ?? 'agentcore';\n const protocol = options.protocol ?? 'http';\n const framework = options.framework ?? 'strands';\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n if (infra === 'none' && options.auth && options.auth !== 'iam') {\n console.warn(\n 'Warning: auth is ignored when no infrastructure is configured (no infrastructure is generated)',\n );\n }\n\n const auth = options.auth ?? 'iam';\n\n // Only 'in-memory' is currently supported for Python agents (session manager\n // support for Python is not yet implemented).\n const session = options.session ?? 'in-memory';\n\n // Ensure the shared agent-connection project exists so the server entry\n // point can import `session_id_context` and propagate the AgentCore\n // session ID to any downstream MCP / A2A clients a later connection\n // generator wires into this agent.\n await ensurePythonAgentConnectionProject(tree, DEPENDENCIES);\n // The agent server imports the framework base helpers (session cache + model\n // error logging) regardless of whether a connection client is wired in. The\n // langchain framework has no base layer (its AG-UI foundation reuses only the\n // framework-agnostic session context), so this is a no-op for langchain.\n await addPythonFrameworkBase(tree, DEPENDENCIES, framework);\n const agentConnectionModuleName = getPythonAgentConnectionModuleName(tree);\n addWorkspaceDependencyToPyProject(\n tree,\n project,\n getPythonAgentConnectionProject(tree),\n );\n\n const templateContext = {\n name,\n agentNameSnakeCase,\n agentNameClassName,\n moduleName,\n agentConnectionModuleName,\n framework,\n };\n\n // Generate common files shared by both protocols. The agent module (agent.py)\n // is framework-specific (Strands yields a contextmanaged Agent; LangChain\n // returns a compiled create_agent graph), so it comes from a per-framework\n // dir. The package __init__.py is framework-agnostic (it stays in `common`).\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', framework, 'common'),\n targetSourceDir,\n templateContext,\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n if (framework === 'langchain') {\n // langchain/common only carries agent.py; the empty package __init__.py is\n // framework-agnostic, so emit it from the strands `common` dir.\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'strands', 'common'),\n targetSourceDir,\n templateContext,\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n }\n\n // Generate protocol-specific files. Each protocol's server entry point (and,\n // for HTTP, its init.py building the FastAPI app + lifespan) is\n // framework-specific (Strands yields a contextmanaged Agent; LangChain drives\n // a compiled create_agent graph), so it comes from a per-framework,\n // per-protocol dir: `files/<framework>/<protocol>`.\n const protocolLower = protocol.toLowerCase();\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', framework, protocolLower),\n targetSourceDir,\n templateContext,\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n if (infra === 'agentcore') {\n const containers = await resolveContainers(tree, 'inherit');\n const dockerImageTag = `${getNpmScope(tree)}-${name}:latest`;\n\n // Add bundle target\n const { bundleTargetName, bundleOutputDir } = addPythonBundleTarget(\n project,\n {\n pythonPlatform: 'aarch64-manylinux_2_28',\n },\n );\n\n // Add the Dockerfile\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'deploy'),\n targetSourceDir,\n {\n agentNameSnakeCase,\n moduleName,\n bundleOutputDir,\n protocol,\n pythonBaseImage: BASE_IMAGES.python,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n const dockerOutputDir = joinPathFragments(\n 'dist',\n project.root,\n 'docker',\n name,\n );\n const dockerTargetName = `${agentTargetPrefix}-docker`;\n\n // Add a docker target that prepares the docker context and builds the image\n const fs = new FsCommands(tree, DEPENDENCIES);\n project.targets[dockerTargetName] = {\n cache: true,\n executor: 'nx:run-commands',\n options: {\n commands: [\n fs.rm(dockerOutputDir),\n fs.mkdir(dockerOutputDir),\n fs.cp(bundleOutputDir, dockerOutputDir),\n fs.cp(\n `${targetSourceDir}/Dockerfile`,\n `${dockerOutputDir}/Dockerfile`,\n ),\n `${containers} build --platform linux/arm64 -t ${dockerImageTag} ${dockerOutputDir}`,\n ],\n parallel: false,\n },\n dependsOn: [bundleTargetName],\n };\n\n addDependencyToTargetIfNotPresent(project, 'docker', dockerTargetName);\n addDependencyToTargetIfNotPresent(project, 'build', 'docker');\n\n addDockerScanTarget(\n tree,\n {\n project,\n containerEngine: containers,\n trivyTargetName: `${agentTargetPrefix}-trivy`,\n dockerTargetName,\n imageTags: [dockerImageTag],\n },\n DEPENDENCIES,\n );\n\n // Add shared constructs\n await sharedConstructsGenerator(tree, { iac }, DEPENDENCIES);\n\n // Add the construct to deploy the agent.\n // AG-UI uses HTTP as the AgentCore protocol type (AG-UI is HTTP-based with SSE over POST).\n const infraProtocol =\n protocol === 'ag-ui' ? ('http' as const) : (protocol as 'http' | 'a2a');\n await addAgentInfra(tree, {\n agentNameKebabCase: name,\n agentNameClassName,\n dockerImageTag,\n dockerOutputDir,\n iac,\n projectName: project.name,\n auth,\n session,\n serverProtocol: infraProtocol,\n containers,\n });\n }\n\n // A2A servers use port 9000 as per the Strands A2A SDK default and AgentCore A2A contract.\n // HTTP and AG-UI agents use port 8081+ to avoid conflict with VS Code server on 8080.\n const localDevPortStart = protocol === 'a2a' ? 9000 : 8081;\n const localDevPort = assignPort(tree, project, localDevPortStart, {\n component: { info: PY_AGENT_GENERATOR_INFO, name: agentTargetPrefix },\n });\n\n // Recorded below and read by the declaration's predicates, so the packages\n // added here are exactly the ones the version sync will own.\n const metadata: PyAgentMetadata = {\n port: localDevPort,\n rc: agentNameClassName,\n auth,\n protocol,\n framework,\n ...(iac ? { iac } : {}),\n };\n\n addPyDependencies(tree, DEPENDENCIES, {\n metadata,\n projectRoot: project.root,\n });\n addTsDependencies(tree, DEPENDENCIES, { metadata });\n\n // All protocols use fastapi dev for hot reload:\n // - HTTP: FastAPI app directly defined in init.py\n // - A2A: A2AServer.to_fastapi_app() creates a FastAPI app in main.py\n // - AG-UI: create_strands_app() creates a FastAPI app in main.py\n const serveCommand = `uv run fastapi dev ${moduleName}/${agentNameSnakeCase}/main.py --port ${localDevPort}`;\n\n // HTTP chat uses the type-safe TypeScript client generated from the\n // agent's OpenAPI spec (same generated client the react-connection\n // generator produces). A2A and AG-UI speak standard protocols, so\n // we can run `agent-chat-cli` directly as a binary.\n const openApiTargetName = `${agentTargetPrefix}-openapi`;\n const clientGenTargetName = `${agentTargetPrefix}-generate-client`;\n\n const scriptsDir = joinPathFragments(\n project.root,\n 'scripts',\n agentTargetPrefix,\n );\n\n if (protocol === 'http') {\n // Emit the OpenAPI spec generator script (shared with react-connection)\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n 'react-connection',\n 'files',\n 'agent',\n ),\n project.root,\n {\n moduleName,\n agentNameSnakeCase,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n // Ignore the generated client directory\n updateGitIgnore(tree, project.root, (patterns) => [\n ...patterns,\n `scripts/${agentTargetPrefix}/generated/`,\n ]);\n }\n\n // Every protocol gets a standalone `chat.ts`. It connects to the local\n // `dev` server by default, or to the deployed agent (with the\n // appropriate auth) when `RUNTIME_CONFIG_APP_ID` is set.\n addAgentChatScripts(tree, {\n scriptsDir,\n protocol,\n language: 'py',\n agentNameClassName,\n auth,\n });\n\n const chatUrl =\n protocol === 'ag-ui'\n ? `http://localhost:${localDevPort}/invocations`\n : `http://localhost:${localDevPort}`;\n const chatCommand = `tsx ./scripts/${agentTargetPrefix}/chat.ts`;\n\n const httpOnlyTargets =\n protocol === 'http'\n ? {\n [openApiTargetName]: {\n cache: true,\n executor: 'nx:run-commands',\n outputs: [\n `{workspaceRoot}/dist/{projectRoot}/openapi/${agentNameSnakeCase}`,\n ],\n options: {\n commands: [\n `uv run python {projectRoot}/scripts/${agentNameSnakeCase}_openapi.py \"dist/{projectRoot}/openapi/${agentNameSnakeCase}/openapi.json\"`,\n ],\n },\n },\n [clientGenTargetName]: {\n cache: true,\n executor: 'nx:run-commands',\n dependsOn: [openApiTargetName],\n inputs: [\n {\n dependentTasksOutputFiles: '**/*.json',\n },\n ],\n outputs: [`{projectRoot}/scripts/${agentTargetPrefix}/generated`],\n options: {\n commands: [\n `nx g @aws/nx-plugin:open-api#ts-client --openApiSpecPath=\"dist/${project.root}/openapi/${agentNameSnakeCase}/openapi.json\" --outputPath=\"${project.root}/scripts/${agentTargetPrefix}/generated\" --no-interactive`,\n ],\n },\n },\n }\n : {};\n\n const agentTargets = {\n ...project.targets,\n ...httpOnlyTargets,\n [`${agentTargetPrefix}-serve`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [serveCommand],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n },\n },\n },\n [`${agentTargetPrefix}-dev`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [serveCommand],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n LOCAL_DEV: 'true',\n },\n },\n },\n // HTTP chat imports the generated client, so ensure it's built first.\n // No dev dependency — chat runs standalone against a local or\n // deployed agent. normalizeTargetKeyOrder keeps the conditional dependsOn\n // in Nx 23's serialization order so re-runs stay byte-identical.\n [`${agentTargetPrefix}-chat`]: normalizeTargetKeyOrder({\n executor: 'nx:run-commands',\n options: {\n commands: [chatCommand],\n cwd: '{projectRoot}',\n env: {\n URL: chatUrl,\n },\n },\n ...(protocol === 'http' ? { dependsOn: [clientGenTargetName] } : {}),\n }),\n };\n\n // Aggregate `<agent>-dev` under the project-level `dev` target.\n addComponentDevTarget(agentTargets, `${agentTargetPrefix}-dev`);\n\n updateProjectConfiguration(tree, project.name, {\n ...project,\n targets: sortObjectKeys(agentTargets),\n });\n\n addComponentGeneratorMetadata(\n tree,\n project.name,\n PY_AGENT_GENERATOR_INFO,\n toProjectRelativePath(project, targetSourceDir),\n agentTargetPrefix,\n metadata,\n );\n\n await addGeneratorMetricsIfApplicable(tree, [PY_AGENT_GENERATOR_INFO]);\n\n // langchain-core (pulled by every langchain agent regardless of protocol)\n // brings jsonpatch/jsonpointer, whose wheels ship without resolvable SPDX\n // license metadata, so register those exceptions so the workspace license\n // check still passes.\n if (framework === 'langchain') {\n await ensureLicenseExceptions(tree, AG_UI_LANGGRAPH_EXCEPTIONS);\n }\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript', 'python'],\n });\n};\n\nexport default pyAgentGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateProjectConfiguration","ensureLicenseExceptions","AG_UI_LANGGRAPH_EXCEPTIONS","addPyDependencies","addTsDependencies","addAgentChatScripts","AGENT_CONNECTION_PY_DEPENDENCIES","addPythonFrameworkBase","ensurePythonAgentConnectionProject","getPythonAgentConnectionModuleName","getPythonAgentConnectionProject","addAgentInfra","addPythonBundleTarget","resolveContainers","declareDependencies","ownedElsewhere","addDockerScanTarget","DOCKER_DEPENDENCIES","formatFilesInSubtree","FS_DEPENDENCIES","FsCommands","updateGitIgnore","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","kebabCase","toClassName","toSnakeCase","getNpmScope","addComponentDevTarget","addComponentGeneratorMetadata","addDependencyToTargetIfNotPresent","getGeneratorInfo","normalizeTargetKeyOrder","readProjectConfigurationUnqualified","sortObjectKeys","toProjectRelativePath","assignPort","addWorkspaceDependencyToPyProject","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","BASE_IMAGES","isIam","m","auth","DEPENDENCIES","ts","name","dev","root","when","protocol","py","framework","group","PY_AGENT_GENERATOR_INFO","filename","pyAgentGenerator","tree","options","project","pyProjectPath","Error","sourceRoot","sourceParts","split","moduleName","length","pop","agentTargetPrefix","agentNameSnakeCase","agentNameClassName","targetSourceDir","infra","iac","undefined","console","warn","session","agentConnectionModuleName","templateContext","dirname","overwriteStrategy","KeepExisting","protocolLower","toLowerCase","containers","dockerImageTag","bundleTargetName","bundleOutputDir","pythonPlatform","pythonBaseImage","python","dockerOutputDir","dockerTargetName","fs","targets","cache","executor","commands","rm","mkdir","cp","parallel","dependsOn","containerEngine","trivyTargetName","imageTags","infraProtocol","agentNameKebabCase","projectName","serverProtocol","localDevPortStart","localDevPort","component","info","metadata","port","rc","projectRoot","serveCommand","openApiTargetName","clientGenTargetName","scriptsDir","patterns","language","chatUrl","chatCommand","httpOnlyTargets","outputs","inputs","dependentTasksOutputFiles","agentTargets","continuous","cwd","env","PORT","LOCAL_DEV","URL","preferInstallDependencies","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,uBAAuB,QAAQ,0BAAuB;AAC/D,SAASC,0BAA0B,QAAQ,oCAAiC;AAC5E,SACEC,iBAAiB,EACjBC,iBAAiB,QACZ,kCAA+B;AACtC,SAASC,mBAAmB,QAAQ,uCAAoC;AACxE,SACEC,gCAAgC,EAChCC,sBAAsB,EACtBC,kCAAkC,EAClCC,kCAAkC,EAClCC,+BAA+B,QAC1B,mDAAgD;AACvD,SAASC,aAAa,QAAQ,6DAA0D;AACxF,SAASC,qBAAqB,QAAQ,+BAA4B;AAClE,SAASC,iBAAiB,QAAQ,4BAAyB;AAC3D,SACEC,mBAAmB,EACnBC,cAAc,QACT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BwB,SAASY,kBAC/BH,mBACA+C;IAGF,MAAM5F,gCAAgCkC,MAAM;QAACH;KAAwB;IAErE,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,sBAAsB;IACtB,IAAIF,cAAc,aAAa;QAC7B,MAAMpD,wBAAwByD,MAAMxD;IACtC;IAEA,MAAMgB,qBAAqBwC;IAC3B,OAAO,IACLnC,oBAAoBmC,MAAMC,QAAQgF,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;gBAAc;aAAS;QACrC;AACJ,EAAE;AAEF,eAAenF,iBAAiB"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/agent/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { ensureLicenseExceptions } from '../../license/config';\nimport { AG_UI_LANGGRAPH_EXCEPTIONS } from '../../license/known-exceptions';\nimport {\n addPyDependencies,\n addTsDependencies,\n} from '../../utils/add-dependencies';\nimport { addAgentChatScripts } from '../../utils/agent-chat/agent-chat';\nimport {\n AGENT_CONNECTION_PY_DEPENDENCIES,\n addPythonFrameworkBase,\n ensureLangchainS3CheckpointSaver,\n ensurePythonAgentConnectionProject,\n getPythonAgentConnectionModuleName,\n getPythonAgentConnectionProject,\n} from '../../utils/agent-connection/agent-connection';\nimport { addAgentInfra } from '../../utils/agent-core-constructs/agent-core-constructs';\nimport { addPythonBundleTarget } from '../../utils/bundle/bundle';\nimport { resolveContainers } from '../../utils/containers';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../utils/declared-dependencies';\nimport { addDockerScanTarget, DOCKER_DEPENDENCIES } from '../../utils/docker';\nimport { formatFilesInSubtree } from '../../utils/format';\nimport { FS_DEPENDENCIES, FsCommands } from '../../utils/fs';\nimport { updateGitIgnore } from '../../utils/git';\nimport { resolveIac } from '../../utils/iac';\nimport { installDependencies } from '../../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics';\nimport { kebabCase, toClassName, toSnakeCase } from '../../utils/names';\nimport { getNpmScope } from '../../utils/npm-scope';\nimport {\n addComponentDevTarget,\n addComponentGeneratorMetadata,\n addDependencyToTargetIfNotPresent,\n getGeneratorInfo,\n type NxGeneratorInfo,\n normalizeTargetKeyOrder,\n readProjectConfigurationUnqualified,\n} from '../../utils/nx';\nimport { sortObjectKeys } from '../../utils/object';\nimport {\n getRelativePathToRootByDirectory,\n toProjectRelativePath,\n} from '../../utils/paths';\nimport { assignPort } from '../../utils/port';\nimport { addWorkspaceDependencyToPyProject } from '../../utils/py';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../utils/shared-constructs';\nimport type { IacMetadata } from '../../utils/shared-constructs-constants';\nimport { BASE_IMAGES } from '../../utils/versions';\nimport type {\n AgentProtocol,\n PyAgentFramework,\n PyAgentGeneratorSchema,\n PyAgentSession,\n} from './schema';\n\n/** The metadata this generator records, which its predicates read. */\nexport interface PyAgentMetadata extends IacMetadata {\n readonly port: number;\n readonly rc: string;\n readonly auth: string;\n readonly protocol: AgentProtocol;\n /**\n * The mcp / gateway connection generators dispatch on this field to pick the\n * Strands vs LangChain Layer-2 client + agent.py transform.\n */\n readonly framework: PyAgentFramework;\n readonly session: PyAgentSession;\n}\n\n/** Whether the chat CLI signs its requests, which only IAM auth needs. */\nconst isIam = (m: PyAgentMetadata) => m.auth === 'iam';\n\n// Each entry names the framework and protocol branch it belongs to, so the same\n// declaration drives both adding and the version sync.\nexport const DEPENDENCIES = declareDependencies<PyAgentMetadata>()({\n ts: [\n // The chat CLI, which runs standalone via tsx for every protocol and\n // resolves the deployed agent from AppConfig. `agent-chat-cli` transitively\n // bundles the protocol clients (@a2a-js/sdk, @ag-ui/client).\n { name: 'agent-chat-cli', dev: true, root: true },\n { name: 'tsx', dev: true, root: true },\n { name: '@types/node', dev: true, root: true },\n { name: '@aws-lambda-powertools/parameters', dev: true, root: true },\n { name: '@aws-sdk/client-appconfigdata', dev: true, root: true },\n { name: 'aws4fetch', when: isIam, dev: true, root: true },\n {\n name: '@aws-sdk/credential-providers',\n when: isIam,\n dev: true,\n root: true,\n },\n {\n name: '@a2a-js/sdk',\n when: (m) => m.protocol === 'a2a',\n dev: true,\n root: true,\n },\n // Added by the helpers that own the projects they belong to.\n ...ownedElsewhere(FS_DEPENDENCIES),\n ...ownedElsewhere(DOCKER_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: [\n { name: 'aws-lambda-powertools' },\n { name: 'aws-opentelemetry-distro' },\n { name: 'bedrock-agentcore' },\n { name: 'boto3' },\n { name: 'fastapi' },\n { name: 'mcp' },\n // langchain pulls no Strands dependencies — the langchain model binding\n // plus the per-protocol server adapter: ag-ui-langgraph for AG-UI, a2a-sdk\n // for A2A, nothing extra for HTTP (FastAPI is added for every agent).\n { name: 'langchain', when: (m) => m.framework === 'langchain' },\n { name: 'langchain-aws', when: (m) => m.framework === 'langchain' },\n { name: 'langgraph', when: (m) => m.framework === 'langchain' },\n // Local dev uses a SQLite-backed checkpointer for convenience (parity\n // with the strands framework's local FileSessionManager).\n {\n name: 'langgraph-checkpoint-sqlite',\n when: (m) => m.framework === 'langchain',\n },\n // AsyncSqliteSaver's driver, required alongside langgraph-checkpoint-sqlite.\n { name: 'aiosqlite', when: (m) => m.framework === 'langchain' },\n // Provides DynamoDBSaver (with S3 offloading for large checkpoints).\n {\n name: 'langgraph-checkpoint-aws',\n when: (m) => m.framework === 'langchain' && m.session === 'dynamodb-s3',\n },\n {\n name: 'ag-ui-protocol',\n when: (m) => m.framework === 'langchain' && m.protocol === 'ag-ui',\n },\n {\n name: 'ag-ui-langgraph',\n when: (m) => m.framework === 'langchain' && m.protocol === 'ag-ui',\n },\n {\n name: 'a2a-sdk',\n when: (m) => m.framework === 'langchain' && m.protocol === 'a2a',\n },\n {\n name: 'strands-agents[a2a]',\n when: (m) => m.framework === 'strands' && m.protocol === 'a2a',\n },\n {\n name: 'strands-agents',\n when: (m) => m.framework === 'strands' && m.protocol !== 'a2a',\n },\n {\n name: 'strands-agents-tools',\n when: (m) => m.framework === 'strands',\n },\n // Declared again here so a Strands AG-UI agent lists it in the same order\n // the generated pyproject.toml had before.\n {\n name: 'ag-ui-protocol',\n when: (m) => m.framework === 'strands' && m.protocol === 'ag-ui',\n },\n {\n name: 'ag-ui-strands',\n when: (m) => m.framework === 'strands' && m.protocol === 'ag-ui',\n },\n { name: 'uvicorn' },\n // `fastapi dev` runs the local server for every protocol.\n { name: 'fastapi[standard]', group: 'dev' },\n // The agent-connection helper adds these to its own project.\n ...ownedElsewhere(AGENT_CONNECTION_PY_DEPENDENCIES),\n ],\n});\n\nexport const PY_AGENT_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport const pyAgentGenerator = async (\n tree: Tree,\n options: PyAgentGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const project = readProjectConfigurationUnqualified(tree, options.project);\n\n const pyProjectPath = joinPathFragments(project.root, 'pyproject.toml');\n\n // Check if the project has a pyproject.toml file\n if (!pyProjectPath) {\n throw new Error(\n `Unsupported project ${options.project}. Expected a Python project (with a pyproject.toml)`,\n );\n }\n\n if (!project.sourceRoot) {\n throw new Error(\n `This project does not have a source root. Please add a source root to the project configuration before running this generator.`,\n );\n }\n\n // Module name is the last part of the source root,\n const sourceParts = project.sourceRoot.split('/');\n const moduleName = sourceParts[sourceParts.length - 1];\n\n const name = kebabCase(\n options.name || `${kebabCase(project.name.split('.').pop())}-agent`,\n );\n const agentTargetPrefix = options.name ? name : 'agent';\n\n const agentNameSnakeCase = toSnakeCase(options.name || 'agent');\n const agentNameClassName = toClassName(name);\n\n const targetSourceDir = joinPathFragments(\n project.sourceRoot,\n agentNameSnakeCase,\n );\n\n const infra = options.infra ?? 'agentcore';\n const protocol = options.protocol ?? 'http';\n const framework = options.framework ?? 'strands';\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n if (infra === 'none' && options.auth && options.auth !== 'iam') {\n console.warn(\n 'Warning: auth is ignored when no infrastructure is configured (no infrastructure is generated)',\n );\n }\n\n const auth = options.auth ?? 'iam';\n\n // Session backends are framework-specific: Strands' SessionManager only has\n // an S3-backed implementation here (via strands.session.S3SessionManager),\n // while LangChain uses dedicated S3 and DynamoDB checkpointer libraries.\n // 'in-memory' is valid for both.\n const SESSIONS_BY_FRAMEWORK: Record<\n PyAgentFramework,\n readonly PyAgentSession[]\n > = {\n strands: ['s3', 'in-memory'],\n langchain: ['s3', 'dynamodb-s3', 'in-memory'],\n };\n if (\n options.session &&\n !SESSIONS_BY_FRAMEWORK[framework].includes(options.session)\n ) {\n throw new Error(\n `Unsupported combination: session '${options.session}' is not implemented for the ${framework} framework (supported: ${SESSIONS_BY_FRAMEWORK[framework].join(', ')}).`,\n );\n }\n const session = options.session ?? 's3';\n\n // With infra=none there's no CDK/Terraform construct to provision a bucket\n // or table or set RUNTIME_CONFIG_APP_ID, so session.py's non-local-dev\n // branch has nothing to read from AppConfig at runtime — the generated code\n // still honors `session`, but only works outside local dev if the caller\n // wires up matching infra/runtime config themselves.\n if (infra === 'none' && session !== 'in-memory') {\n console.warn(\n `Warning: session '${session}' requires infrastructure to configure it automatically (no infrastructure is generated for infra=none) — outside local dev this will fail unless you configure matching runtime config yourself`,\n );\n }\n\n // Local-dev session storage lives at the workspace root\n // (`tmp/agents/<framework>/<agent-name>`), not inside the project, so each\n // agent gets its own storage directory — shared by both frameworks\n // (Strands' FileSessionManager, LangChain's SqliteSaver). The\n // `-dev`/`-serve` targets run with cwd={projectRoot}, so compute that\n // directory relative to the project root here rather than resolving it at\n // runtime.\n const localSessionsDir = joinPathFragments(\n getRelativePathToRootByDirectory(project.root),\n `tmp/agents/${framework}/${name}`,\n );\n\n // Ensure the shared agent-connection project exists so the server entry\n // point can import `session_id_context` and propagate the AgentCore\n // session ID to any downstream MCP / A2A clients a later connection\n // generator wires into this agent.\n await ensurePythonAgentConnectionProject(tree, DEPENDENCIES);\n // The agent server imports the framework base helpers (session cache + model\n // error logging) regardless of whether a connection client is wired in. The\n // LangChain framework has no base layer (its AG-UI foundation reuses only the\n // framework-agnostic session context), so this is a no-op for LangChain.\n await addPythonFrameworkBase(tree, DEPENDENCIES, framework);\n const agentConnectionModuleName = getPythonAgentConnectionModuleName(tree);\n addWorkspaceDependencyToPyProject(\n tree,\n project,\n getPythonAgentConnectionProject(tree),\n );\n\n const templateContext = {\n name,\n agentNameSnakeCase,\n agentNameClassName,\n moduleName,\n agentConnectionModuleName,\n framework,\n protocol,\n session,\n localSessionsDir,\n };\n\n // Files live under a per-framework dir (files/strands, files/langchain),\n // mirrored one-for-one — including files that don't vary by framework\n // (e.g. the empty package __init__.py) — so there's a single, uniform\n // <framework>/<protocol> layout with no cross-framework fallbacks.\n // `framework` is itself the directory name.\n\n // Common files shared by both protocols: the agent module (Strands yields a\n // contextmanaged Agent with a session.py sibling; LangChain returns a\n // compiled create_agent graph) and the package __init__.py.\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', framework, 'common'),\n targetSourceDir,\n templateContext,\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n if (framework === 'langchain' && session === 's3') {\n ensureLangchainS3CheckpointSaver(tree);\n }\n\n // Protocol-specific files. Each protocol's server entry point is\n // framework-specific (Strands yields a contextmanaged Agent; LangChain\n // drives a compiled create_agent graph).\n const protocolLower = protocol.toLowerCase();\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', framework, protocolLower),\n targetSourceDir,\n templateContext,\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n if (infra === 'agentcore') {\n const containers = await resolveContainers(tree, 'inherit');\n const dockerImageTag = `${getNpmScope(tree)}-${name}:latest`;\n\n // Add bundle target\n const { bundleTargetName, bundleOutputDir } = addPythonBundleTarget(\n project,\n {\n pythonPlatform: 'aarch64-manylinux_2_28',\n },\n );\n\n // Add the Dockerfile\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'deploy'),\n targetSourceDir,\n {\n agentNameSnakeCase,\n moduleName,\n bundleOutputDir,\n protocol,\n pythonBaseImage: BASE_IMAGES.python,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n const dockerOutputDir = joinPathFragments(\n 'dist',\n project.root,\n 'docker',\n name,\n );\n const dockerTargetName = `${agentTargetPrefix}-docker`;\n\n // Add a docker target that prepares the docker context and builds the image\n const fs = new FsCommands(tree, DEPENDENCIES);\n project.targets[dockerTargetName] = {\n cache: true,\n executor: 'nx:run-commands',\n options: {\n commands: [\n fs.rm(dockerOutputDir),\n fs.mkdir(dockerOutputDir),\n fs.cp(bundleOutputDir, dockerOutputDir),\n fs.cp(\n `${targetSourceDir}/Dockerfile`,\n `${dockerOutputDir}/Dockerfile`,\n ),\n `${containers} build --platform linux/arm64 -t ${dockerImageTag} ${dockerOutputDir}`,\n ],\n parallel: false,\n },\n dependsOn: [bundleTargetName],\n };\n\n addDependencyToTargetIfNotPresent(project, 'docker', dockerTargetName);\n addDependencyToTargetIfNotPresent(project, 'build', 'docker');\n\n addDockerScanTarget(\n tree,\n {\n project,\n containerEngine: containers,\n trivyTargetName: `${agentTargetPrefix}-trivy`,\n dockerTargetName,\n imageTags: [dockerImageTag],\n },\n DEPENDENCIES,\n );\n\n // Add shared constructs\n await sharedConstructsGenerator(tree, { iac }, DEPENDENCIES);\n\n // Add the construct to deploy the agent.\n // AG-UI uses HTTP as the AgentCore protocol type (AG-UI is HTTP-based with SSE over POST).\n const infraProtocol =\n protocol === 'ag-ui' ? ('http' as const) : (protocol as 'http' | 'a2a');\n await addAgentInfra(tree, {\n agentNameKebabCase: name,\n agentNameClassName,\n dockerImageTag,\n dockerOutputDir,\n iac,\n projectName: project.name,\n auth,\n session,\n serverProtocol: infraProtocol,\n containers,\n });\n }\n\n // A2A servers use port 9000 as per the Strands A2A SDK default and AgentCore A2A contract.\n // HTTP and AG-UI agents use port 8081+ to avoid conflict with VS Code server on 8080.\n const localDevPortStart = protocol === 'a2a' ? 9000 : 8081;\n const localDevPort = assignPort(tree, project, localDevPortStart, {\n component: { info: PY_AGENT_GENERATOR_INFO, name: agentTargetPrefix },\n });\n\n // Recorded below and read by the declaration's predicates, so the packages\n // added here are exactly the ones the version sync will own.\n const metadata: PyAgentMetadata = {\n port: localDevPort,\n rc: agentNameClassName,\n auth,\n protocol,\n framework,\n session,\n ...(iac ? { iac } : {}),\n };\n\n addPyDependencies(tree, DEPENDENCIES, {\n metadata,\n projectRoot: project.root,\n });\n addTsDependencies(tree, DEPENDENCIES, { metadata });\n\n // All protocols use fastapi dev for hot reload:\n // - HTTP: FastAPI app directly defined in init.py\n // - A2A: A2AServer.to_fastapi_app() creates a FastAPI app in main.py\n // - AG-UI: create_strands_app() creates a FastAPI app in main.py\n const serveCommand = `uv run fastapi dev ${moduleName}/${agentNameSnakeCase}/main.py --port ${localDevPort}`;\n\n // HTTP chat uses the type-safe TypeScript client generated from the\n // agent's OpenAPI spec (same generated client the react-connection\n // generator produces). A2A and AG-UI speak standard protocols, so\n // we can run `agent-chat-cli` directly as a binary.\n const openApiTargetName = `${agentTargetPrefix}-openapi`;\n const clientGenTargetName = `${agentTargetPrefix}-generate-client`;\n\n const scriptsDir = joinPathFragments(\n project.root,\n 'scripts',\n agentTargetPrefix,\n );\n\n if (protocol === 'http') {\n // Emit the OpenAPI spec generator script (shared with react-connection)\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n 'react-connection',\n 'files',\n 'agent',\n ),\n project.root,\n {\n moduleName,\n agentNameSnakeCase,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n // Ignore the generated client directory\n updateGitIgnore(tree, project.root, (patterns) => [\n ...patterns,\n `scripts/${agentTargetPrefix}/generated/`,\n ]);\n }\n\n // Every protocol gets a standalone `chat.ts`. It connects to the local\n // `dev` server by default, or to the deployed agent (with the\n // appropriate auth) when `RUNTIME_CONFIG_APP_ID` is set.\n addAgentChatScripts(tree, {\n scriptsDir,\n protocol,\n language: 'py',\n agentNameClassName,\n auth,\n });\n\n const chatUrl =\n protocol === 'ag-ui'\n ? `http://localhost:${localDevPort}/invocations`\n : `http://localhost:${localDevPort}`;\n const chatCommand = `tsx ./scripts/${agentTargetPrefix}/chat.ts`;\n\n const httpOnlyTargets =\n protocol === 'http'\n ? {\n [openApiTargetName]: {\n cache: true,\n executor: 'nx:run-commands',\n outputs: [\n `{workspaceRoot}/dist/{projectRoot}/openapi/${agentNameSnakeCase}`,\n ],\n options: {\n commands: [\n `uv run python {projectRoot}/scripts/${agentNameSnakeCase}_openapi.py \"dist/{projectRoot}/openapi/${agentNameSnakeCase}/openapi.json\"`,\n ],\n },\n },\n [clientGenTargetName]: {\n cache: true,\n executor: 'nx:run-commands',\n dependsOn: [openApiTargetName],\n inputs: [\n {\n dependentTasksOutputFiles: '**/*.json',\n },\n ],\n outputs: [`{projectRoot}/scripts/${agentTargetPrefix}/generated`],\n options: {\n commands: [\n `nx g @aws/nx-plugin:open-api#ts-client --openApiSpecPath=\"dist/${project.root}/openapi/${agentNameSnakeCase}/openapi.json\" --outputPath=\"${project.root}/scripts/${agentTargetPrefix}/generated\" --no-interactive`,\n ],\n },\n },\n }\n : {};\n\n const agentTargets = {\n ...project.targets,\n ...httpOnlyTargets,\n [`${agentTargetPrefix}-serve`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [serveCommand],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n },\n },\n },\n [`${agentTargetPrefix}-dev`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [serveCommand],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n LOCAL_DEV: 'true',\n },\n },\n },\n // HTTP chat imports the generated client, so ensure it's built first.\n // No dev dependency — chat runs standalone against a local or\n // deployed agent. normalizeTargetKeyOrder keeps the conditional dependsOn\n // in Nx 23's serialization order so re-runs stay byte-identical.\n [`${agentTargetPrefix}-chat`]: normalizeTargetKeyOrder({\n executor: 'nx:run-commands',\n options: {\n commands: [chatCommand],\n cwd: '{projectRoot}',\n env: {\n URL: chatUrl,\n },\n },\n ...(protocol === 'http' ? { dependsOn: [clientGenTargetName] } : {}),\n }),\n };\n\n // Aggregate `<agent>-dev` under the project-level `dev` target.\n addComponentDevTarget(agentTargets, `${agentTargetPrefix}-dev`);\n\n updateProjectConfiguration(tree, project.name, {\n ...project,\n targets: sortObjectKeys(agentTargets),\n });\n\n addComponentGeneratorMetadata(\n tree,\n project.name,\n PY_AGENT_GENERATOR_INFO,\n toProjectRelativePath(project, targetSourceDir),\n agentTargetPrefix,\n metadata,\n );\n\n await addGeneratorMetricsIfApplicable(tree, [PY_AGENT_GENERATOR_INFO]);\n\n // langchain-core (pulled by every langchain agent regardless of protocol)\n // brings jsonpatch/jsonpointer, whose wheels ship without resolvable SPDX\n // license metadata, so register those exceptions so the workspace license\n // check still passes.\n if (framework === 'langchain') {\n await ensureLicenseExceptions(tree, AG_UI_LANGGRAPH_EXCEPTIONS);\n }\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript', 'python'],\n });\n};\n\nexport default pyAgentGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateProjectConfiguration","ensureLicenseExceptions","AG_UI_LANGGRAPH_EXCEPTIONS","addPyDependencies","addTsDependencies","addAgentChatScripts","AGENT_CONNECTION_PY_DEPENDENCIES","addPythonFrameworkBase","ensureLangchainS3CheckpointSaver","ensurePythonAgentConnectionProject","getPythonAgentConnectionModuleName","getPythonAgentConnectionProject","addAgentInfra","addPythonBundleTarget","resolveContainers","declareDependencies","ownedElsewhere","addDockerScanTarget","DOCKER_DEPENDENCIES","formatFilesInSubtree","FS_DEPENDENCIES","FsCommands","updateGitIgnore","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","kebabCase","toClassName","toSnakeCase","getNpmScope","addComponentDevTarget","addComponentGeneratorMetadata","addDependencyToTargetIfNotPresent","getGeneratorInfo","normalizeTargetKeyOrder","readProjectConfigurationUnqualified","sortObjectKeys","getRelativePathToRootByDirectory","toProjectRelativePath","assignPort","addWorkspaceDependencyToPyProject","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","BASE_IMAGES","isIam","m","auth","DEPENDENCIES","ts","name","dev","root","when","protocol","py","framework","session","group","PY_AGENT_GENERATOR_INFO","filename","pyAgentGenerator","tree","options","project","pyProjectPath","Error","sourceRoot","sourceParts","split","moduleName","length","pop","agentTargetPrefix","agentNameSnakeCase","agentNameClassName","targetSourceDir","infra","iac","undefined","console","warn","SESSIONS_BY_FRAMEWORK","strands","langchain","includes","join","localSessionsDir","agentConnectionModuleName","templateContext","dirname","overwriteStrategy","KeepExisting","protocolLower","toLowerCase","containers","dockerImageTag","bundleTargetName","bundleOutputDir","pythonPlatform","pythonBaseImage","python","dockerOutputDir","dockerTargetName","fs","targets","cache","executor","commands","rm","mkdir","cp","parallel","dependsOn","containerEngine","trivyTargetName","imageTags","infraProtocol","agentNameKebabCase","projectName","serverProtocol","localDevPortStart","localDevPort","component","info","metadata","port","rc","projectRoot","serveCommand","openApiTargetName","clientGenTargetName","scriptsDir","patterns","language","chatUrl","chatCommand","httpOnlyTargets","outputs","inputs","dependentTasksOutputFiles","agentTargets","continuous","cwd","env","PORT","LOCAL_DEV","URL","preferInstallDependencies","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,uBAAuB,QAAQ,0BAAuB;AAC/D,SAASC,0BAA0B,Q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AI,CAAC;IAE9DxE,2BAA2B6D,MAAME,QAAQd,IAAI,EAAE;QAC7C,GAAGc,OAAO;QACVyC,SAASpE,eAAewG;IAC1B;IAEA7G,8BACE8B,MACAE,QAAQd,IAAI,EACZS,yBACApB,sBAAsByB,SAASY,kBAC/BH,mBACAoD;IAGF,MAAMnG,gCAAgCoC,MAAM;QAACH;KAAwB;IAErE,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,sBAAsB;IACtB,IAAIH,cAAc,aAAa;QAC7B,MAAMtD,wBAAwB4D,MAAM3D;IACtC;IAEA,MAAMiB,qBAAqB0C;IAC3B,OAAO,IACLrC,oBAAoBqC,MAAMC,QAAQqF,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;gBAAc;aAAS;QACrC;AACJ,EAAE;AAEF,eAAexF,iBAAiB"}
@@ -6,6 +6,7 @@ exports[`py#agent#mcp-connection generator > should match snapshot for generated
6
6
  from .app.inventory_mcp_client_strands import InventoryMcpClientStrands
7
7
  from .core.model_errors_strands import log_model_errors
8
8
  from .core.session_context import get_current_session_id, session_id_context
9
+ from .core.tool_errors_strands import log_tool_errors
9
10
  from .core.with_session_id_strands import with_session_id
10
11
 
11
12
  __all__ = [
@@ -13,6 +14,7 @@ __all__ = [
13
14
  "session_id_context",
14
15
  "with_session_id",
15
16
  "log_model_errors",
17
+ "log_tool_errors",
16
18
  "InventoryMcpClientStrands",
17
19
  ]
18
20
  "
@@ -151,7 +151,7 @@ export declare const DEPENDENCIES: import("../../../utils/declared-dependencies"
151
151
  versionOnly: true;
152
152
  }, "when"> & {
153
153
  when: (m: PyAgentReactConnectionMetadata) => boolean;
154
- }], readonly import("../../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", PyAgentReactConnectionMetadata>[]>;
154
+ }], readonly import("../../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", PyAgentReactConnectionMetadata>[]>;
155
155
  export declare const PY_AGENT_REACT_CONNECTION_GENERATOR_INFO: NxGeneratorInfo;
156
156
  export declare const pyAgentReactConnectionGenerator: (tree: Tree, options: ResolvedConnectionOptions & {
157
157
  gatewayRoute?: AgentGatewayRoute;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/agent/schema.d.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IacOption } from '../../utils/iac';\n\nexport type PyAgentFramework = 'strands' | 'langchain';\nexport type PyAgentInfra = 'agentcore' | 'none';\nexport type AgentProtocol = 'http' | 'a2a' | 'ag-ui';\n\nexport type PyAgentAuth = 'iam' | 'cognito';\n\nexport type PyAgentSession = 'in-memory';\n\nexport interface PyAgentGeneratorSchema {\n project: string;\n framework?: PyAgentFramework;\n name?: string;\n infra?: PyAgentInfra;\n auth?: PyAgentAuth;\n protocol?: AgentProtocol;\n session?: PyAgentSession;\n iac: IacOption;\n preferInstallDependencies?: boolean;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAYD,WAUC"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/agent/schema.d.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IacOption } from '../../utils/iac';\n\nexport type PyAgentFramework = 'strands' | 'langchain';\nexport type PyAgentInfra = 'agentcore' | 'none';\nexport type AgentProtocol = 'http' | 'a2a' | 'ag-ui';\n\nexport type PyAgentAuth = 'iam' | 'cognito';\n\nexport type PyAgentSession = 's3' | 'dynamodb-s3' | 'in-memory';\n\nexport interface PyAgentGeneratorSchema {\n project: string;\n framework?: PyAgentFramework;\n name?: string;\n infra?: PyAgentInfra;\n auth?: PyAgentAuth;\n protocol?: AgentProtocol;\n session?: PyAgentSession;\n iac: IacOption;\n preferInstallDependencies?: boolean;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAYD,WAUC"}
@@ -11,7 +11,7 @@ export type AgentProtocol = 'http' | 'a2a' | 'ag-ui';
11
11
 
12
12
  export type PyAgentAuth = 'iam' | 'cognito';
13
13
 
14
- export type PyAgentSession = 'in-memory';
14
+ export type PyAgentSession = 's3' | 'dynamodb-s3' | 'in-memory';
15
15
 
16
16
  export interface PyAgentGeneratorSchema {
17
17
  project: string;
@@ -63,10 +63,10 @@
63
63
  },
64
64
  "session": {
65
65
  "type": "string",
66
- "description": "The storage used to persist session for your Agent. Only 'in-memory' is currently supported for Python agents.",
66
+ "description": "The storage used to persist session for your Agent. LangChain supports 's3' or 'dynamodb-s3'; Strands supports 's3'; 'in-memory' is valid for both.",
67
67
  "x-prompt": "How would you like to persist session for your Agent?",
68
- "enum": ["in-memory"],
69
- "default": "in-memory",
68
+ "enum": ["s3", "dynamodb-s3", "in-memory"],
69
+ "default": "s3",
70
70
  "x-priority": "important"
71
71
  },
72
72
  "preferInstallDependencies": {
@@ -35,7 +35,7 @@ exports[`py#dynamodb generator > should generate terraform modules when iac is t
35
35
  required_providers {
36
36
  aws = {
37
37
  source = "hashicorp/aws"
38
- version = "6.58.0"
38
+ version = "6.60.0"
39
39
  }
40
40
  }
41
41
  }
@@ -192,7 +192,7 @@ exports[`py#dynamodb generator > should generate terraform modules when iac is t
192
192
  required_providers {
193
193
  aws = {
194
194
  source = "hashicorp/aws"
195
- version = "6.58.0"
195
+ version = "6.60.0"
196
196
  }
197
197
  random = {
198
198
  source = "hashicorp/random"
@@ -11,7 +11,7 @@ terraform {
11
11
  required_providers {
12
12
  aws = {
13
13
  source = "hashicorp/aws"
14
- version = "6.58.0"
14
+ version = "6.60.0"
15
15
  }
16
16
  }
17
17
  }
@@ -258,7 +258,7 @@ output "api_log_group_arn" {
258
258
  required_providers {
259
259
  aws = {
260
260
  source = "hashicorp/aws"
261
- version = "6.58.0"
261
+ version = "6.60.0"
262
262
  }
263
263
  }
264
264
  }
@@ -771,7 +771,7 @@ terraform {
771
771
  required_providers {
772
772
  aws = {
773
773
  source = "hashicorp/aws"
774
- version = "6.58.0"
774
+ version = "6.60.0"
775
775
  }
776
776
  }
777
777
  }
@@ -1018,7 +1018,7 @@ output "api_log_group_arn" {
1018
1018
  required_providers {
1019
1019
  aws = {
1020
1020
  source = "hashicorp/aws"
1021
- version = "6.58.0"
1021
+ version = "6.60.0"
1022
1022
  }
1023
1023
  }
1024
1024
  }
@@ -1603,7 +1603,7 @@ terraform {
1603
1603
  required_providers {
1604
1604
  aws = {
1605
1605
  source = "hashicorp/aws"
1606
- version = "6.58.0"
1606
+ version = "6.60.0"
1607
1607
  }
1608
1608
  }
1609
1609
  }
@@ -1850,7 +1850,7 @@ output "api_log_group_arn" {
1850
1850
  required_providers {
1851
1851
  aws = {
1852
1852
  source = "hashicorp/aws"
1853
- version = "6.58.0"
1853
+ version = "6.60.0"
1854
1854
  }
1855
1855
  }
1856
1856
  }
@@ -2340,7 +2340,7 @@ terraform {
2340
2340
  required_providers {
2341
2341
  aws = {
2342
2342
  source = "hashicorp/aws"
2343
- version = "6.58.0"
2343
+ version = "6.60.0"
2344
2344
  }
2345
2345
  random = {
2346
2346
  source = "hashicorp/random"
@@ -2596,7 +2596,7 @@ output "waf_web_acl_arn" {
2596
2596
  required_providers {
2597
2597
  aws = {
2598
2598
  source = "hashicorp/aws"
2599
- version = "6.58.0"
2599
+ version = "6.60.0"
2600
2600
  }
2601
2601
  }
2602
2602
  }
@@ -3346,7 +3346,7 @@ terraform {
3346
3346
  required_providers {
3347
3347
  aws = {
3348
3348
  source = "hashicorp/aws"
3349
- version = "6.58.0"
3349
+ version = "6.60.0"
3350
3350
  }
3351
3351
  random = {
3352
3352
  source = "hashicorp/random"
@@ -3602,7 +3602,7 @@ output "waf_web_acl_arn" {
3602
3602
  required_providers {
3603
3603
  aws = {
3604
3604
  source = "hashicorp/aws"
3605
- version = "6.58.0"
3605
+ version = "6.60.0"
3606
3606
  }
3607
3607
  }
3608
3608
  }
@@ -4341,7 +4341,7 @@ terraform {
4341
4341
  required_providers {
4342
4342
  aws = {
4343
4343
  source = "hashicorp/aws"
4344
- version = "6.58.0"
4344
+ version = "6.60.0"
4345
4345
  }
4346
4346
  random = {
4347
4347
  source = "hashicorp/random"
@@ -4597,7 +4597,7 @@ output "waf_web_acl_arn" {
4597
4597
  required_providers {
4598
4598
  aws = {
4599
4599
  source = "hashicorp/aws"
4600
- version = "6.58.0"
4600
+ version = "6.60.0"
4601
4601
  }
4602
4602
  }
4603
4603
  }
@@ -19,7 +19,7 @@ export declare const DEPENDENCIES: import("../../../utils/declared-dependencies"
19
19
  readonly name: "@tanstack/react-query-devtools";
20
20
  }, {
21
21
  readonly name: "@smithy/types";
22
- }], readonly import("../../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
22
+ }], readonly import("../../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
23
23
  export declare const FAST_API_REACT_GENERATOR_INFO: NxGeneratorInfo;
24
24
  export declare const fastApiReactGenerator: (tree: Tree, options: FastApiReactGeneratorSchema) => Promise<() => Promise<void>>;
25
25
  export default fastApiReactGenerator;
@@ -70,7 +70,7 @@ exports[`lambda-handler project generator > terraform iac > should generate terr
70
70
  required_providers {
71
71
  aws = {
72
72
  source = "hashicorp/aws"
73
- version = "6.58.0"
73
+ version = "6.60.0"
74
74
  }
75
75
  archive = {
76
76
  source = "hashicorp/archive"
@@ -251,7 +251,7 @@ exports[`lambda-handler project generator > terraform iac > should match snapsho
251
251
  required_providers {
252
252
  aws = {
253
253
  source = "hashicorp/aws"
254
- version = "6.58.0"
254
+ version = "6.60.0"
255
255
  }
256
256
  archive = {
257
257
  source = "hashicorp/archive"
@@ -155,7 +155,7 @@ exports[`py#mcp-server generator > should match snapshot for Terraform generated
155
155
  required_providers {
156
156
  aws = {
157
157
  source = "hashicorp/aws"
158
- version = "6.58.0"
158
+ version = "6.60.0"
159
159
  }
160
160
  null = {
161
161
  source = "hashicorp/null"
@@ -214,7 +214,7 @@ exports[`py#rdb generator > should generate Terraform modules 1`] = `
214
214
  }
215
215
  aws = {
216
216
  source = "hashicorp/aws"
217
- version = "6.58.0"
217
+ version = "6.60.0"
218
218
  }
219
219
  null = {
220
220
  source = "hashicorp/null"
@@ -50,7 +50,7 @@ export declare const DEPENDENCIES: import("../../utils/declared-dependencies").D
50
50
  readonly dev: true;
51
51
  readonly root: true;
52
52
  readonly when: (metadata: SmithyProjectMetadata) => boolean;
53
- }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", SmithyProjectMetadata>[]>;
53
+ }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", SmithyProjectMetadata>[]>;
54
54
  export declare const SMITHY_PROJECT_GENERATOR_INFO: NxGeneratorInfo;
55
55
  /**
56
56
  * The commands that build a Smithy project's model, run from the workspace root.
@@ -19,7 +19,7 @@ export declare const DEPENDENCIES: import("../../utils/declared-dependencies").D
19
19
  readonly name: "@tanstack/react-query-devtools";
20
20
  }, {
21
21
  readonly name: "@smithy/types";
22
- }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
22
+ }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
23
23
  export declare const SMITHY_REACT_CONNECTION_GENERATOR_INFO: NxGeneratorInfo;
24
24
  export declare const smithyReactConnectionGenerator: (tree: Tree, options: SmithyReactConnectionGeneratorSchema) => Promise<GeneratorCallback>;
25
25
  export default smithyReactConnectionGenerator;
@@ -413,7 +413,7 @@ terraform {
413
413
  required_providers {
414
414
  aws = {
415
415
  source = "hashicorp/aws"
416
- version = "6.58.0"
416
+ version = "6.60.0"
417
417
  }
418
418
  random = {
419
419
  source = "hashicorp/random"
@@ -672,7 +672,7 @@ exports[`tsSmithyApiGenerator > should generate smithy ts api with Terraform pro
672
672
  required_providers {
673
673
  aws = {
674
674
  source = "hashicorp/aws"
675
- version = "6.58.0"
675
+ version = "6.60.0"
676
676
  }
677
677
  }
678
678
  }
@@ -1904,7 +1904,7 @@ terraform {
1904
1904
  required_providers {
1905
1905
  aws = {
1906
1906
  source = "hashicorp/aws"
1907
- version = "6.58.0"
1907
+ version = "6.60.0"
1908
1908
  }
1909
1909
  random = {
1910
1910
  source = "hashicorp/random"
@@ -2160,7 +2160,7 @@ output "waf_web_acl_arn" {
2160
2160
  required_providers {
2161
2161
  aws = {
2162
2162
  source = "hashicorp/aws"
2163
- version = "6.58.0"
2163
+ version = "6.60.0"
2164
2164
  }
2165
2165
  }
2166
2166
  }
@@ -2879,7 +2879,7 @@ terraform {
2879
2879
  required_providers {
2880
2880
  aws = {
2881
2881
  source = "hashicorp/aws"
2882
- version = "6.58.0"
2882
+ version = "6.60.0"
2883
2883
  }
2884
2884
  random = {
2885
2885
  source = "hashicorp/random"
@@ -3135,7 +3135,7 @@ output "waf_web_acl_arn" {
3135
3135
  required_providers {
3136
3136
  aws = {
3137
3137
  source = "hashicorp/aws"
3138
- version = "6.58.0"
3138
+ version = "6.60.0"
3139
3139
  }
3140
3140
  }
3141
3141
  }
@@ -3839,7 +3839,7 @@ exports[`tsSmithyApiGenerator > terraform iac > should generate terraform with c
3839
3839
  required_providers {
3840
3840
  aws = {
3841
3841
  source = "hashicorp/aws"
3842
- version = "6.58.0"
3842
+ version = "6.60.0"
3843
3843
  }
3844
3844
  }
3845
3845
  }
@@ -54,7 +54,7 @@ export declare const DEPENDENCIES: import("../../utils/declared-dependencies").D
54
54
  readonly name: "@types/node";
55
55
  } & {
56
56
  versionOnly: true;
57
- }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
57
+ }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
58
58
  export declare const TERRAFORM_PROJECT_GENERATOR_INFO: NxGeneratorInfo;
59
59
  export declare function terraformProjectGenerator(tree: Tree, schema: TerraformProjectGeneratorSchema): Promise<GeneratorCallback>;
60
60
  export default terraformProjectGenerator;
@@ -3175,7 +3175,7 @@ terraform {
3175
3175
  required_providers {
3176
3176
  aws = {
3177
3177
  source = "hashicorp/aws"
3178
- version = "6.58.0"
3178
+ version = "6.60.0"
3179
3179
  }
3180
3180
  }
3181
3181
  }
@@ -3422,7 +3422,7 @@ output "api_log_group_arn" {
3422
3422
  required_providers {
3423
3423
  aws = {
3424
3424
  source = "hashicorp/aws"
3425
- version = "6.58.0"
3425
+ version = "6.60.0"
3426
3426
  }
3427
3427
  }
3428
3428
  }
@@ -3917,7 +3917,7 @@ terraform {
3917
3917
  required_providers {
3918
3918
  aws = {
3919
3919
  source = "hashicorp/aws"
3920
- version = "6.58.0"
3920
+ version = "6.60.0"
3921
3921
  }
3922
3922
  }
3923
3923
  }
@@ -4164,7 +4164,7 @@ output "api_log_group_arn" {
4164
4164
  required_providers {
4165
4165
  aws = {
4166
4166
  source = "hashicorp/aws"
4167
- version = "6.58.0"
4167
+ version = "6.60.0"
4168
4168
  }
4169
4169
  }
4170
4170
  }
@@ -4731,7 +4731,7 @@ terraform {
4731
4731
  required_providers {
4732
4732
  aws = {
4733
4733
  source = "hashicorp/aws"
4734
- version = "6.58.0"
4734
+ version = "6.60.0"
4735
4735
  }
4736
4736
  }
4737
4737
  }
@@ -4978,7 +4978,7 @@ output "api_log_group_arn" {
4978
4978
  required_providers {
4979
4979
  aws = {
4980
4980
  source = "hashicorp/aws"
4981
- version = "6.58.0"
4981
+ version = "6.60.0"
4982
4982
  }
4983
4983
  }
4984
4984
  }
@@ -5450,7 +5450,7 @@ terraform {
5450
5450
  required_providers {
5451
5451
  aws = {
5452
5452
  source = "hashicorp/aws"
5453
- version = "6.58.0"
5453
+ version = "6.60.0"
5454
5454
  }
5455
5455
  random = {
5456
5456
  source = "hashicorp/random"
@@ -5706,7 +5706,7 @@ output "waf_web_acl_arn" {
5706
5706
  required_providers {
5707
5707
  aws = {
5708
5708
  source = "hashicorp/aws"
5709
- version = "6.58.0"
5709
+ version = "6.60.0"
5710
5710
  }
5711
5711
  }
5712
5712
  }
@@ -6426,7 +6426,7 @@ terraform {
6426
6426
  required_providers {
6427
6427
  aws = {
6428
6428
  source = "hashicorp/aws"
6429
- version = "6.58.0"
6429
+ version = "6.60.0"
6430
6430
  }
6431
6431
  random = {
6432
6432
  source = "hashicorp/random"
@@ -6682,7 +6682,7 @@ output "waf_web_acl_arn" {
6682
6682
  required_providers {
6683
6683
  aws = {
6684
6684
  source = "hashicorp/aws"
6685
- version = "6.58.0"
6685
+ version = "6.60.0"
6686
6686
  }
6687
6687
  }
6688
6688
  }
@@ -7391,7 +7391,7 @@ terraform {
7391
7391
  required_providers {
7392
7392
  aws = {
7393
7393
  source = "hashicorp/aws"
7394
- version = "6.58.0"
7394
+ version = "6.60.0"
7395
7395
  }
7396
7396
  random = {
7397
7397
  source = "hashicorp/random"
@@ -7647,7 +7647,7 @@ output "waf_web_acl_arn" {
7647
7647
  required_providers {
7648
7648
  aws = {
7649
7649
  source = "hashicorp/aws"
7650
- version = "6.58.0"
7650
+ version = "6.60.0"
7651
7651
  }
7652
7652
  }
7653
7653
  }