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,101 @@
import type { Construct } from 'constructs';
import * as codepipeline from '../../../aws-codepipeline';
import type * as kms from '../../../aws-kms';
import type * as s3 from '../../../aws-s3';
import type { Duration } from '../../../core';
import { Action } from '../action';
/**
* Used for HTTP cache-control header, which influences downstream caches.
* Use the provided static factory methods to construct instances of this class.
* Used in the `S3DeployActionProps.cacheControl` property.
*
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
*/
export declare class CacheControl {
value: string;
/** The 'must-revalidate' cache control directive. */
static mustRevalidate(): CacheControl;
/** The 'no-cache' cache control directive. */
static noCache(): CacheControl;
/** The 'no-transform' cache control directive. */
static noTransform(): CacheControl;
/** The 'no-store' cache control directive. */
static noStore(): CacheControl;
/** The 'must-understand' cache control directive. */
static mustUnderstand(): CacheControl;
/** The 'public' cache control directive. */
static setPublic(): CacheControl;
/** The 'private' cache control directive. */
static setPrivate(): CacheControl;
/** The 'immutable' cache control directive. */
static immutable(): CacheControl;
/** The 'proxy-revalidate' cache control directive. */
static proxyRevalidate(): CacheControl;
/** The 'max-age' cache control directive. */
static maxAge(t: Duration): CacheControl;
/** The 's-max-age' cache control directive. */
static sMaxAge(t: Duration): CacheControl;
/** The 'stale-while-revalidate' cache control directive. */
static staleWhileRevalidate(t: Duration): CacheControl;
/** The 'stale-if-error' cache control directive. */
static staleIfError(t: Duration): CacheControl;
/**
* Allows you to create an arbitrary cache control directive,
* in case our support is missing a method for a particular directive.
*/
static fromString(s: string): CacheControl;
/** @param value the actual text value of the created directive */
private constructor();
}
/**
* Construction properties of the `S3DeployAction S3 deploy Action`.
*/
export interface S3DeployActionProps extends codepipeline.CommonAwsActionProps {
/**
* Should the deploy action extract the artifact before deploying to Amazon S3.
*
* @default true
*/
readonly extract?: boolean;
/**
* The key of the target object. This is required if extract is false.
*/
readonly objectKey?: string;
/**
* The input Artifact to deploy to Amazon S3.
*/
readonly input: codepipeline.Artifact;
/**
* The Amazon S3 bucket that is the deploy target.
*/
readonly bucket: s3.IBucket;
/**
* The specified canned ACL to objects deployed to Amazon S3.
* This overwrites any existing ACL that was applied to the object.
*
* @default - the original object ACL
*/
readonly accessControl?: s3.BucketAccessControl;
/**
* The caching behavior for requests/responses for objects in the bucket.
* The final cache control property will be the result of joining all of the provided array elements with a comma
* (plus a space after the comma).
*
* @default - none, decided by the HTTP client
*/
readonly cacheControl?: CacheControl[];
/**
* The AWS KMS encryption key for the host bucket.
* The encryptionKey parameter encrypts uploaded artifacts with the provided AWS KMS key.
* @default - none
*/
readonly encryptionKey?: kms.IKey;
}
/**
* Deploys the sourceArtifact to Amazon S3.
*/
export declare class S3DeployAction extends Action {
private readonly props;
constructor(props: S3DeployActionProps);
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.S3DeployAction=exports.CacheControl=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var case_1=()=>{var tmp=require("case");return case_1=()=>tmp,tmp},codepipeline=()=>{var tmp=require("../../../aws-codepipeline");return codepipeline=()=>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 CacheControl{value;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.CacheControl",version:"2.252.0"};static mustRevalidate(){return new CacheControl("must-revalidate")}static noCache(){return new CacheControl("no-cache")}static noTransform(){return new CacheControl("no-transform")}static noStore(){return new CacheControl("no-store")}static mustUnderstand(){return new CacheControl("must-understand")}static setPublic(){return new CacheControl("public")}static setPrivate(){return new CacheControl("private")}static immutable(){return new CacheControl("immutable")}static proxyRevalidate(){return new CacheControl("proxy-revalidate")}static maxAge(t){try{jsiiDeprecationWarnings().aws_cdk_lib_Duration(t)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.maxAge),error}return new CacheControl(`max-age=${t.toSeconds()}`)}static sMaxAge(t){try{jsiiDeprecationWarnings().aws_cdk_lib_Duration(t)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.sMaxAge),error}return new CacheControl(`s-maxage=${t.toSeconds()}`)}static staleWhileRevalidate(t){try{jsiiDeprecationWarnings().aws_cdk_lib_Duration(t)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.staleWhileRevalidate),error}return new CacheControl(`stale-while-revalidate=${t.toSeconds()}`)}static staleIfError(t){try{jsiiDeprecationWarnings().aws_cdk_lib_Duration(t)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.staleIfError),error}return new CacheControl(`stale-if-error=${t.toSeconds()}`)}static fromString(s){return new CacheControl(s)}constructor(value){this.value=value}}exports.CacheControl=CacheControl;class S3DeployAction extends action_1().Action{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.S3DeployAction",version:"2.252.0"};props;constructor(props){super({...props,resource:props.bucket,category:codepipeline().ActionCategory.DEPLOY,provider:"S3",artifactBounds:(0,common_1().deployArtifactBounds)(),inputs:[props.input]});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_S3DeployActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,S3DeployAction),error}this.props=props}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}this.props.bucket.grantWrite(options.role),this.props.accessControl!==void 0&&this.props.bucket.grantPutAcl(options.role),options.bucket.grantRead(options.role),this.props.encryptionKey?.grantEncrypt(options.role);const acl=this.props.accessControl;return{configuration:{BucketName:this.props.bucket.bucketName,Extract:this.props.extract===!1?"false":"true",ObjectKey:this.props.objectKey,CannedACL:acl?(0,case_1().kebab)(acl.toString()):void 0,CacheControl:this.props.cacheControl&&this.props.cacheControl.map(ac=>ac.value).join(", "),KMSEncryptionKeyARN:this.props.encryptionKey?.keyArn}}}}exports.S3DeployAction=S3DeployAction;

