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,7 @@
import type { IDBSubnetGroupRef } from '../rds.generated';
import type { ISubnetGroup } from '../subnet-group';
/**
* Convert an IBackupVaultRef to IBackupVault, throwing an error if the instance
* doesn't implement the full IBackupVault interface.
*/
export declare function toISubnetGroup(group: IDBSubnetGroupRef): ISubnetGroup;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toISubnetGroup=toISubnetGroup;var 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};function toISubnetGroup(group){if(!("subnetGroupName"in group))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`GroupInstanceShouldImplement`,`'group' instance should implement ISubnetGroup, but doesn't: ${group.constructor.name}`);return group}

View File

@@ -0,0 +1,71 @@
import type { Construct } from 'constructs';
import type * as ec2 from '../../../aws-ec2';
import * as iam from '../../../aws-iam';
import type * as s3 from '../../../aws-s3';
import { RemovalPolicy } from '../../../core';
import type { IEngine } from '../engine';
import type { CommonRotationUserOptions } from '../props';
import { Credentials, SnapshotCredentials } from '../props';
/**
* The default set of characters we exclude from generated passwords for database users.
* It's a combination of characters that have a tendency to cause problems in shell scripts,
* some engine-specific characters (for example, Oracle doesn't like '@' in its passwords),
* and some that trip up other services, like DMS.
*
* This constant is private to the RDS module.
*/
export declare const DEFAULT_PASSWORD_EXCLUDE_CHARS = " %+~`#$&*()|[]{}:;<>?!'/@\"\\";
/** Common base of `DatabaseInstanceProps` and `DatabaseClusterBaseProps` that has only the S3 props */
export interface DatabaseS3ImportExportProps {
readonly s3ImportRole?: iam.IRole;
readonly s3ImportBuckets?: s3.IBucket[];
readonly s3ExportRole?: iam.IRole;
readonly s3ExportBuckets?: s3.IBucket[];
}
/**
* Validates the S3 import/export props and returns the import/export roles, if any.
* If `combineRoles` is true, will reuse the import role for export (or vice versa) if possible.
*
* Notably, `combineRoles` is set to true for instances, but false for clusters.
* This is because the `combineRoles` functionality is most applicable to instances and didn't exist
* for the initial clusters implementation. To maintain backwards compatibility, it is set to false for clusters.
*/
export declare function setupS3ImportExport(scope: Construct, props: DatabaseS3ImportExportProps, combineRoles: boolean): {
s3ImportRole?: iam.IRole;
s3ExportRole?: iam.IRole;
};
export declare function engineDescription(engine: IEngine): string;
/**
* By default, deletion protection is disabled.
* Enable if explicitly provided or if the RemovalPolicy has been set to RETAIN
*/
export declare function defaultDeletionProtection(deletionProtection?: boolean, removalPolicy?: RemovalPolicy): boolean | undefined;
/**
* Renders the credentials for an instance or cluster
*/
export declare function renderCredentials(scope: Construct, engine: IEngine, credentials?: Credentials): Credentials;
/**
* Renders the credentials for an instance or cluster using provided snapshot credentials
*/
export declare function renderSnapshotCredentials(scope: Construct, credentials?: SnapshotCredentials): SnapshotCredentials | undefined;
/**
* The RemovalPolicy that should be applied to a "helper" resource, if the base resource has the given removal policy
*
* - For Clusters, this determines the RemovalPolicy for Instances/SubnetGroups.
* - For Instances, this determines the RemovalPolicy for SubnetGroups.
*
* If the basePolicy is:
*
* DESTROY or SNAPSHOT -> DESTROY (snapshot is good enough to recreate)
* RETAIN -> RETAIN (anything else will lose data or fail to deploy)
* (undefined) -> DESTROY (base policy is assumed to be SNAPSHOT)
*/
export declare function helperRemovalPolicy(basePolicy?: RemovalPolicy): RemovalPolicy;
/**
* Return a given value unless it's the same as another value
*/
export declare function renderUnless<A>(value: A, suppressValue: A): A | undefined;
/**
* Applies defaults for rotation options
*/
export declare function applyDefaultRotationOptions(options: CommonRotationUserOptions, defaultvpcSubnets?: ec2.SubnetSelection): CommonRotationUserOptions;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_PASSWORD_EXCLUDE_CHARS=void 0,exports.setupS3ImportExport=setupS3ImportExport,exports.engineDescription=engineDescription,exports.defaultDeletionProtection=defaultDeletionProtection,exports.renderCredentials=renderCredentials,exports.renderSnapshotCredentials=renderSnapshotCredentials,exports.helperRemovalPolicy=helperRemovalPolicy,exports.renderUnless=renderUnless,exports.applyDefaultRotationOptions=applyDefaultRotationOptions;var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},database_secret_1=()=>{var tmp=require("../database-secret");return database_secret_1=()=>tmp,tmp},props_1=()=>{var tmp=require("../props");return props_1=()=>tmp,tmp};exports.DEFAULT_PASSWORD_EXCLUDE_CHARS=" %+~`#$&*()|[]{}:;<>?!'/@\"\\";function setupS3ImportExport(scope,props,combineRoles){let s3ImportRole=props.s3ImportRole,s3ExportRole=props.s3ExportRole;if(props.s3ImportBuckets&&props.s3ImportBuckets.length>0){if(props.s3ImportRole)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`OneImportRoleImportBuckets`,"Only one of s3ImportRole or s3ImportBuckets must be specified, not both.",scope);s3ImportRole=combineRoles&&s3ExportRole?s3ExportRole:new(iam()).Role(scope,"S3ImportRole",{assumedBy:new(iam()).ServicePrincipal("rds.amazonaws.com")});for(const bucket of props.s3ImportBuckets)bucket.grantRead(s3ImportRole)}if(props.s3ExportBuckets&&props.s3ExportBuckets.length>0){if(props.s3ExportRole)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`OneExportRoleExportBuckets`,"Only one of s3ExportRole or s3ExportBuckets must be specified, not both.",scope);s3ExportRole=combineRoles&&s3ImportRole?s3ImportRole:new(iam()).Role(scope,"S3ExportRole",{assumedBy:new(iam()).ServicePrincipal("rds.amazonaws.com")});for(const bucket of props.s3ExportBuckets)bucket.grantReadWrite(s3ExportRole)}return{s3ImportRole,s3ExportRole}}function engineDescription(engine){return engine.engineType+(engine.engineVersion?.fullVersion?`-${engine.engineVersion.fullVersion}`:"")}function defaultDeletionProtection(deletionProtection,removalPolicy){return deletionProtection??(removalPolicy===core_1().RemovalPolicy.RETAIN?!0:void 0)}function renderCredentials(scope,engine,credentials){let renderedCredentials=credentials??props_1().Credentials.fromUsername(engine.defaultUsername??"admin");return!renderedCredentials.secret&&!renderedCredentials.password&&(renderedCredentials=props_1().Credentials.fromSecret(new(database_secret_1()).DatabaseSecret(scope,"Secret",{username:renderedCredentials.username,secretName:renderedCredentials.secretName,encryptionKey:renderedCredentials.encryptionKey,excludeCharacters:renderedCredentials.excludeCharacters,replaceOnPasswordCriteriaChanges:credentials?.usernameAsString,replicaRegions:renderedCredentials.replicaRegions}),credentials?.usernameAsString?renderedCredentials.username:void 0)),renderedCredentials}function renderSnapshotCredentials(scope,credentials){let renderedCredentials=credentials;if(!renderedCredentials?.secret&&renderedCredentials?.generatePassword){if(!renderedCredentials.username)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MustBeSpecifiedTrue`,"`snapshotCredentials` `username` must be specified when `generatePassword` is set to true",scope);renderedCredentials=props_1().SnapshotCredentials.fromSecret(new(database_secret_1()).DatabaseSecret(scope,"SnapshotSecret",{username:renderedCredentials.username,encryptionKey:renderedCredentials.encryptionKey,excludeCharacters:renderedCredentials.excludeCharacters,replaceOnPasswordCriteriaChanges:renderedCredentials.replaceOnPasswordCriteriaChanges,replicaRegions:renderedCredentials.replicaRegions}))}return renderedCredentials}function helperRemovalPolicy(basePolicy){return basePolicy===core_1().RemovalPolicy.RETAIN?core_1().RemovalPolicy.RETAIN:core_1().RemovalPolicy.DESTROY}function renderUnless(value,suppressValue){return value===suppressValue?void 0:value}function applyDefaultRotationOptions(options,defaultvpcSubnets){return{excludeCharacters:exports.DEFAULT_PASSWORD_EXCLUDE_CHARS,vpcSubnets:defaultvpcSubnets,...options}}