agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
from aws_cdk import (
# Duration,
Stack,
# aws_sqs as sqs,
)
from constructs import Construct
class %name.PascalCased%Stack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
# The code that defines your stack goes here
# example resource
# queue = sqs.Queue(
# self, "%name.PascalCased%Queue",
# visibility_timeout=Duration.seconds(300),
# )

View File

@@ -0,0 +1,10 @@
*.swp
package-lock.json
__pycache__
.pytest_cache
.venv
*.egg-info
# CDK asset staging directory
.cdk.staging
cdk.out

View File

@@ -0,0 +1,58 @@
# Welcome to your CDK Python project!
This is a blank project for CDK development with Python.
The `cdk.json` file tells the CDK Toolkit how to execute your app.
This project is set up like a standard Python project. The initialization
process also creates a virtualenv within this project, stored under the `.venv`
directory. To create the virtualenv it assumes that there is a `python3`
(or `python` for Windows) executable in your path with access to the `venv`
package. If for any reason the automatic creation of the virtualenv fails,
you can create the virtualenv manually.
To manually create a virtualenv on MacOS and Linux:
```
$ %python-executable% -m venv .venv
```
After the init process completes and the virtualenv is created, you can use the following
step to activate your virtualenv.
```
$ source .venv/bin/activate
```
If you are a Windows platform, you would activate the virtualenv like this:
```
% .venv\Scripts\activate.bat
```
Once the virtualenv is activated, you can install the required dependencies.
```
$ pip install -r requirements.txt
```
At this point you can now synthesize the CloudFormation template for this code.
```
$ cdk synth
```
To add additional dependencies, for example other CDK libraries, just add
them to your `requirements.txt` file and rerun the `python -m pip install -r requirements.txt`
command.
## Useful commands
* `cdk ls` list all stacks in the app
* `cdk synth` emits the synthesized CloudFormation template
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk docs` open CDK documentation
Enjoy!

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python3
import os
import aws_cdk as cdk
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack
app = cdk.App()
%name.PascalCased%Stack(app, "%stackname%",
# If you don't specify 'env', this stack will be environment-agnostic.
# Account/Region-dependent features and context lookups will not work,
# but a single synthesized template can be deployed anywhere.
# Uncomment the next line to specialize this stack for the AWS Account
# and Region that are implied by the current CLI configuration.
#env=cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')),
# Uncomment the next line if you know exactly what Account and Region you
# want to deploy the stack to. */
#env=cdk.Environment(account='123456789012', region='us-east-1'),
# For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
)
app.synth()

View File

@@ -0,0 +1,15 @@
{
"app": "%python-executable% app.py",
"watch": {
"include": ["**"],
"exclude": [
"README.md",
"cdk*.json",
"requirements*.txt",
"source.bat",
"**/__init__.py",
"**/__pycache__",
"tests"
]
}
}

View File

@@ -0,0 +1 @@
pytest==8.4.2

View File

@@ -0,0 +1,2 @@
aws-cdk-lib%cdk-version%
constructs%constructs-version%

View File

@@ -0,0 +1,13 @@
@echo off
rem The sole purpose of this script is to make the command
rem
rem source .venv/bin/activate
rem
rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows.
rem On Windows, this command just runs this batch file (the argument is ignored).
rem
rem Now we don't need to document a Windows command for activating a virtualenv.
echo Executing .venv\Scripts\activate.bat for you
.venv\Scripts\activate.bat

View File

@@ -0,0 +1,15 @@
import aws_cdk as core
import aws_cdk.assertions as assertions
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack
# example tests. To run these tests, uncomment this file along with the example
# resource in %name.PythonModule%/%name.PythonModule%_stack.py
def test_sqs_queue_created():
app = core.App()
stack = %name.PascalCased%Stack(app, "%name.StackName%")
template = assertions.Template.from_stack(stack)
# template.has_resource_properties("AWS::SQS::Queue", {
# "VisibilityTimeout": 300
# })