View File

@@ -0,0 +1,80 @@
import type { Construct } from 'constructs';
import * as codepipeline from '../../../aws-codepipeline';
import type * as s3 from '../../../aws-s3';
import { Action } from '../action';
/**
* How should the S3 Action detect changes.
* This is the type of the `S3SourceAction.trigger` property.
*/
export declare enum S3Trigger {
/**
* The Action will never detect changes -
* the Pipeline it's part of will only begin a run when explicitly started.
*/
NONE = "None",
/**
* CodePipeline will poll S3 to detect changes.
* This is the default method of detecting changes.
*/
POLL = "Poll",
/**
* CodePipeline will use CloudWatch Events to be notified of changes.
* Note that the Bucket that the Action uses needs to be part of a CloudTrail Trail
* for the events to be delivered.
*/
EVENTS = "Events"
}
/**
* The CodePipeline variables emitted by the S3 source Action.
*/
export interface S3SourceVariables {
/** The identifier of the S3 version of the object that triggered the build. */
readonly versionId: string;
/** The e-tag of the S3 version of the object that triggered the build. */
readonly eTag: string;
}
/**
* Construction properties of the `S3SourceAction S3 source Action`.
*/
export interface S3SourceActionProps extends codepipeline.CommonAwsActionProps {
/**
*
*/
readonly output: codepipeline.Artifact;
/**
* The key within the S3 bucket that stores the source code.
*
* @example 'path/to/file.zip'
*/
readonly bucketKey: string;
/**
* How should CodePipeline detect source changes for this Action.
* Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail,
* as otherwise the CloudWatch Events will not be emitted.
*
* @default S3Trigger.POLL
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/log-s3-data-events.html
*/
readonly trigger?: S3Trigger;
/**
* The Amazon S3 bucket that stores the source code.
*
* If you import an encrypted bucket in your stack, please specify
* the encryption key at import time by using `Bucket.fromBucketAttributes()` method.
*/
readonly bucket: s3.IBucket;
}
/**
* Source that is provided by a specific Amazon S3 object.
*
* Will trigger the pipeline as soon as the S3 object changes, but only if there is
* a CloudTrail Trail in the account that captures the S3 event.
*/
export declare class S3SourceAction extends Action {
private readonly props;
constructor(props: S3SourceActionProps);
/** The variables emitted by this action. */
get variables(): S3SourceVariables;
protected bound(_scope: Construct, stage: codepipeline.IStage, options: codepipeline.ActionBindOptions): codepipeline.ActionConfig;
private generateEventId;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.S3SourceAction=exports.S3Trigger=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},targets=()=>{var tmp=require("../../../aws-events-targets");return targets=()=>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},S3Trigger;(function(S3Trigger2){S3Trigger2.NONE="None",S3Trigger2.POLL="Poll",S3Trigger2.EVENTS="Events"})(S3Trigger||(exports.S3Trigger=S3Trigger={}));class S3SourceAction extends action_1().Action{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.S3SourceAction",version:"2.252.0"};props;constructor(props){super({...props,resource:props.bucket,category:codepipeline().ActionCategory.SOURCE,provider:"S3",artifactBounds:(0,common_1().sourceArtifactBounds)(),outputs:[props.output]});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_S3SourceActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,S3SourceAction),error}if(props.bucketKey.length===0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`PropertyBucketkeyCannotEmpty`,"Property bucketKey cannot be an empty string");this.props=props}get variables(){return{versionId:this.variableExpression("VersionId"),eTag:this.variableExpression("ETag")}}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}if(this.props.trigger===S3Trigger.EVENTS){const id=this.generateEventId(stage);this.props.bucket.onCloudTrailWriteObject(id,{target:new(targets()).CodePipeline(stage.pipeline),paths:[this.props.bucketKey],crossStackScope:stage.pipeline})}return this.props.bucket.grantRead(options.role,this.props.bucketKey),options.bucket.grantWrite(options.role),{configuration:{S3Bucket:this.props.bucket.bucketName,S3ObjectKey:this.props.bucketKey,PollForSourceChanges:this.props.trigger&&this.props.trigger===S3Trigger.POLL}}}generateEventId(stage){let ret;const baseId=core_1().Names.nodeUniqueId(stage.pipeline.node)+"SourceEventRule";if(core_1().Token.isUnresolved(this.props.bucketKey)){let candidate=baseId,counter=0;for(;this.props.bucket.node.tryFindChild(candidate)!==void 0;)counter+=1,candidate=baseId+counter;ret=candidate}else if(ret=baseId+this.props.bucketKey,this.props.bucket.node.tryFindChild(ret))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`SourceActionPathAlready`,`S3 source action with path '${this.props.bucketKey}' is already present in the pipeline for this source bucket`);return ret}}exports.S3SourceAction=S3SourceAction;