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,73 @@
import { Construct } from 'constructs';
import * as s3 from '../../../aws-s3';
import * as cdk from '../../../core';
/**
* Props for the support stack
*/
export interface CrossRegionSupportConstructProps {
/**
* Whether to create the KMS CMK
*
* (Required for cross-account deployments)
*
* @default true
*/
readonly createKmsKey?: boolean;
/**
* Enables KMS key rotation for cross-account keys.
*
* @default - false (key rotation is disabled)
*/
readonly enableKeyRotation?: boolean;
}
export declare class CrossRegionSupportConstruct extends Construct {
readonly replicationBucket: s3.IBucket;
constructor(scope: Construct, id: string, props?: CrossRegionSupportConstructProps);
}
/**
* Construction properties for `CrossRegionSupportStack`.
* This interface is private to the aws-codepipeline package.
*/
export interface CrossRegionSupportStackProps {
/**
* The name of the Stack the Pipeline itself belongs to.
* Used to generate a more friendly name for the support Stack.
*/
readonly pipelineStackName: string;
/**
* The AWS region this Stack resides in.
*/
readonly region: string;
/**
* The AWS account ID this Stack belongs to.
*
* @example '012345678901'
*/
readonly account: string;
readonly synthesizer: cdk.IStackSynthesizer | undefined;
/**
* Whether or not to create a KMS key in the support stack
*
* (Required for cross-account deployments)
*
* @default true
*/
readonly createKmsKey?: boolean;
/**
* Enables KMS key rotation for cross-account keys.
*
* @default - false (key rotation is disabled)
*/
readonly enableKeyRotation?: boolean;
}
/**
* A Stack containing resources required for the cross-region CodePipeline functionality to work.
* This class is private to the aws-codepipeline package.
*/
export declare class CrossRegionSupportStack extends cdk.Stack {
/**
* The name of the S3 Bucket used for replicating the Pipeline's artifacts into the region.
*/
readonly replicationBucket: s3.IBucket;
constructor(scope: Construct, id: string, props: CrossRegionSupportStackProps);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,33 @@
import type * as iam from '../../../aws-iam';
import type { Duration } from '../../../core';
import type { ActionArtifactBounds, ActionCategory, ActionConfig, IAction } from '../action';
import type { Artifact } from '../artifact';
export interface FullActionDescriptorProps {
readonly action: IAction;
readonly actionConfig: ActionConfig;
readonly actionRole: iam.IRole | undefined;
readonly actionRegion: string | undefined;
}
/**
* This class is private to the aws-codepipeline package.
*/
export declare class FullActionDescriptor {
readonly action: IAction;
readonly actionName: string;
readonly category: ActionCategory;
readonly owner: string;
readonly provider: string;
readonly version: string;
readonly runOrder: number;
readonly artifactBounds: ActionArtifactBounds;
readonly namespace?: string;
readonly inputs: Artifact[];
readonly outputs: Artifact[];
readonly region?: string;
readonly role?: iam.IRole;
readonly configuration: any;
readonly commands?: string[];
readonly outputVariables?: string[];
readonly timeout?: Duration;
constructor(props: FullActionDescriptorProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FullActionDescriptor=void 0;class FullActionDescriptor{action;actionName;category;owner;provider;version;runOrder;artifactBounds;namespace;inputs;outputs;region;role;configuration;commands;outputVariables;timeout;constructor(props){this.action=props.action;const actionProperties=props.action.actionProperties;this.actionName=actionProperties.actionName,this.category=actionProperties.category,this.owner=actionProperties.owner||"AWS",this.provider=actionProperties.provider,this.version=actionProperties.version||"1",this.runOrder=actionProperties.runOrder??1,this.artifactBounds=actionProperties.artifactBounds,this.namespace=actionProperties.variablesNamespace,this.inputs=deduplicateArtifacts(actionProperties.inputs),this.outputs=deduplicateArtifacts(actionProperties.outputs),this.region=props.actionRegion||actionProperties.region,this.role=actionProperties.role??props.actionRole,this.configuration=props.actionConfig.configuration,this.commands=actionProperties.commands,this.outputVariables=actionProperties.outputVariables,this.timeout=actionProperties.timeout}}exports.FullActionDescriptor=FullActionDescriptor;function deduplicateArtifacts(artifacts){const ret=new Array;for(const artifact of artifacts||[]){if(artifact.artifactName){if(ret.find(a=>a.artifactName===artifact.artifactName))continue}else if(ret.find(a=>a===artifact))continue;ret.push(artifact)}return ret}

View File

@@ -0,0 +1,46 @@
import type { Construct } from 'constructs';
import type * as events from '../../../aws-events';
import { Stack } from '../../../core';
import type { IPipelineRef } from '../../../interfaces/generated/aws-codepipeline-interfaces.generated';
import type { ActionBindOptions, ActionConfig, ActionProperties, IAction, IStage } from '../action';
/**
* Helper routines to work with Actions
*
* Can't put these on Action themselves since we only have an interface
* and every library would need to reimplement everything (there is no
* `ActionBase`).
*
* So here go the members that should have gone onto the Action class
* but can't.
*
* It was probably my own idea but I don't want it anymore:
* https://github.com/aws/aws-cdk/issues/10393
*/
export declare class RichAction implements IAction {
private readonly action;
private readonly pipeline;
readonly actionProperties: ActionProperties;
constructor(action: IAction, pipeline: IPipelineRef);
bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfig;
onStateChange(name: string, target?: events.IRuleTarget, options?: events.RuleProps): events.Rule;
get isCrossRegion(): boolean;
get isCrossAccount(): boolean;
/**
* Returns the Stack of the resource backing this action
* if they belong to the same environment.
* Returns `undefined` if either this action is not backed by a resource,
* or if the resource does not belong to the same env as its Stack
* (which can happen for imported resources).
*/
get resourceStack(): Stack | undefined;
/**
* The region this action wants to execute in.
* `undefined` means it wants to execute in the same region as the pipeline.
*/
get effectiveRegion(): string | undefined;
/**
* The account this action wants to execute in.
* `undefined` means it wants to execute in the same account as the pipeline.
*/
get effectiveAccount(): string | undefined;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RichAction=void 0;var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};class RichAction{action;pipeline;actionProperties;constructor(action,pipeline){this.action=action,this.pipeline=pipeline,this.actionProperties=action.actionProperties}bind(scope,stage,options){return this.action.bind(scope,stage,options)}onStateChange(name,target,options){return this.action.onStateChange(name,target,options)}get isCrossRegion(){return!actionDimensionSameAsPipelineDimension(this.effectiveRegion,this.pipeline.env.region)}get isCrossAccount(){return!actionDimensionSameAsPipelineDimension(this.effectiveAccount,this.pipeline.env.account)}get resourceStack(){const actionResource=this.actionProperties.resource;if(!actionResource)return;const actionResourceStack=core_1().Stack.of(actionResource),actionResourceStackEnv={region:actionResourceStack.region,account:actionResourceStack.account};return sameEnv(actionResource.env,actionResourceStackEnv)?actionResourceStack:void 0}get effectiveRegion(){return this.action.actionProperties.resource?.env.region??this.action.actionProperties.region}get effectiveAccount(){return this.action.actionProperties.role?.env.account??this.action.actionProperties?.resource?.env.account??this.action.actionProperties.account}}exports.RichAction=RichAction;function actionDimensionSameAsPipelineDimension(actionDim,pipelineDim){return!actionDim||core_1().Token.isUnresolved(actionDim)?!0:core_1().Token.compareStrings(actionDim,pipelineDim)===core_1().TokenComparison.SAME}function sameEnv(env1,env2){return sameEnvDimension(env1.region,env2.region)&&sameEnvDimension(env1.account,env2.account)}function sameEnvDimension(dim1,dim2){return[core_1().TokenComparison.SAME,core_1().TokenComparison.BOTH_UNRESOLVED].includes(core_1().Token.compareStrings(dim1,dim2))}

View File

@@ -0,0 +1,51 @@
import type { FullActionDescriptor } from './full-action-descriptor';
import * as events from '../../../aws-events';
import type { IAction, IPipeline, IStage } from '../action';
import type { CfnPipeline } from '../codepipeline.generated';
import type { Pipeline, StageProps } from '../pipeline';
/**
* A Stage in a Pipeline.
*
* Stages are added to a Pipeline by calling `Pipeline#addStage`,
* which returns an instance of `codepipeline.IStage`.
*
* This class is private to the CodePipeline module.
*/
export declare class Stage implements IStage {
/**
* The Pipeline this Stage is a part of.
*/
readonly stageName: string;
readonly transitionToEnabled: boolean;
readonly transitionDisabledReason: string;
private readonly beforeEntry?;
private readonly onSuccess?;
private readonly onFailure?;
private readonly scope;
private readonly _pipeline;
private readonly _actions;
/**
* Create a new Stage.
*/
constructor(props: StageProps, pipeline: Pipeline);
/**
* Get a duplicate of this stage's list of actions.
*/
get actionDescriptors(): FullActionDescriptor[];
get actions(): IAction[];
get pipeline(): IPipeline;
render(): CfnPipeline.StageDeclarationProperty;
addAction(action: IAction): void;
onStateChange(name: string, target?: events.IRuleTarget, options?: events.RuleProps): events.Rule;
validate(): string[];
private validateHasActions;
private validateActions;
private validateAction;
private attachActionToPipeline;
private renderAction;
private renderArtifacts;
private renderBeforeEntry;
private renderOnSuccess;
private renderOnFailure;
private getConditions;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
import type { Construct } from 'constructs';
import type { Artifact } from '../artifact';
import type { GitConfiguration } from '../trigger';
/**
* Validation function that checks if the number of artifacts is within the given bounds
*/
export declare function validateArtifactBounds(type: string, artifacts: Artifact[], min: number, max: number, category: string, provider: string): string[];
/**
* Validation function that guarantees that an action is or is not a source action. This is useful because Source actions can only be
* in the first stage of a pipeline, and the first stage can only contain source actions.
*/
export declare function validateSourceAction(mustBeSource: boolean, category: string, actionName: string, stageName: string): string[];
/**
* Validate the given name of a pipeline component. Pipeline component names all have the same restrictions.
* This can be used to validate the name of all components of a pipeline.
*/
export declare function validateName(scope: Construct, thing: string, name: string | undefined): void;
export declare function validateArtifactName(artifactName: string | undefined): void;
export declare function validateNamespaceName(scope: Construct, namespaceName: string | undefined): void;
export declare function validatePipelineVariableName(variableName: string | undefined): void;
export declare function validateRuleName(ruleName: string | undefined): void;
export declare function validateTriggers(gitConfiguration: GitConfiguration): void;

File diff suppressed because one or more lines are too long