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,55 @@
import type { Construct } from 'constructs';
import * as codepipeline from '../../../aws-codepipeline';
import type * as ecs from '../../../aws-ecs';
import type { Duration } from '../../../core';
import { Action } from '../action';
/**
* Construction properties of `EcsDeployAction`.
*/
export interface EcsDeployActionProps extends codepipeline.CommonAwsActionProps {
/**
* The input artifact that contains the JSON image definitions file to use for deployments.
* The JSON file is a list of objects,
* each with 2 keys: `name` is the name of the container in the Task Definition,
* and `imageUri` is the Docker image URI you want to update your service with.
* If you use this property, it's assumed the file is called 'imagedefinitions.json'.
* If your build uses a different file, leave this property empty,
* and use the `imageFile` property instead.
*
* @default - one of this property, or `imageFile`, is required
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
*/
readonly input?: codepipeline.Artifact;
/**
* The name of the JSON image definitions file to use for deployments.
* The JSON file is a list of objects,
* each with 2 keys: `name` is the name of the container in the Task Definition,
* and `imageUri` is the Docker image URI you want to update your service with.
* Use this property if you want to use a different name for this file than the default 'imagedefinitions.json'.
* If you use this property, you don't need to specify the `input` property.
*
* @default - one of this property, or `input`, is required
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
*/
readonly imageFile?: codepipeline.ArtifactPath;
/**
* The ECS Service to deploy.
*/
readonly service: ecs.IBaseService;
/**
* Timeout for the ECS deployment in minutes. Value must be between 1-60.
*
* @default - 60 minutes
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-ECS.html
*/
readonly deploymentTimeout?: Duration;
}
/**
* CodePipeline Action to deploy an ECS Service.
*/
export declare class EcsDeployAction extends Action {
private readonly props;
private readonly deploymentTimeout?;
constructor(props: EcsDeployActionProps);
protected bound(_scope: Construct, _stage: codepipeline.IStage, options: codepipeline.ActionBindOptions): codepipeline.ActionConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EcsDeployAction=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codepipeline=()=>{var tmp=require("../../../aws-codepipeline");return codepipeline=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},action_1=()=>{var tmp=require("../action");return action_1=()=>tmp,tmp},common_1=()=>{var tmp=require("../common");return common_1=()=>tmp,tmp};class EcsDeployAction extends action_1().Action{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.EcsDeployAction",version:"2.252.0"};props;deploymentTimeout;constructor(props){super({...props,category:codepipeline().ActionCategory.DEPLOY,provider:"ECS",artifactBounds:(0,common_1().deployArtifactBounds)(),inputs:[determineInputArtifact(props)],resource:props.service});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_EcsDeployActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EcsDeployAction),error}const deploymentTimeout=props.deploymentTimeout?.toMinutes({integral:!0});if(deploymentTimeout!==void 0&&(deploymentTimeout<1||deploymentTimeout>60))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeDeploymentTimeoutBetween`,`Deployment timeout must be between 1 and 60 minutes, got: ${deploymentTimeout}`);this.props=props,this.deploymentTimeout=deploymentTimeout}bound(_scope,_stage,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_IStage(_stage),jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_ActionBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bound),error}return options.role.addToPolicy(new(iam()).PolicyStatement({actions:["ecs:DescribeServices","ecs:DescribeTaskDefinition","ecs:DescribeTasks","ecs:ListTasks","ecs:RegisterTaskDefinition","ecs:TagResource","ecs:UpdateService"],resources:["*"]})),options.role.addToPolicy(new(iam()).PolicyStatement({actions:["iam:PassRole"],resources:["*"],conditions:{StringEqualsIfExists:{"iam:PassedToService":["ec2.amazonaws.com","ecs-tasks.amazonaws.com"]}}})),options.bucket.grantRead(options.role),{configuration:{ClusterName:this.props.service.cluster.clusterName,ServiceName:this.props.service.serviceName,FileName:this.props.imageFile?.fileName,DeploymentTimeout:this.deploymentTimeout}}}}exports.EcsDeployAction=EcsDeployAction;function determineInputArtifact(props){if(props.imageFile&&props.input)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ExactlyInputImagefileProvided`,"Exactly one of 'input' or 'imageFile' can be provided in the ECS deploy Action");if(props.imageFile)return props.imageFile.artifact;if(props.input)return props.input;throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`IsRequiredSpecifyingInputImagefile`,"Specifying one of 'input' or 'imageFile' is required for the ECS deploy Action")}