@aws/nx-plugin 1.0.0-rc.23 → 1.0.0-rc.25
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.
- package/LICENSE-THIRD-PARTY +3643 -1208
- package/package.json +30 -15
- package/src/agentcore-gateway/attach-upstream.d.ts +7 -7
- package/src/agentcore-gateway/attach-upstream.js +19 -22
- package/src/agentcore-gateway/attach-upstream.js.map +1 -1
- package/src/agentcore-gateway/gateway-connection/generator.d.ts +4 -4
- package/src/agentcore-gateway/gateway-connection/generator.js +45 -46
- package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -1
- package/src/agentcore-gateway/gateway-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.ts +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.json +5 -0
- package/src/agentcore-gateway/generator.js +93 -73
- package/src/agentcore-gateway/generator.js.map +1 -1
- package/src/agentcore-gateway/mcp-connection/generator.d.ts +3 -3
- package/src/agentcore-gateway/mcp-connection/generator.js +27 -31
- package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -1
- package/src/agentcore-gateway/mcp-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.ts +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +5 -0
- package/src/agentcore-gateway/schema.d.js +6 -0
- package/src/agentcore-gateway/schema.d.js.map +1 -0
- package/src/agentcore-gateway/schema.d.ts +1 -0
- package/src/agentcore-gateway/schema.json +5 -0
- package/src/bin/aws-nx-mcp.js +14 -0
- package/src/bin/aws-nx-mcp.js.map +1 -0
- package/src/connection/{agent-serve-local.d.ts → agent-local-dev.d.ts} +5 -5
- package/src/connection/agent-local-dev.js +42 -0
- package/src/connection/agent-local-dev.js.map +1 -0
- package/src/connection/agent-runtime-config.js +9 -14
- package/src/connection/agent-runtime-config.js.map +1 -1
- package/src/connection/generator.d.ts +1 -0
- package/src/connection/generator.js +265 -206
- package/src/connection/generator.js.map +1 -1
- package/src/connection/{serve-local.d.ts → local-dev.d.ts} +3 -3
- package/src/connection/local-dev.js +37 -0
- package/src/connection/local-dev.js.map +1 -0
- package/src/connection/schema.d.js +6 -0
- package/src/connection/schema.d.js.map +1 -0
- package/src/connection/schema.d.ts +1 -0
- package/src/connection/schema.json +5 -0
- package/src/index.js +2 -5
- package/src/index.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +33 -47
- package/src/infra/app/generator.js +140 -124
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.js +6 -0
- package/src/infra/app/schema.d.js.map +1 -0
- package/src/infra/app/schema.d.ts +1 -1
- package/src/infra/app/schema.json +5 -0
- package/src/license/config-types.js +5 -3
- package/src/license/config-types.js.map +1 -1
- package/src/license/config.d.ts +1 -1
- package/src/license/config.js +267 -242
- package/src/license/config.js.map +1 -1
- package/src/license/dependency-check/check.js +51 -46
- package/src/license/dependency-check/check.js.map +1 -1
- package/src/license/dependency-check/collectors/collector.js +41 -71
- package/src/license/dependency-check/collectors/collector.js.map +1 -1
- package/src/license/dependency-check/collectors/npm-collector.js +34 -41
- package/src/license/dependency-check/collectors/npm-collector.js.map +1 -1
- package/src/license/dependency-check/collectors/python-collector.js +55 -62
- package/src/license/dependency-check/collectors/python-collector.js.map +1 -1
- package/src/license/dependency-check/evaluator.js +40 -68
- package/src/license/dependency-check/evaluator.js.map +1 -1
- package/src/license/dependency-check/executor.js +30 -22
- package/src/license/dependency-check/executor.js.map +1 -1
- package/src/license/dependency-check/pre-approved.js +949 -336
- package/src/license/dependency-check/pre-approved.js.map +1 -1
- package/src/license/dependency-check/types.js +2 -3
- package/src/license/dependency-check/types.js.map +1 -1
- package/src/license/generator.js +55 -60
- package/src/license/generator.js.map +1 -1
- package/src/license/index.js +3 -9
- package/src/license/index.js.map +1 -1
- package/src/license/known-exceptions.js +14 -13
- package/src/license/known-exceptions.js.map +1 -1
- package/src/license/schema.d.js +6 -0
- package/src/license/schema.d.js.map +1 -0
- package/src/license/schema.d.ts +2 -0
- package/src/license/schema.json +5 -0
- package/src/license/sync/generator.js +94 -119
- package/src/license/sync/generator.js.map +1 -1
- package/src/license/sync/project-file-sync.js +28 -35
- package/src/license/sync/project-file-sync.js.map +1 -1
- package/src/mcp-server/generator-info.js +130 -160
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.js +184 -206
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/guide-render.js +10 -25
- package/src/mcp-server/guide-render.js.map +1 -1
- package/src/mcp-server/index.js +6 -10
- package/src/mcp-server/index.js.map +1 -1
- package/src/mcp-server/mdx-ast.js +39 -57
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/option-filter.js +33 -47
- package/src/mcp-server/option-filter.js.map +1 -1
- package/src/mcp-server/schema-registry.js +27 -40
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/mcp-server/schema.js +9 -7
- package/src/mcp-server/schema.js.map +1 -1
- package/src/mcp-server/server.js +20 -24
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +23 -24
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.js +45 -25
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.js +29 -37
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.js +19 -25
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/open-api/ts-client/generator.js +16 -26
- package/src/open-api/ts-client/generator.js.map +1 -1
- package/src/open-api/ts-client/schema.d.js +6 -0
- package/src/open-api/ts-client/schema.d.js.map +1 -0
- package/src/open-api/ts-hooks/generator.js +13 -21
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/schema.d.js +6 -0
- package/src/open-api/ts-hooks/schema.d.js.map +1 -0
- package/src/open-api/ts-metadata/generator.js +12 -20
- package/src/open-api/ts-metadata/generator.js.map +1 -1
- package/src/open-api/ts-metadata/schema.d.js +6 -0
- package/src/open-api/ts-metadata/schema.d.js.map +1 -0
- package/src/open-api/utils/codegen-data/languages.js +42 -60
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data/types.js +31 -30
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.js +253 -269
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +242 -241
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parse.js +8 -14
- package/src/open-api/utils/parse.js.map +1 -1
- package/src/open-api/utils/refs.js +12 -22
- package/src/open-api/utils/refs.js.map +1 -1
- package/src/open-api/utils/types.js +5 -2
- package/src/open-api/utils/types.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +32 -7
- package/src/preset/generator.d.ts +1 -1
- package/src/preset/generator.js +134 -113
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.js +6 -0
- package/src/preset/schema.d.js.map +1 -0
- package/src/preset/schema.d.ts +1 -1
- package/src/preset/schema.json +5 -5
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +304 -0
- package/src/py/agent/__snapshots__/{generator.spec.ts.snap → generator.frameworks.spec.ts.snap} +16 -853
- package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +535 -0
- package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -2
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +1 -1
- package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +1 -1
- package/src/py/agent/a2a-connection/generator.js +74 -75
- package/src/py/agent/a2a-connection/generator.js.map +1 -1
- package/src/py/agent/a2a-connection/schema.d.js +8 -0
- package/src/py/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/py/agent/a2a-connection/schema.d.ts +1 -0
- package/src/py/agent/a2a-connection/schema.json +5 -0
- package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +6 -8
- package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +3 -3
- package/src/py/agent/gateway-connection/files/langchain/agent-connection/app/__gatewaySnakeCase___client_langchain.py.template +3 -3
- package/src/py/agent/gateway-connection/generator.js +65 -58
- package/src/py/agent/gateway-connection/generator.js.map +1 -1
- package/src/py/agent/gateway-connection/schema.d.js +6 -0
- package/src/py/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/py/agent/gateway-connection/schema.d.ts +1 -0
- package/src/py/agent/gateway-connection/schema.json +5 -0
- package/src/py/agent/generator.js +230 -194
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +5 -12
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +1 -1
- package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +1 -1
- package/src/py/agent/mcp-connection/generator.js +57 -52
- package/src/py/agent/mcp-connection/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/schema.d.js +8 -0
- package/src/py/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/py/agent/mcp-connection/schema.d.ts +1 -0
- package/src/py/agent/mcp-connection/schema.json +5 -0
- package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/agent/react-connection/generator.d.ts +1 -1
- package/src/py/agent/react-connection/generator.js +55 -59
- package/src/py/agent/react-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +4 -4
- package/src/py/agent/react-connection/local-dev.js +36 -0
- package/src/py/agent/react-connection/local-dev.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.js +8 -0
- package/src/py/agent/react-connection/schema.d.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.ts +1 -0
- package/src/py/agent/react-connection/schema.json +5 -0
- package/src/py/agent/schema.d.js +6 -0
- package/src/py/agent/schema.d.js.map +1 -0
- package/src/py/agent/schema.d.ts +1 -0
- package/src/py/agent/schema.json +5 -0
- package/src/py/api/generator.js +12 -11
- package/src/py/api/generator.js.map +1 -1
- package/src/py/api/schema.d.js +6 -0
- package/src/py/api/schema.d.js.map +1 -0
- package/src/py/api/schema.d.ts +1 -0
- package/src/py/api/schema.json +5 -0
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +68 -28
- package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/py/dynamodb/agent-connection/generator.js +30 -30
- package/src/py/dynamodb/agent-connection/generator.js.map +1 -1
- package/src/py/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/py/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/agent-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/agent-connection/schema.json +5 -0
- package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/dynamodb/fast-api-connection/generator.js +29 -29
- package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -1
- package/src/py/dynamodb/fast-api-connection/schema.d.js +8 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +5 -0
- package/src/py/dynamodb/files/__name__/client.py.template +5 -5
- package/src/py/dynamodb/files/__name__/entities/base.py.template +2 -2
- package/src/py/dynamodb/files/config.json.template +1 -1
- package/src/py/dynamodb/generator.js +66 -62
- package/src/py/dynamodb/generator.js.map +1 -1
- package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/py/dynamodb/mcp-server-connection/generator.js +30 -30
- package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -1
- package/src/py/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +5 -0
- package/src/py/dynamodb/schema.d.js +6 -0
- package/src/py/dynamodb/schema.d.js.map +1 -0
- package/src/py/dynamodb/schema.d.ts +1 -0
- package/src/py/dynamodb/schema.json +5 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +45 -4632
- package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +4833 -0
- package/src/py/fast-api/generator.js +82 -85
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/fast-api/react/generator.d.ts +2 -2
- package/src/py/fast-api/react/generator.js +25 -25
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.js +28 -29
- package/src/py/fast-api/react/open-api.js.map +1 -1
- package/src/py/fast-api/react/schema.d.js +6 -0
- package/src/py/fast-api/react/schema.d.js.map +1 -0
- package/src/py/fast-api/react/schema.d.ts +1 -0
- package/src/py/fast-api/react/schema.json +5 -0
- package/src/py/fast-api/schema.d.js +6 -0
- package/src/py/fast-api/schema.d.js.map +1 -0
- package/src/py/fast-api/schema.d.ts +1 -0
- package/src/py/fast-api/schema.json +5 -0
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/lambda-function/generator.js +60 -59
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/lambda-function/schema.d.js +6 -0
- package/src/py/lambda-function/schema.d.js.map +1 -0
- package/src/py/lambda-function/schema.d.ts +1 -0
- package/src/py/lambda-function/schema.json +5 -0
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/py/mcp-server/generator.js +152 -132
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.d.js +6 -0
- package/src/py/mcp-server/schema.d.js.map +1 -0
- package/src/py/mcp-server/schema.d.ts +1 -0
- package/src/py/mcp-server/schema.json +5 -0
- package/src/py/project/generator.js +132 -90
- package/src/py/project/generator.js.map +1 -1
- package/src/py/project/schema.d.js +6 -0
- package/src/py/project/schema.d.js.map +1 -0
- package/src/py/project/schema.d.ts +1 -0
- package/src/py/project/schema.json +5 -0
- package/src/sdk/agentcore-gateway.d.ts +6 -0
- package/src/sdk/agentcore-gateway.js +7 -0
- package/src/sdk/agentcore-gateway.js.map +1 -0
- package/src/sdk/connection.d.ts +6 -0
- package/src/sdk/connection.js +6 -0
- package/src/sdk/connection.js.map +1 -0
- package/{sdk → src/sdk}/license.d.ts +4 -4
- package/src/sdk/license.js +7 -0
- package/src/sdk/license.js.map +1 -0
- package/src/sdk/open-api.d.ts +10 -0
- package/src/sdk/open-api.js +8 -0
- package/src/sdk/open-api.js.map +1 -0
- package/src/sdk/py.d.ts +14 -0
- package/src/sdk/py.js +10 -0
- package/src/sdk/py.js.map +1 -0
- package/src/sdk/terraform.d.ts +6 -0
- package/src/sdk/terraform.js +7 -0
- package/src/sdk/terraform.js.map +1 -0
- package/src/sdk/ts.d.ts +33 -0
- package/src/sdk/ts.js +35 -0
- package/src/sdk/ts.js.map +1 -0
- package/{sdk → src/sdk}/utils/ast.d.ts +1 -2
- package/src/sdk/utils/ast.js +6 -0
- package/src/sdk/utils/ast.js.map +1 -0
- package/{sdk → src/sdk}/utils/format.d.ts +1 -1
- package/src/sdk/utils/format.js +6 -0
- package/src/sdk/utils/format.js.map +1 -0
- package/{sdk → src/sdk}/utils/test.d.ts +1 -1
- package/src/sdk/utils/test.js +6 -0
- package/src/sdk/utils/test.js.map +1 -0
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +2 -8
- package/src/smithy/project/files/build.Dockerfile.template +1 -4
- package/src/smithy/project/generator.js +48 -43
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/project/schema.d.js +6 -0
- package/src/smithy/project/schema.d.js.map +1 -0
- package/src/smithy/project/schema.d.ts +1 -0
- package/src/smithy/project/schema.json +5 -0
- package/src/smithy/react-connection/generator.js +39 -47
- package/src/smithy/react-connection/generator.js.map +1 -1
- package/src/smithy/react-connection/schema.d.js +6 -0
- package/src/smithy/react-connection/schema.d.js.map +1 -0
- package/src/smithy/react-connection/schema.d.ts +1 -0
- package/src/smithy/react-connection/schema.json +5 -0
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +395 -72
- package/src/smithy/ts/api/generator.js +125 -110
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/smithy/ts/api/schema.d.js +6 -0
- package/src/smithy/ts/api/schema.d.js.map +1 -0
- package/src/smithy/ts/api/schema.d.ts +1 -0
- package/src/smithy/ts/api/schema.json +5 -0
- package/src/terraform/project/files/application/src/providers.tf.template +1 -1
- package/src/terraform/project/generator.js +151 -104
- package/src/terraform/project/generator.js.map +1 -1
- package/src/terraform/project/schema.d.js +9 -0
- package/src/terraform/project/schema.d.js.map +1 -0
- package/src/terraform/project/schema.d.ts +1 -0
- package/src/terraform/project/schema.json +5 -0
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +336 -92
- package/src/trpc/backend/generator.d.ts +1 -1
- package/src/trpc/backend/generator.js +97 -86
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.js +6 -0
- package/src/trpc/backend/schema.d.js.map +1 -0
- package/src/trpc/backend/schema.d.ts +1 -0
- package/src/trpc/backend/schema.json +5 -0
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/trpc/react/generator.d.ts +1 -1
- package/src/trpc/react/generator.js +63 -58
- package/src/trpc/react/generator.js.map +1 -1
- package/src/trpc/react/schema.d.js +6 -0
- package/src/trpc/react/schema.d.js.map +1 -0
- package/src/trpc/react/schema.d.ts +1 -0
- package/src/trpc/react/schema.json +5 -0
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +11 -11
- package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +1 -1
- package/src/ts/agent/a2a-connection/generator.js +62 -55
- package/src/ts/agent/a2a-connection/generator.js.map +1 -1
- package/src/ts/agent/a2a-connection/schema.d.js +8 -0
- package/src/ts/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/ts/agent/a2a-connection/schema.d.ts +1 -0
- package/src/ts/agent/a2a-connection/schema.json +5 -0
- package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/agent/gateway-connection/files/agent-connection/app/__gatewayKebabCase__-client-strands.ts.template +3 -3
- package/src/ts/agent/gateway-connection/generator.js +61 -53
- package/src/ts/agent/gateway-connection/generator.js.map +1 -1
- package/src/ts/agent/gateway-connection/schema.d.js +6 -0
- package/src/ts/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/ts/agent/gateway-connection/schema.d.ts +1 -0
- package/src/ts/agent/gateway-connection/schema.json +5 -0
- package/src/ts/agent/generator.js +169 -137
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +1 -1
- package/src/ts/agent/mcp-connection/generator.js +52 -47
- package/src/ts/agent/mcp-connection/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/schema.d.js +8 -0
- package/src/ts/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/ts/agent/mcp-connection/schema.d.ts +1 -0
- package/src/ts/agent/mcp-connection/schema.json +5 -0
- package/src/ts/agent/react-connection/generator.d.ts +1 -1
- package/src/ts/agent/react-connection/generator.js +86 -80
- package/src/ts/agent/react-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +2 -2
- package/src/ts/agent/react-connection/local-dev.js +17 -0
- package/src/ts/agent/react-connection/local-dev.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.js +8 -0
- package/src/ts/agent/react-connection/schema.d.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.ts +1 -0
- package/src/ts/agent/react-connection/schema.json +5 -0
- package/src/ts/agent/schema.d.js +6 -0
- package/src/ts/agent/schema.d.js.map +1 -0
- package/src/ts/agent/schema.d.ts +1 -0
- package/src/ts/agent/schema.json +5 -0
- package/src/ts/api/generator.js +16 -16
- package/src/ts/api/generator.js.map +1 -1
- package/src/ts/api/schema.d.js +6 -0
- package/src/ts/api/schema.d.js.map +1 -0
- package/src/ts/api/schema.d.ts +1 -0
- package/src/ts/api/schema.json +5 -0
- package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/ts/astro-docs/generator.js +63 -51
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/astro-docs/schema.d.js +6 -0
- package/src/ts/astro-docs/schema.d.js.map +1 -0
- package/src/ts/astro-docs/schema.d.ts +2 -2
- package/src/ts/astro-docs/schema.json +3 -3
- package/src/ts/docs/generator.js +10 -10
- package/src/ts/docs/generator.js.map +1 -1
- package/src/ts/docs/schema.d.js +6 -0
- package/src/ts/docs/schema.d.js.map +1 -0
- package/src/ts/docs/schema.d.ts +1 -4
- package/src/ts/docs/schema.json +3 -3
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +68 -30
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/dynamodb/agent-connection/generator.js +21 -23
- package/src/ts/dynamodb/agent-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/agent-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/agent-connection/schema.json +5 -0
- package/src/ts/dynamodb/files/config.json.template +1 -1
- package/src/ts/dynamodb/files/src/client.ts.template +7 -7
- package/src/ts/dynamodb/generator.js +68 -63
- package/src/ts/dynamodb/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/dynamodb/mcp-server-connection/generator.js +21 -23
- package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +5 -0
- package/src/ts/dynamodb/schema.d.js +6 -0
- package/src/ts/dynamodb/schema.d.js.map +1 -0
- package/src/ts/dynamodb/schema.d.ts +1 -0
- package/src/ts/dynamodb/schema.json +5 -0
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/dynamodb/smithy-connection/generator.js +20 -22
- package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/smithy-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +5 -0
- package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/dynamodb/trpc-connection/generator.js +20 -22
- package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/trpc-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +5 -0
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/ts/lambda-function/generator.js +59 -56
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lambda-function/io.js +83 -52
- package/src/ts/lambda-function/io.js.map +1 -1
- package/src/ts/lambda-function/schema.d.js +6 -0
- package/src/ts/lambda-function/schema.d.js.map +1 -0
- package/src/ts/lambda-function/schema.d.ts +1 -0
- package/src/ts/lambda-function/schema.json +5 -0
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +23 -36
- package/src/ts/lib/biome.js +37 -37
- package/src/ts/lib/biome.js.map +1 -1
- package/src/ts/lib/generator.js +82 -80
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/schema.d.js +6 -0
- package/src/ts/lib/schema.d.js.map +1 -0
- package/src/ts/lib/schema.d.ts +1 -1
- package/src/ts/lib/schema.json +5 -0
- package/src/ts/lib/ts-project-utils.js +65 -70
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/types.js +5 -2
- package/src/ts/lib/types.js.map +1 -1
- package/src/ts/lib/vitest.js +29 -26
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/mcp-server/generator.js +161 -139
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.d.js +6 -0
- package/src/ts/mcp-server/schema.d.js.map +1 -0
- package/src/ts/mcp-server/schema.d.ts +1 -0
- package/src/ts/mcp-server/schema.json +5 -0
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +27 -12
- package/src/ts/nx-generator/files/common/schema.d.ts.template +1 -0
- package/src/ts/nx-generator/files/common/schema.json.template +5 -0
- package/src/ts/nx-generator/files/local/generator.ts.template +3 -3
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.ts.template +6 -7
- package/src/ts/nx-generator/generator.js +88 -84
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-generator/schema.d.js +6 -0
- package/src/ts/nx-generator/schema.d.js.map +1 -0
- package/src/ts/nx-generator/schema.d.ts +1 -0
- package/src/ts/nx-generator/schema.json +5 -0
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +30 -18
- package/src/ts/nx-plugin/files/mcp-server/server.ts.template +5 -5
- package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +1 -1
- package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/utils.ts.template +3 -3
- package/src/ts/nx-plugin/generator.js +57 -49
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/ts/nx-plugin/schema.d.js +9 -0
- package/src/ts/nx-plugin/schema.d.js.map +1 -0
- package/src/ts/nx-plugin/schema.json +5 -0
- package/src/ts/nx-plugin/utils.js +32 -44
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +30 -30
- package/src/ts/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/ts/rdb/agent-connection/generator.js +38 -39
- package/src/ts/rdb/agent-connection/generator.js.map +1 -1
- package/src/ts/rdb/agent-connection/schema.d.js +8 -0
- package/src/ts/rdb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/agent-connection/schema.d.ts +1 -0
- package/src/ts/rdb/agent-connection/schema.json +5 -0
- package/src/ts/rdb/files/config.json.template +1 -1
- package/src/ts/rdb/files/prisma.config.ts.template +2 -2
- package/src/ts/rdb/files/src/prisma.ts.template +7 -7
- package/src/ts/rdb/files/src/utils.ts.template +1 -0
- package/src/ts/rdb/generator.js +134 -117
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/ts/rdb/mcp-server-connection/generator.js +36 -37
- package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.json +5 -0
- package/src/ts/rdb/schema.d.js +6 -0
- package/src/ts/rdb/schema.d.js.map +1 -0
- package/src/ts/rdb/schema.d.ts +1 -0
- package/src/ts/rdb/schema.json +5 -0
- package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/rdb/smithy-connection/generator.js +46 -43
- package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
- package/src/ts/rdb/smithy-connection/schema.d.js +8 -0
- package/src/ts/rdb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/rdb/smithy-connection/schema.json +5 -0
- package/src/ts/rdb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/rdb/trpc-connection/generator.js +36 -31
- package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
- package/src/ts/rdb/trpc-connection/schema.d.js +8 -0
- package/src/ts/rdb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/rdb/trpc-connection/schema.json +5 -0
- package/src/ts/rdb/utils.js +9 -11
- package/src/ts/rdb/utils.js.map +1 -1
- package/src/ts/react-website/agui/generator.js +69 -61
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +178 -284
- package/src/ts/react-website/app/generator.d.ts +1 -1
- package/src/ts/react-website/app/generator.js +212 -191
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.js +6 -0
- package/src/ts/react-website/app/schema.d.js.map +1 -0
- package/src/ts/react-website/app/schema.d.ts +1 -1
- package/src/ts/react-website/app/schema.json +11 -6
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +118 -4
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +10 -3
- package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +2 -2
- package/src/ts/react-website/cognito-auth/generator.d.ts +1 -1
- package/src/ts/react-website/cognito-auth/generator.js +64 -60
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/schema.d.js +6 -0
- package/src/ts/react-website/cognito-auth/schema.d.js.map +1 -0
- package/src/ts/react-website/cognito-auth/schema.d.ts +1 -0
- package/src/ts/react-website/cognito-auth/schema.json +5 -0
- package/src/ts/react-website/cognito-auth/utils.js +34 -32
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
- package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +2 -2
- package/src/ts/react-website/runtime-config/generator.js +29 -31
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/ts/react-website/runtime-config/schema.d.js +6 -0
- package/src/ts/react-website/runtime-config/schema.d.js.map +1 -0
- package/src/ts/react-website/runtime-config/schema.d.ts +1 -0
- package/src/ts/react-website/runtime-config/schema.json +5 -0
- package/src/ts/sync/generator.js +60 -59
- package/src/ts/sync/generator.js.map +1 -1
- package/src/ts/website/app/generator.js +10 -10
- package/src/ts/website/app/generator.js.map +1 -1
- package/src/ts/website/app/schema.d.js +6 -0
- package/src/ts/website/app/schema.d.js.map +1 -0
- package/src/ts/website/app/schema.d.ts +1 -1
- package/src/ts/website/app/schema.json +11 -6
- package/src/ts/website/auth/generator.d.ts +1 -1
- package/src/ts/website/auth/generator.js +11 -10
- package/src/ts/website/auth/generator.js.map +1 -1
- package/src/ts/website/auth/schema.d.js +6 -0
- package/src/ts/website/auth/schema.d.js.map +1 -0
- package/src/ts/website/auth/schema.d.ts +1 -0
- package/src/ts/website/auth/schema.json +5 -0
- package/src/utils/agent-chat/agent-chat.d.ts +1 -1
- package/src/utils/agent-chat/agent-chat.js +11 -12
- package/src/utils/agent-chat/agent-chat.js.map +1 -1
- package/src/utils/agent-chat/files/a2a/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/ag-ui/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/http-py/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/http-ts/chat.ts.template +1 -1
- package/src/utils/agent-connection/agent-connection.js +129 -146
- package/src/utils/agent-connection/agent-connection.js.map +1 -1
- package/src/utils/agent-connection/files/core-gateway/agentcore-gateway-mcp-transport.ts.template +1 -1
- package/src/utils/agent-connection/files/core-strands/gateway/agentcore-gateway-mcp-client-strands.ts.template +1 -1
- package/src/utils/agent-connection/files/py-core-gateway/agentcore_gateway_mcp_transport.py.template +1 -1
- package/src/utils/agent-connection/files/py-core-langchain/gateway/agentcore_gateway_mcp_client_langchain.py.template +1 -1
- package/src/utils/agent-connection/files/py-core-strands/gateway/agentcore_gateway_mcp_client_strands.py.template +1 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.js +53 -50
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +4 -4
- package/src/utils/agent-core-constructs/files/terraform/core/agentcore-gateway/gateway.tf.template +2 -2
- package/src/utils/api-constructs/api-constructs.js +30 -31
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +14 -6
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account/index.js.template +58 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account.ts.template +82 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +28 -14
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -8
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +91 -4
- package/src/utils/api-constructs/files/terraform/core/api/http/http-api/http-api.tf.template +1 -1
- package/src/utils/api-constructs/files/terraform/core/api/rest/api-gateway-account/api-gateway-account.tf.template +83 -0
- package/src/utils/api-constructs/files/terraform/core/api/rest/rest-api/rest-api.tf.template +5 -11
- package/src/utils/api-constructs/open-api-metadata.js +22 -22
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
- package/src/utils/ast/website.js +17 -19
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.js +72 -97
- package/src/utils/ast.js.map +1 -1
- package/src/utils/bundle/bundle.js +50 -47
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/commands.js +47 -26
- package/src/utils/commands.js.map +1 -1
- package/src/utils/config/index.d.ts +2 -2
- package/src/utils/config/index.js +5 -4
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/config/utils.js +48 -58
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/react.d.ts +5 -5
- package/src/utils/connection/open-api/react.js +81 -77
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/containers.js +22 -23
- package/src/utils/containers.js.map +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +32 -33
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +12 -2
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +1 -1
- package/src/utils/files/common/scripts/src/dynamodb/create-local-table.ts.template +2 -2
- package/src/utils/files/common/scripts/src/dynamodb/pull-image.ts.template +1 -1
- package/src/utils/files/common/scripts/src/dynamodb/start-container.ts.template +17 -2
- package/src/utils/files/common/scripts/src/infra/stage-credentials/cdk-command.ts.template +11 -3
- package/src/utils/files/common/scripts/src/rdb/mysql/wait-for-mysql-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/postgres/wait-for-postgres-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/{pull-image.ts.template → shared/pull-image.ts.template} +1 -1
- package/src/utils/files/common/scripts/src/rdb/{start-container.ts.template → shared/start-container.ts.template} +16 -1
- package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +2 -2
- package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +3 -3
- package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +2 -2
- package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +1 -1
- package/src/utils/format.js +153 -99
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.js +14 -13
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/__nameKebabCase__/__nameKebabCase__.tf.template +2 -2
- package/src/utils/function-constructs/function-constructs.js +21 -26
- package/src/utils/function-constructs/function-constructs.js.map +1 -1
- package/src/utils/generators.js +18 -20
- package/src/utils/generators.js.map +1 -1
- package/src/utils/git.js +19 -34
- package/src/utils/git.js.map +1 -1
- package/src/utils/iac-providers.js +5 -5
- package/src/utils/iac-providers.js.map +1 -1
- package/src/utils/iac.js +12 -14
- package/src/utils/iac.js.map +1 -1
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +112 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +2 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +104 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +7 -0
- package/src/utils/identity-constructs/identity-constructs.js +24 -28
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/install.d.ts +32 -0
- package/src/utils/install.js +56 -0
- package/src/utils/install.js.map +1 -0
- package/src/utils/js.js +27 -20
- package/src/utils/js.js.map +1 -1
- package/src/utils/mcp.js +34 -41
- package/src/utils/mcp.js.map +1 -1
- package/src/utils/metrics.js +30 -45
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/mock-project-graph.js +8 -12
- package/src/utils/mock-project-graph.js.map +1 -1
- package/src/utils/names.js +25 -51
- package/src/utils/names.js.map +1 -1
- package/src/utils/npm-scope.js +9 -17
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +18 -2
- package/src/utils/nx.js +111 -74
- package/src/utils/nx.js.map +1 -1
- package/src/utils/nxlv-python.js +27 -15
- package/src/utils/nxlv-python.js.map +1 -1
- package/src/utils/object.js +5 -11
- package/src/utils/object.js.map +1 -1
- package/src/utils/paths.js +11 -15
- package/src/utils/paths.js.map +1 -1
- package/src/utils/pkg-manager.js +4 -9
- package/src/utils/pkg-manager.js.map +1 -1
- package/src/utils/pnpm-workspace.js +22 -22
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.js +26 -36
- package/src/utils/port.js.map +1 -1
- package/src/utils/py.js +43 -52
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +3 -3
- package/src/utils/rdb-constructs/rdb-constructs.js +31 -33
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/shared-constructs-constants.js +16 -16
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/shared-constructs.js +57 -54
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-dynamodb-scripts.js +16 -14
- package/src/utils/shared-dynamodb-scripts.js.map +1 -1
- package/src/utils/shared-infra-config.js +30 -31
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-infra-scripts.js +30 -25
- package/src/utils/shared-infra-scripts.js.map +1 -1
- package/src/utils/shared-rdb-scripts.d.ts +8 -3
- package/src/utils/shared-rdb-scripts.js +21 -13
- package/src/utils/shared-rdb-scripts.js.map +1 -1
- package/src/utils/shared-scripts.js +12 -17
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.js +64 -60
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/test.d.ts +8 -0
- package/src/utils/test.js +33 -25
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.js +7 -15
- package/src/utils/toml.js.map +1 -1
- package/src/utils/versions.d.ts +93 -66
- package/src/utils/versions.js +102 -85
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/terraform/app/static-websites/__websiteNameKebabCase__/__websiteNameKebabCase__.tf.template +1 -1
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +4 -4
- package/src/utils/website-constructs/website-constructs.js +31 -30
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/bin/aws-nx-mcp.js +0 -17
- package/bin/aws-nx-mcp.js.map +0 -1
- package/sdk/agentcore-gateway.d.ts +0 -6
- package/sdk/agentcore-gateway.js +0 -11
- package/sdk/agentcore-gateway.js.map +0 -1
- package/sdk/connection.d.ts +0 -6
- package/sdk/connection.js +0 -10
- package/sdk/connection.js.map +0 -1
- package/sdk/license.js +0 -14
- package/sdk/license.js.map +0 -1
- package/sdk/open-api.d.ts +0 -10
- package/sdk/open-api.js +0 -15
- package/sdk/open-api.js.map +0 -1
- package/sdk/py.d.ts +0 -14
- package/sdk/py.js +0 -18
- package/sdk/py.js.map +0 -1
- package/sdk/terraform.d.ts +0 -6
- package/sdk/terraform.js +0 -11
- package/sdk/terraform.js.map +0 -1
- package/sdk/ts.d.ts +0 -33
- package/sdk/ts.js +0 -53
- package/sdk/ts.js.map +0 -1
- package/sdk/utils/ast.js +0 -12
- package/sdk/utils/ast.js.map +0 -1
- package/sdk/utils/format.js +0 -10
- package/sdk/utils/format.js.map +0 -1
- package/sdk/utils/test.js +0 -10
- package/sdk/utils/test.js.map +0 -1
- package/src/connection/agent-serve-local.js +0 -48
- package/src/connection/agent-serve-local.js.map +0 -1
- package/src/connection/serve-local.js +0 -41
- package/src/connection/serve-local.js.map +0 -1
- package/src/py/agent/react-connection/serve-local.js +0 -38
- package/src/py/agent/react-connection/serve-local.js.map +0 -1
- package/src/ts/agent/react-connection/serve-local.js +0 -19
- package/src/ts/agent/react-connection/serve-local.js.map +0 -1
- package/src/utils/files/common/scripts/src/rdb/wait-for-db.ts.template +0 -59
- /package/src/agentcore-gateway/files/project/{serve-local.ts.template → local-dev.ts.template} +0 -0
- /package/{bin → src/bin}/aws-nx-mcp.d.ts +0 -0
|
@@ -1,52 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PY_MCP_FAMILY_CONNECTIONS = exports.PY_CLIENT_NAMING = exports.AGENT_CONNECTION_PROJECT_DIR = void 0;
|
|
4
|
-
exports.getPythonAgentConnectionProjectDir = getPythonAgentConnectionProjectDir;
|
|
5
|
-
exports.getPythonAgentConnectionModuleName = getPythonAgentConnectionModuleName;
|
|
6
|
-
exports.getPythonAgentConnectionProject = getPythonAgentConnectionProject;
|
|
7
|
-
exports.resolveAgentFramework = resolveAgentFramework;
|
|
8
|
-
exports.ensureTypeScriptAgentConnectionProject = ensureTypeScriptAgentConnectionProject;
|
|
9
|
-
exports.addTypeScriptFrameworkBase = addTypeScriptFrameworkBase;
|
|
10
|
-
exports.addTypeScriptCoreClient = addTypeScriptCoreClient;
|
|
11
|
-
exports.ensurePythonAgentConnectionProject = ensurePythonAgentConnectionProject;
|
|
12
|
-
exports.addPythonFrameworkBase = addPythonFrameworkBase;
|
|
13
|
-
exports.addPythonCoreClient = addPythonCoreClient;
|
|
14
|
-
exports.addTypeScriptClientToAgent = addTypeScriptClientToAgent;
|
|
15
|
-
exports.addPythonReExport = addPythonReExport;
|
|
16
|
-
const tslib_1 = require("tslib");
|
|
17
1
|
/**
|
|
18
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
/** Prefix a GritQL pattern with `language python` */
|
|
27
|
-
const py = (pattern) => `language python\n${pattern}`;
|
|
4
|
+
*/ import { generateFiles, joinPathFragments, OverwriteStrategy } from "@nx/devkit";
|
|
5
|
+
import pyProjectGenerator, { getPyProjectDetails } from "../../py/project/generator.js";
|
|
6
|
+
import tsProjectGenerator from "../../ts/lib/generator.js";
|
|
7
|
+
import { addStarExport, applyGritQL, matchGritQL } from "../ast.js";
|
|
8
|
+
import { addDependenciesToPyProjectToml } from "../py.js";
|
|
9
|
+
/** Prefix a GritQL pattern with `language python` */ const py = (pattern)=>`language python\n${pattern}`;
|
|
28
10
|
const AGENT_CONNECTION_DIR = 'agent-connection';
|
|
29
11
|
const PACKAGES_DIR = 'packages';
|
|
30
12
|
const COMMON_DIR = 'common';
|
|
31
|
-
|
|
13
|
+
export const AGENT_CONNECTION_PROJECT_DIR = joinPathFragments(PACKAGES_DIR, COMMON_DIR, AGENT_CONNECTION_DIR);
|
|
32
14
|
const PY_AGENT_CONNECTION_NAME = 'agent_connection';
|
|
33
15
|
/**
|
|
34
16
|
* Get the directory of the shared Python agent-connection project.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
const { dir } = (0, generator_1.getPyProjectDetails)(tree, {
|
|
17
|
+
*/ export function getPythonAgentConnectionProjectDir(tree) {
|
|
18
|
+
const { dir } = getPyProjectDetails(tree, {
|
|
38
19
|
name: PY_AGENT_CONNECTION_NAME,
|
|
39
|
-
directory:
|
|
20
|
+
directory: joinPathFragments(PACKAGES_DIR, COMMON_DIR)
|
|
40
21
|
});
|
|
41
22
|
return dir;
|
|
42
23
|
}
|
|
43
24
|
/**
|
|
44
25
|
* Get the Python module name of the shared agent-connection project.
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
const { normalizedModuleName } = (0, generator_1.getPyProjectDetails)(tree, {
|
|
26
|
+
*/ export function getPythonAgentConnectionModuleName(tree) {
|
|
27
|
+
const { normalizedModuleName } = getPyProjectDetails(tree, {
|
|
48
28
|
name: PY_AGENT_CONNECTION_NAME,
|
|
49
|
-
directory:
|
|
29
|
+
directory: joinPathFragments(PACKAGES_DIR, COMMON_DIR)
|
|
50
30
|
});
|
|
51
31
|
return normalizedModuleName;
|
|
52
32
|
}
|
|
@@ -55,36 +35,36 @@ function getPythonAgentConnectionModuleName(tree) {
|
|
|
55
35
|
* passing to {@link addWorkspaceDependencyToPyProject} (which derives the
|
|
56
36
|
* dependency's PEP 503 distribution name from the project itself, so callers
|
|
57
37
|
* never construct the name).
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
const { fullyQualifiedName, dir } = (0, generator_1.getPyProjectDetails)(tree, {
|
|
38
|
+
*/ export function getPythonAgentConnectionProject(tree) {
|
|
39
|
+
const { fullyQualifiedName, dir } = getPyProjectDetails(tree, {
|
|
61
40
|
name: PY_AGENT_CONNECTION_NAME,
|
|
62
|
-
directory:
|
|
41
|
+
directory: joinPathFragments(PACKAGES_DIR, COMMON_DIR)
|
|
63
42
|
});
|
|
64
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
name: fullyQualifiedName,
|
|
45
|
+
root: dir
|
|
46
|
+
};
|
|
65
47
|
}
|
|
66
48
|
/**
|
|
67
49
|
* Resolve an agent component's framework, defaulting to `strands`. Connection
|
|
68
50
|
* generators dispatch on the returned framework to pick the matching templates
|
|
69
51
|
* and agent.py/agent.ts transforms.
|
|
70
|
-
*/
|
|
71
|
-
function resolveAgentFramework(framework) {
|
|
52
|
+
*/ export function resolveAgentFramework(framework) {
|
|
72
53
|
return framework === 'langchain' ? 'langchain' : 'strands';
|
|
73
54
|
}
|
|
74
55
|
/**
|
|
75
56
|
* Framework-agnostic Layer-1 templates, keyed by protocol. These resolve the
|
|
76
57
|
* endpoint and build the signed transport/client-config; they contain no
|
|
77
58
|
* framework dependency.
|
|
78
|
-
*/
|
|
79
|
-
const TS_PROTOCOL_TEMPLATES = {
|
|
59
|
+
*/ const TS_PROTOCOL_TEMPLATES = {
|
|
80
60
|
mcp: 'core-mcp',
|
|
81
61
|
gateway: 'core-gateway',
|
|
82
|
-
a2a: 'core-a2a'
|
|
62
|
+
a2a: 'core-a2a'
|
|
83
63
|
};
|
|
84
64
|
const PY_PROTOCOL_TEMPLATES = {
|
|
85
65
|
mcp: 'py-core-mcp',
|
|
86
66
|
gateway: 'py-core-gateway',
|
|
87
|
-
a2a: 'py-core-a2a'
|
|
67
|
+
a2a: 'py-core-a2a'
|
|
88
68
|
};
|
|
89
69
|
const FRAMEWORKS = {
|
|
90
70
|
strands: {
|
|
@@ -93,39 +73,41 @@ const FRAMEWORKS = {
|
|
|
93
73
|
baseReExports: [
|
|
94
74
|
{
|
|
95
75
|
fromModule: './core/with-session-id-strands.js',
|
|
96
|
-
importName: '*'
|
|
76
|
+
importName: '*'
|
|
97
77
|
},
|
|
98
78
|
{
|
|
99
79
|
fromModule: './core/model-errors-strands.js',
|
|
100
|
-
importName: '*'
|
|
101
|
-
}
|
|
80
|
+
importName: '*'
|
|
81
|
+
}
|
|
102
82
|
],
|
|
103
83
|
protocols: {
|
|
104
84
|
mcp: 'core-strands/mcp',
|
|
105
85
|
gateway: 'core-strands/gateway',
|
|
106
|
-
a2a: 'core-strands/a2a'
|
|
86
|
+
a2a: 'core-strands/a2a'
|
|
107
87
|
},
|
|
108
|
-
deps: []
|
|
88
|
+
deps: []
|
|
109
89
|
},
|
|
110
90
|
py: {
|
|
111
91
|
base: 'py-core-strands/base',
|
|
112
92
|
baseReExports: [
|
|
113
93
|
{
|
|
114
94
|
fromModule: '.core.with_session_id_strands',
|
|
115
|
-
importName: 'with_session_id'
|
|
95
|
+
importName: 'with_session_id'
|
|
116
96
|
},
|
|
117
97
|
{
|
|
118
98
|
fromModule: '.core.model_errors_strands',
|
|
119
|
-
importName: 'log_model_errors'
|
|
120
|
-
}
|
|
99
|
+
importName: 'log_model_errors'
|
|
100
|
+
}
|
|
121
101
|
],
|
|
122
102
|
protocols: {
|
|
123
103
|
mcp: 'py-core-strands/mcp',
|
|
124
104
|
gateway: 'py-core-strands/gateway',
|
|
125
|
-
a2a: 'py-core-strands/a2a'
|
|
105
|
+
a2a: 'py-core-strands/a2a'
|
|
126
106
|
},
|
|
127
|
-
deps: [
|
|
128
|
-
|
|
107
|
+
deps: [
|
|
108
|
+
'strands-agents'
|
|
109
|
+
]
|
|
110
|
+
}
|
|
129
111
|
},
|
|
130
112
|
langchain: {
|
|
131
113
|
// LangChain is supported for Python agents only (the TypeScript LangChain
|
|
@@ -142,14 +124,13 @@ const FRAMEWORKS = {
|
|
|
142
124
|
protocols: {
|
|
143
125
|
mcp: 'py-core-langchain/mcp',
|
|
144
126
|
gateway: 'py-core-langchain/gateway',
|
|
145
|
-
a2a: 'py-core-langchain/a2a'
|
|
127
|
+
a2a: 'py-core-langchain/a2a'
|
|
146
128
|
},
|
|
147
|
-
deps: []
|
|
148
|
-
}
|
|
149
|
-
}
|
|
129
|
+
deps: []
|
|
130
|
+
}
|
|
131
|
+
}
|
|
150
132
|
};
|
|
151
|
-
/** Resolve a framework's templates for a language + protocol, or throw. */
|
|
152
|
-
function frameworkLanguage(framework, language, protocol) {
|
|
133
|
+
/** Resolve a framework's templates for a language + protocol, or throw. */ function frameworkLanguage(framework, language, protocol) {
|
|
153
134
|
const lang = FRAMEWORKS[framework][language];
|
|
154
135
|
if (!lang) {
|
|
155
136
|
throw new Error(`The '${framework}' framework does not support ${language === 'ts' ? 'TypeScript' : 'Python'} agents.`);
|
|
@@ -158,31 +139,37 @@ function frameworkLanguage(framework, language, protocol) {
|
|
|
158
139
|
if (!protocolDir) {
|
|
159
140
|
throw new Error(`The '${framework}' framework does not support ${protocol} connections for ${language === 'ts' ? 'TypeScript' : 'Python'} agents.`);
|
|
160
141
|
}
|
|
161
|
-
return {
|
|
142
|
+
return {
|
|
143
|
+
...lang,
|
|
144
|
+
protocol: protocolDir
|
|
145
|
+
};
|
|
162
146
|
}
|
|
163
|
-
/** Protocols whose Layer-1 needs the shared MCP transport (`core-shared`). */
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
147
|
+
/** Protocols whose Layer-1 needs the shared MCP transport (`core-shared`). */ const MCP_TRANSPORT_PROTOCOLS = [
|
|
148
|
+
'mcp',
|
|
149
|
+
'gateway'
|
|
150
|
+
];
|
|
151
|
+
const tsCoreDir = ()=>joinPathFragments(AGENT_CONNECTION_PROJECT_DIR, 'src', 'core');
|
|
152
|
+
const emitTs = (tree, templateDir)=>generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', templateDir), tsCoreDir(), {}, {
|
|
153
|
+
overwriteStrategy: OverwriteStrategy.KeepExisting
|
|
154
|
+
});
|
|
167
155
|
/**
|
|
168
156
|
* Ensure the shared TypeScript agent-connection project exists and has the
|
|
169
157
|
* framework-agnostic core helpers (runtime-config loader, session context).
|
|
170
158
|
* Per-connection generators emit their own protocol + framework client
|
|
171
159
|
* templates via `addTypeScriptCoreClient`.
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
const projectJsonPath = (0, devkit_1.joinPathFragments)(exports.AGENT_CONNECTION_PROJECT_DIR, 'project.json');
|
|
160
|
+
*/ export async function ensureTypeScriptAgentConnectionProject(tree) {
|
|
161
|
+
const projectJsonPath = joinPathFragments(AGENT_CONNECTION_PROJECT_DIR, 'project.json');
|
|
175
162
|
if (!tree.exists(projectJsonPath)) {
|
|
176
|
-
await (
|
|
163
|
+
await tsProjectGenerator(tree, {
|
|
177
164
|
name: AGENT_CONNECTION_DIR,
|
|
178
|
-
directory:
|
|
165
|
+
directory: joinPathFragments(PACKAGES_DIR, COMMON_DIR)
|
|
179
166
|
});
|
|
180
167
|
}
|
|
181
168
|
// Framework-agnostic runtime-config + session-context helpers.
|
|
182
169
|
emitTs(tree, 'core-runtime-config');
|
|
183
170
|
// Re-export session-context helpers so agent server entry points can set the
|
|
184
171
|
// current session on each inbound request without pulling in internals.
|
|
185
|
-
await
|
|
172
|
+
await addStarExport(tree, joinPathFragments(AGENT_CONNECTION_PROJECT_DIR, 'src', 'index.ts'), './core/session-context.js');
|
|
186
173
|
}
|
|
187
174
|
/**
|
|
188
175
|
* Emit a framework's base Layer-2 helpers (model-error logging + per-session
|
|
@@ -190,8 +177,7 @@ async function ensureTypeScriptAgentConnectionProject(tree) {
|
|
|
190
177
|
* server entry point imports these regardless of whether any connection client
|
|
191
178
|
* is wired in, so the agent generator calls this directly; connection
|
|
192
179
|
* generators call it transitively via `addTypeScriptCoreClient`.
|
|
193
|
-
*/
|
|
194
|
-
async function addTypeScriptFrameworkBase(tree, framework = 'strands') {
|
|
180
|
+
*/ export async function addTypeScriptFrameworkBase(tree, framework = 'strands') {
|
|
195
181
|
const lang = FRAMEWORKS[framework].ts;
|
|
196
182
|
if (!lang) {
|
|
197
183
|
throw new Error(`The '${framework}' framework does not support TypeScript agents.`);
|
|
@@ -199,9 +185,9 @@ async function addTypeScriptFrameworkBase(tree, framework = 'strands') {
|
|
|
199
185
|
if (lang.base) {
|
|
200
186
|
emitTs(tree, lang.base);
|
|
201
187
|
}
|
|
202
|
-
const indexPath =
|
|
203
|
-
for (const reExport of lang.baseReExports)
|
|
204
|
-
await
|
|
188
|
+
const indexPath = joinPathFragments(AGENT_CONNECTION_PROJECT_DIR, 'src', 'index.ts');
|
|
189
|
+
for (const reExport of lang.baseReExports){
|
|
190
|
+
await addStarExport(tree, indexPath, reExport.fromModule);
|
|
205
191
|
}
|
|
206
192
|
}
|
|
207
193
|
/**
|
|
@@ -214,8 +200,7 @@ async function addTypeScriptFrameworkBase(tree, framework = 'strands') {
|
|
|
214
200
|
* - Layer 1 `core-shared` MCP transport — for mcp/gateway protocols
|
|
215
201
|
* - Layer 1 the protocol's transport/client-config — always
|
|
216
202
|
* - Layer 2 the framework's base helpers + protocol client — per framework
|
|
217
|
-
*/
|
|
218
|
-
async function addTypeScriptCoreClient(tree, protocol, framework = 'strands') {
|
|
203
|
+
*/ export async function addTypeScriptCoreClient(tree, protocol, framework = 'strands') {
|
|
219
204
|
const fw = frameworkLanguage(framework, 'ts', protocol);
|
|
220
205
|
emitTs(tree, 'core-auth');
|
|
221
206
|
if (MCP_TRANSPORT_PROTOCOLS.includes(protocol)) {
|
|
@@ -231,50 +216,54 @@ async function addTypeScriptCoreClient(tree, protocol, framework = 'strands') {
|
|
|
231
216
|
* Ensure the shared Python agent-connection project exists.
|
|
232
217
|
* Only creates the project shell — per-connection generators are responsible
|
|
233
218
|
* for emitting their own core client templates.
|
|
234
|
-
*/
|
|
235
|
-
async function ensurePythonAgentConnectionProject(tree) {
|
|
219
|
+
*/ export async function ensurePythonAgentConnectionProject(tree) {
|
|
236
220
|
const projectDir = getPythonAgentConnectionProjectDir(tree);
|
|
237
221
|
const moduleName = getPythonAgentConnectionModuleName(tree);
|
|
238
|
-
const projectJsonPath =
|
|
222
|
+
const projectJsonPath = joinPathFragments(projectDir, 'project.json');
|
|
239
223
|
if (!tree.exists(projectJsonPath)) {
|
|
240
224
|
// Create the Python project using the standard py#project generator
|
|
241
|
-
await (
|
|
225
|
+
await pyProjectGenerator(tree, {
|
|
242
226
|
name: PY_AGENT_CONNECTION_NAME,
|
|
243
|
-
directory:
|
|
244
|
-
type: 'library'
|
|
227
|
+
directory: joinPathFragments(PACKAGES_DIR, COMMON_DIR),
|
|
228
|
+
type: 'library'
|
|
245
229
|
});
|
|
246
230
|
}
|
|
247
|
-
const moduleDir =
|
|
231
|
+
const moduleDir = joinPathFragments(projectDir, moduleName);
|
|
248
232
|
// Ensure core/__init__.py exists
|
|
249
|
-
const coreDir =
|
|
250
|
-
if (!tree.exists(
|
|
251
|
-
tree.write(
|
|
233
|
+
const coreDir = joinPathFragments(moduleDir, 'core');
|
|
234
|
+
if (!tree.exists(joinPathFragments(coreDir, '__init__.py'))) {
|
|
235
|
+
tree.write(joinPathFragments(coreDir, '__init__.py'), '');
|
|
252
236
|
}
|
|
253
237
|
// Ensure app/__init__.py exists
|
|
254
|
-
const appInitPath =
|
|
238
|
+
const appInitPath = joinPathFragments(moduleDir, 'app', '__init__.py');
|
|
255
239
|
if (!tree.exists(appInitPath)) {
|
|
256
240
|
tree.write(appInitPath, '');
|
|
257
241
|
}
|
|
258
242
|
// Framework-agnostic runtime-config + session-context helpers.
|
|
259
|
-
|
|
243
|
+
generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', 'py-core-runtime-config'), coreDir, {}, {
|
|
244
|
+
overwriteStrategy: OverwriteStrategy.KeepExisting
|
|
245
|
+
});
|
|
260
246
|
// Re-export the session id context so agent server entry points can set the
|
|
261
247
|
// current session on each inbound request without importing internals.
|
|
262
|
-
const moduleInitPath =
|
|
248
|
+
const moduleInitPath = joinPathFragments(moduleDir, '__init__.py');
|
|
263
249
|
await addPythonReExport(tree, moduleInitPath, '.core.session_context', 'get_current_session_id');
|
|
264
250
|
await addPythonReExport(tree, moduleInitPath, '.core.session_context', 'session_id_context');
|
|
265
251
|
// The runtime-config loader reads AppConfig via aws-lambda-powertools.
|
|
266
|
-
|
|
252
|
+
addDependenciesToPyProjectToml(tree, projectDir, [
|
|
253
|
+
'aws-lambda-powertools'
|
|
254
|
+
]);
|
|
267
255
|
}
|
|
268
|
-
const pyCoreDir = (tree)
|
|
269
|
-
const emitPy = (tree, templateDir)
|
|
256
|
+
const pyCoreDir = (tree)=>joinPathFragments(getPythonAgentConnectionProjectDir(tree), getPythonAgentConnectionModuleName(tree), 'core');
|
|
257
|
+
const emitPy = (tree, templateDir)=>generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', templateDir), pyCoreDir(tree), {}, {
|
|
258
|
+
overwriteStrategy: OverwriteStrategy.KeepExisting
|
|
259
|
+
});
|
|
270
260
|
/**
|
|
271
261
|
* Emit a framework's base Layer-2 helpers (model-error logging + per-session
|
|
272
262
|
* agent cache) into the Python agent-connection project and re-export them.
|
|
273
263
|
* The agent server entry point imports these regardless of whether a connection
|
|
274
264
|
* client is wired in, so the agent generator calls this directly; connection
|
|
275
265
|
* generators call it transitively via `addPythonCoreClient`.
|
|
276
|
-
*/
|
|
277
|
-
async function addPythonFrameworkBase(tree, framework = 'strands') {
|
|
266
|
+
*/ export async function addPythonFrameworkBase(tree, framework = 'strands') {
|
|
278
267
|
const lang = FRAMEWORKS[framework].py;
|
|
279
268
|
if (!lang) {
|
|
280
269
|
throw new Error(`The '${framework}' framework does not support Python agents.`);
|
|
@@ -282,12 +271,12 @@ async function addPythonFrameworkBase(tree, framework = 'strands') {
|
|
|
282
271
|
if (lang.base) {
|
|
283
272
|
emitPy(tree, lang.base);
|
|
284
273
|
}
|
|
285
|
-
const moduleInitPath =
|
|
286
|
-
for (const reExport of lang.baseReExports)
|
|
274
|
+
const moduleInitPath = joinPathFragments(getPythonAgentConnectionProjectDir(tree), getPythonAgentConnectionModuleName(tree), '__init__.py');
|
|
275
|
+
for (const reExport of lang.baseReExports){
|
|
287
276
|
await addPythonReExport(tree, moduleInitPath, reExport.fromModule, reExport.importName);
|
|
288
277
|
}
|
|
289
278
|
if (lang.deps.length > 0) {
|
|
290
|
-
|
|
279
|
+
addDependenciesToPyProjectToml(tree, getPythonAgentConnectionProjectDir(tree), lang.deps);
|
|
291
280
|
}
|
|
292
281
|
}
|
|
293
282
|
/**
|
|
@@ -299,8 +288,7 @@ async function addPythonFrameworkBase(tree, framework = 'strands') {
|
|
|
299
288
|
* - Layer 1 `py-core-shared` MCP transport — for mcp/gateway protocols
|
|
300
289
|
* - Layer 1 the protocol's transport/client-config — always
|
|
301
290
|
* - Layer 2 the framework's base helpers + protocol client — per framework
|
|
302
|
-
*/
|
|
303
|
-
async function addPythonCoreClient(tree, protocol, framework = 'strands') {
|
|
291
|
+
*/ export async function addPythonCoreClient(tree, protocol, framework = 'strands') {
|
|
304
292
|
const fw = frameworkLanguage(framework, 'py', protocol);
|
|
305
293
|
emitPy(tree, 'py-core-auth');
|
|
306
294
|
if (MCP_TRANSPORT_PROTOCOLS.includes(protocol)) {
|
|
@@ -316,13 +304,12 @@ async function addPythonCoreClient(tree, protocol, framework = 'strands') {
|
|
|
316
304
|
* in the Agent's tools. Used by the MCP and gateway connection generators —
|
|
317
305
|
* the client class must expose a static async `create()` returning a value
|
|
318
306
|
* accepted by `Agent.tools` (e.g. an `McpClient`).
|
|
319
|
-
*/
|
|
320
|
-
async function addTypeScriptClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
307
|
+
*/ export async function addTypeScriptClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
321
308
|
const clientCreationStmt = `const ${clientVarName} = await ${clientClassName}.create();`;
|
|
322
309
|
// Transform the arrow function that contains `new Agent`:
|
|
323
310
|
// - Expression body: wrap in block with client creation and return
|
|
324
311
|
// - Block body: prepend client creation statement
|
|
325
|
-
await
|
|
312
|
+
await applyGritQL(tree, agentFilePath, `or { \`async ($p) => new Agent($args)\` => raw\`async ($p) => {
|
|
326
313
|
${clientCreationStmt}
|
|
327
314
|
return new Agent($args);
|
|
328
315
|
}\` where { $program <: not contains \`${clientClassName}.create\` }, \`async ($p) => { $body }\` => raw\`async ($p) => {
|
|
@@ -330,7 +317,7 @@ async function addTypeScriptClientToAgent(tree, agentFilePath, clientClassName,
|
|
|
330
317
|
$body
|
|
331
318
|
}\` where { $body <: contains \`new Agent($_)\`, $program <: not contains \`${clientClassName}.create\` } }`);
|
|
332
319
|
// Prepend the client to the tools array
|
|
333
|
-
await
|
|
320
|
+
await applyGritQL(tree, agentFilePath, `\`tools: [$items]\` => \`tools: [${clientVarName}, $items]\` where { $items <: within \`new Agent($_)\`, $items <: not contains \`${clientVarName}\` }`);
|
|
334
321
|
}
|
|
335
322
|
/**
|
|
336
323
|
* Patch a Python agent.py to create a context-managed connection client,
|
|
@@ -338,19 +325,17 @@ async function addTypeScriptClientToAgent(tree, agentFilePath, clientClassName,
|
|
|
338
325
|
* `list_tools_sync()` into the Agent's tools. Used by the MCP and gateway
|
|
339
326
|
* connection generators — the client class must expose a static `create()`
|
|
340
327
|
* returning a context manager with `list_tools_sync()` (e.g. an `MCPClient`).
|
|
341
|
-
*/
|
|
342
|
-
async function addPythonClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
328
|
+
*/ async function addPythonClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
343
329
|
await addPythonClientTools(tree, agentFilePath, clientVarName);
|
|
344
330
|
await addPythonClientToGetAgent(tree, agentFilePath, clientClassName, clientVarName);
|
|
345
331
|
}
|
|
346
332
|
/**
|
|
347
333
|
* Append `*<clientVarName>.list_tools_sync()` to the Agent's tools list.
|
|
348
|
-
*/
|
|
349
|
-
|
|
350
|
-
if (await (0, ast_1.matchGritQL)(tree, filePath, py(`\`${clientVarName}.list_tools_sync()\``))) {
|
|
334
|
+
*/ const addPythonClientTools = async (tree, filePath, clientVarName)=>{
|
|
335
|
+
if (await matchGritQL(tree, filePath, py(`\`${clientVarName}.list_tools_sync()\``))) {
|
|
351
336
|
return;
|
|
352
337
|
}
|
|
353
|
-
await
|
|
338
|
+
await applyGritQL(tree, filePath, py(`\`tools=$old\` where {
|
|
354
339
|
$old <: not contains \`${clientVarName}\`,
|
|
355
340
|
if ($old <: \`[]\`) {
|
|
356
341
|
$old => \`[*${clientVarName}.list_tools_sync()]\`
|
|
@@ -365,21 +350,20 @@ const addPythonClientTools = async (tree, filePath, clientVarName) => {
|
|
|
365
350
|
* First connection: rewrites `def get_agent` to wrap the body in a with
|
|
366
351
|
* block. Subsequent connections: adds to the existing with items and
|
|
367
352
|
* prepends the creation line.
|
|
368
|
-
*/
|
|
369
|
-
|
|
370
|
-
if (await (0, ast_1.matchGritQL)(tree, filePath, py(`\`${clientClassName}.create()\``))) {
|
|
353
|
+
*/ const addPythonClientToGetAgent = async (tree, filePath, clientClassName, clientVarName)=>{
|
|
354
|
+
if (await matchGritQL(tree, filePath, py(`\`${clientClassName}.create()\``))) {
|
|
371
355
|
return;
|
|
372
356
|
}
|
|
373
357
|
// Try the "add to existing with block" pattern first.
|
|
374
358
|
// If it succeeds, there was already a with block from a previous connection.
|
|
375
|
-
const addedToWith = await
|
|
359
|
+
const addedToWith = await applyGritQL(tree, filePath, py(`\`with ($items,): $body\` where {
|
|
376
360
|
$items <: not contains \`${clientVarName}\`,
|
|
377
361
|
$items += \`, ${clientVarName}\`
|
|
378
362
|
}`));
|
|
379
363
|
if (addedToWith) {
|
|
380
364
|
// Subsequent connection — prepend the creation line to the function body
|
|
381
365
|
// (a single anchor, so the line is inserted exactly once).
|
|
382
|
-
await
|
|
366
|
+
await applyGritQL(tree, filePath, py(`\`def get_agent($params):
|
|
383
367
|
$body\` where {
|
|
384
368
|
$body <: contains \`yield Agent($_)\`,
|
|
385
369
|
$body <: not contains \`${clientClassName}.create\`
|
|
@@ -390,7 +374,7 @@ const addPythonClientToGetAgent = async (tree, filePath, clientClassName, client
|
|
|
390
374
|
}
|
|
391
375
|
// First connection — wrap the existing `def get_agent` body in a single
|
|
392
376
|
// `with (<var>,):` block.
|
|
393
|
-
await
|
|
377
|
+
await applyGritQL(tree, filePath, py(`\`def get_agent($params):
|
|
394
378
|
$body\` where {
|
|
395
379
|
$body <: contains \`yield Agent($_)\`,
|
|
396
380
|
$body <: not contains \`${clientClassName}.create\`
|
|
@@ -410,8 +394,7 @@ const addPythonClientToGetAgent = async (tree, filePath, clientClassName, client
|
|
|
410
394
|
* connection config on each tool and opens a fresh MCP session per call, so the
|
|
411
395
|
* tools stay usable after `get_agent` returns — no `with` block is needed.
|
|
412
396
|
* Mirrors {@link addPythonClientToAgent} for the Strands shape.
|
|
413
|
-
*/
|
|
414
|
-
async function addPythonLangchainClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
397
|
+
*/ async function addPythonLangchainClientToAgent(tree, agentFilePath, clientClassName, clientVarName) {
|
|
415
398
|
await addPythonLangchainClientTools(tree, agentFilePath, clientVarName);
|
|
416
399
|
await addPythonLangchainClientToGetAgent(tree, agentFilePath, clientClassName, clientVarName);
|
|
417
400
|
}
|
|
@@ -421,9 +404,8 @@ async function addPythonLangchainClientToAgent(tree, agentFilePath, clientClassN
|
|
|
421
404
|
* Scoped via `$old <: within \`create_agent($_)\`` so only the agent's own
|
|
422
405
|
* tools= keyword argument is touched (not an unrelated function with a
|
|
423
406
|
* `tools=` parameter).
|
|
424
|
-
*/
|
|
425
|
-
|
|
426
|
-
await (0, ast_1.applyGritQL)(tree, filePath, py(`\`tools=$old\` where {
|
|
407
|
+
*/ const addPythonLangchainClientTools = async (tree, filePath, clientVarName)=>{
|
|
408
|
+
await applyGritQL(tree, filePath, py(`\`tools=$old\` where {
|
|
427
409
|
$old <: within \`create_agent($_)\`,
|
|
428
410
|
$old <: not contains \`*${clientVarName}\`,
|
|
429
411
|
if ($old <: \`[]\`) {
|
|
@@ -439,12 +421,11 @@ const addPythonLangchainClientTools = async (tree, filePath, clientVarName) => {
|
|
|
439
421
|
* hands langchain-mcp-adapters a connection config, so each tool opens its own
|
|
440
422
|
* MCP session per call and the tools are safe to use after get_agent returns.
|
|
441
423
|
* Idempotent via the `not contains <clientClassName>.create` guard.
|
|
442
|
-
*/
|
|
443
|
-
|
|
444
|
-
if (await (0, ast_1.matchGritQL)(tree, filePath, py(`\`${clientClassName}.create()\``))) {
|
|
424
|
+
*/ const addPythonLangchainClientToGetAgent = async (tree, filePath, clientClassName, clientVarName)=>{
|
|
425
|
+
if (await matchGritQL(tree, filePath, py(`\`${clientClassName}.create()\``))) {
|
|
445
426
|
return;
|
|
446
427
|
}
|
|
447
|
-
await
|
|
428
|
+
await applyGritQL(tree, filePath, py(`\`def get_agent($params):
|
|
448
429
|
$body\` where {
|
|
449
430
|
$body <: contains \`create_agent($_)\`,
|
|
450
431
|
$body <: not contains \`${clientClassName}.create\`
|
|
@@ -452,69 +433,71 @@ const addPythonLangchainClientToGetAgent = async (tree, filePath, clientClassNam
|
|
|
452
433
|
${clientVarName} = ${clientClassName}.create()
|
|
453
434
|
$body\``));
|
|
454
435
|
};
|
|
455
|
-
|
|
436
|
+
export const PY_CLIENT_NAMING = {
|
|
456
437
|
strands: {
|
|
457
438
|
clientClassSuffix: 'Strands',
|
|
458
439
|
clientModuleSuffix: 'strands',
|
|
459
|
-
appTemplateSubdir:
|
|
440
|
+
appTemplateSubdir: joinPathFragments('agent-connection', 'app')
|
|
460
441
|
},
|
|
461
442
|
langchain: {
|
|
462
443
|
clientClassSuffix: 'LangChain',
|
|
463
444
|
clientModuleSuffix: 'langchain',
|
|
464
|
-
appTemplateSubdir:
|
|
465
|
-
}
|
|
445
|
+
appTemplateSubdir: joinPathFragments('langchain', 'agent-connection', 'app')
|
|
446
|
+
}
|
|
466
447
|
};
|
|
467
|
-
|
|
448
|
+
export const PY_MCP_FAMILY_CONNECTIONS = {
|
|
468
449
|
strands: {
|
|
469
|
-
...
|
|
450
|
+
...PY_CLIENT_NAMING.strands,
|
|
470
451
|
deps: [],
|
|
471
|
-
wireClientIntoAgent: addPythonClientToAgent
|
|
452
|
+
wireClientIntoAgent: addPythonClientToAgent
|
|
472
453
|
},
|
|
473
454
|
langchain: {
|
|
474
|
-
...
|
|
455
|
+
...PY_CLIENT_NAMING.langchain,
|
|
475
456
|
// langchain-mcp-adapters backs the LangChain client; it must not pull Strands in.
|
|
476
|
-
deps: [
|
|
477
|
-
|
|
478
|
-
|
|
457
|
+
deps: [
|
|
458
|
+
'langchain-mcp-adapters'
|
|
459
|
+
],
|
|
460
|
+
wireClientIntoAgent: addPythonLangchainClientToAgent
|
|
461
|
+
}
|
|
479
462
|
};
|
|
480
463
|
/**
|
|
481
464
|
* Add a re-export to the Python agent-connection module's __init__.py.
|
|
482
465
|
* Equivalent to addStarExport for TS.
|
|
483
466
|
* Uses `__all__` to mark re-exports as public (satisfies ruff F401).
|
|
484
467
|
* Uses GritQL for AST-aware transforms where possible.
|
|
485
|
-
*/
|
|
486
|
-
async function addPythonReExport(tree, initFilePath, fromModule, importName) {
|
|
468
|
+
*/ export async function addPythonReExport(tree, initFilePath, fromModule, importName) {
|
|
487
469
|
// Check if already exported
|
|
488
|
-
if (await
|
|
470
|
+
if (await matchGritQL(tree, initFilePath, `\`${importName}\``)) {
|
|
489
471
|
return;
|
|
490
472
|
}
|
|
491
473
|
const importLine = `from ${fromModule} import ${importName}`;
|
|
492
474
|
const allEntry = `"${importName}"`;
|
|
493
475
|
// If there's already an import from the same module, merge into its name list
|
|
494
476
|
// (ruff I001 rejects two `from X import ...` lines for the same module).
|
|
495
|
-
const mergedImport = await
|
|
477
|
+
const mergedImport = await applyGritQL(tree, initFilePath, py(`\`from ${fromModule} import $names\` where {
|
|
496
478
|
$names <: not contains \`${importName}\`,
|
|
497
479
|
$names += \`, ${importName}\`
|
|
498
480
|
}`));
|
|
499
481
|
if (mergedImport) {
|
|
500
|
-
await
|
|
482
|
+
await applyGritQL(tree, initFilePath, py(`\`__all__ = [$items]\` where { $items += \`, ${allEntry}\` }`));
|
|
501
483
|
return;
|
|
502
484
|
}
|
|
503
485
|
// Try to append import after existing import using +=
|
|
504
|
-
const appendedImport = await
|
|
486
|
+
const appendedImport = await applyGritQL(tree, initFilePath, py(`\`from $mod import $name\` as $stmt where {
|
|
505
487
|
$program <: not contains \`${importName}\`,
|
|
506
488
|
$stmt += \`\n${importLine}\`
|
|
507
489
|
}`));
|
|
508
490
|
if (appendedImport) {
|
|
509
491
|
// Also append to existing __all__
|
|
510
|
-
await
|
|
492
|
+
await applyGritQL(tree, initFilePath, py(`\`__all__ = [$items]\` where { $items += \`, ${allEntry}\` }`));
|
|
511
493
|
return;
|
|
512
494
|
}
|
|
513
495
|
// No existing imports — first re-export. Try to anchor after docstring.
|
|
514
|
-
const anchoredImport = await
|
|
496
|
+
const anchoredImport = await applyGritQL(tree, initFilePath, py(`\`"""Automatically generated by Nx."""\` as $doc => \`$doc\n${importLine}\n\n__all__ = [${allEntry}]\``));
|
|
515
497
|
if (!anchoredImport) {
|
|
516
498
|
// Completely empty file or no docstring — write directly
|
|
517
499
|
tree.write(initFilePath, `${importLine}\n\n__all__ = [${allEntry}]\n`);
|
|
518
500
|
}
|
|
519
501
|
}
|
|
502
|
+
|
|
520
503
|
//# sourceMappingURL=agent-connection.js.map
|