@aws/agentcore 1.0.0-preview.31 → 1.0.0-preview.32
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/README.md +7 -6
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +1103 -1
- package/dist/assets/cdk/package.json +1 -1
- package/dist/assets/python/http/bma/base/Dockerfile +41 -0
- package/dist/assets/python/http/bma/base/README.md +122 -0
- package/dist/assets/python/http/bma/base/bma-acr-policy.json +11 -0
- package/dist/assets/python/http/bma/base/client.py +132 -0
- package/dist/assets/python/http/bma/base/lifecycle/server.py +641 -0
- package/dist/assets/python/http/bma/base/otel/collector.yaml +69 -0
- package/dist/assets/python/http/bma/base/plugins/acr-report/.codex-plugin/plugin.json +6 -0
- package/dist/assets/python/http/bma/base/plugins/acr-report/skills/acr-report/SKILL.md +16 -0
- package/dist/assets/python/http/bma/base/pyproject.toml +19 -0
- package/dist/cli/index.mjs +570 -635
- package/dist/schema/constants.d.ts +4 -1
- package/dist/schema/constants.d.ts.map +1 -1
- package/dist/schema/constants.js +22 -3
- package/dist/schema/constants.js.map +1 -1
- package/npm-shrinkwrap.json +3 -30
- package/package.json +2 -2
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# The CloudWatch agent runs this OpenTelemetry Collector configuration. It receives OTLP from
|
|
2
|
+
# the exec-server, puts the runtime session ID on each span and log, and signs each request
|
|
3
|
+
# with the ACR role. The exec-server sends the log group headers that the Runtime sets in
|
|
4
|
+
# OTEL_EXPORTER_OTLP_TRACES_HEADERS and OTEL_EXPORTER_OTLP_LOGS_HEADERS, and the collector
|
|
5
|
+
# sends them on to X-Ray and CloudWatch Logs.
|
|
6
|
+
receivers:
|
|
7
|
+
otlp:
|
|
8
|
+
protocols:
|
|
9
|
+
http:
|
|
10
|
+
endpoint: 127.0.0.1:4318
|
|
11
|
+
include_metadata: true
|
|
12
|
+
processors:
|
|
13
|
+
attributes:
|
|
14
|
+
actions:
|
|
15
|
+
- key: session.id
|
|
16
|
+
value: ${env:AGENTCORE_RUNTIME_SID}
|
|
17
|
+
action: upsert
|
|
18
|
+
exporters:
|
|
19
|
+
otlphttp/traces:
|
|
20
|
+
traces_endpoint: https://xray.${env:AWS_REGION}.amazonaws.com/v1/traces
|
|
21
|
+
auth:
|
|
22
|
+
authenticator: headers_setter/traces
|
|
23
|
+
otlphttp/logs:
|
|
24
|
+
logs_endpoint: https://logs.${env:AWS_REGION}.amazonaws.com/v1/logs
|
|
25
|
+
auth:
|
|
26
|
+
authenticator: headers_setter/logs
|
|
27
|
+
extensions:
|
|
28
|
+
sigv4auth/xray:
|
|
29
|
+
region: ${env:AWS_REGION}
|
|
30
|
+
service: xray
|
|
31
|
+
sigv4auth/logs:
|
|
32
|
+
region: ${env:AWS_REGION}
|
|
33
|
+
service: logs
|
|
34
|
+
headers_setter/traces:
|
|
35
|
+
additional_auth: sigv4auth/xray
|
|
36
|
+
headers:
|
|
37
|
+
- key: x-aws-log-group
|
|
38
|
+
from_context: x-aws-log-group
|
|
39
|
+
action: upsert
|
|
40
|
+
- key: x-aws-log-stream
|
|
41
|
+
from_context: x-aws-log-stream
|
|
42
|
+
action: upsert
|
|
43
|
+
headers_setter/logs:
|
|
44
|
+
additional_auth: sigv4auth/logs
|
|
45
|
+
headers:
|
|
46
|
+
- key: x-aws-log-group
|
|
47
|
+
from_context: x-aws-log-group
|
|
48
|
+
action: upsert
|
|
49
|
+
- key: x-aws-log-stream
|
|
50
|
+
from_context: x-aws-log-stream
|
|
51
|
+
action: upsert
|
|
52
|
+
- key: x-aws-metric-namespace
|
|
53
|
+
from_context: x-aws-metric-namespace
|
|
54
|
+
action: upsert
|
|
55
|
+
service:
|
|
56
|
+
extensions:
|
|
57
|
+
- sigv4auth/xray
|
|
58
|
+
- sigv4auth/logs
|
|
59
|
+
- headers_setter/traces
|
|
60
|
+
- headers_setter/logs
|
|
61
|
+
pipelines:
|
|
62
|
+
traces:
|
|
63
|
+
receivers: [otlp]
|
|
64
|
+
processors: [attributes]
|
|
65
|
+
exporters: [otlphttp/traces]
|
|
66
|
+
logs:
|
|
67
|
+
receivers: [otlp]
|
|
68
|
+
processors: [attributes]
|
|
69
|
+
exporters: [otlphttp/logs]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acr-report
|
|
3
|
+
description: Save a report of the Python version, user ID, and working directory of the ACR in the workspace.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run these commands in the workspace directory:
|
|
7
|
+
|
|
8
|
+
- `python3 --version`
|
|
9
|
+
- `id -u`
|
|
10
|
+
- `pwd`
|
|
11
|
+
|
|
12
|
+
Save the output as `acr-report.txt` in the workspace. The first line of the
|
|
13
|
+
file is `# ACR report`, and each command and its output follow it. Read the
|
|
14
|
+
file back and report its path.
|
|
15
|
+
|
|
16
|
+
If a command fails, put its error in the report. Do not change the commands.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "{{ name }}"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "AgentCore Runtime environment for Bedrock Managed Agents"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
dependencies = [
|
|
7
|
+
"aws-opentelemetry-distro",
|
|
8
|
+
"bedrock-agentcore",
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
# The dependencies of client.py. The image build runs `uv sync --no-dev`.
|
|
12
|
+
[dependency-groups]
|
|
13
|
+
dev = [
|
|
14
|
+
"aws-bedrock-token-generator>=1.1.0",
|
|
15
|
+
"openai>=3.16.2",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[tool.uv]
|
|
19
|
+
package = false
|