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,12 @@
import type { HttpRouteAuthorizerBindOptions, HttpRouteAuthorizerConfig, IHttpRouteAuthorizer } from '../../../aws-apigatewayv2';
import { HttpAuthorizerType } from '../../../aws-apigatewayv2';
/**
* Authorize HTTP API Routes with IAM
*/
export declare class HttpIamAuthorizer implements IHttpRouteAuthorizer {
/**
* The authorizationType used for IAM Authorizer
*/
readonly authorizationType = HttpAuthorizerType.IAM;
bind(_options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpIamAuthorizer=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp};class HttpIamAuthorizer{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_authorizers.HttpIamAuthorizer",version:"2.252.0"};authorizationType=aws_apigatewayv2_1().HttpAuthorizerType.IAM;bind(_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteAuthorizerBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{authorizationType:this.authorizationType}}}exports.HttpIamAuthorizer=HttpIamAuthorizer;

View File

@@ -0,0 +1,4 @@
export * from './user-pool';
export * from './jwt';
export * from './lambda';
export * from './iam';

View File

@@ -0,0 +1 @@
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.HttpUserPoolAuthorizer=void 0,Object.defineProperty(exports,_noFold="HttpUserPoolAuthorizer",{enumerable:!0,configurable:!0,get:()=>{var value=require("./user-pool").HttpUserPoolAuthorizer;return Object.defineProperty(exports,_noFold="HttpUserPoolAuthorizer",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpJwtAuthorizer=void 0,Object.defineProperty(exports,_noFold="HttpJwtAuthorizer",{enumerable:!0,configurable:!0,get:()=>{var value=require("./jwt").HttpJwtAuthorizer;return Object.defineProperty(exports,_noFold="HttpJwtAuthorizer",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpLambdaResponseType=void 0,Object.defineProperty(exports,_noFold="HttpLambdaResponseType",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").HttpLambdaResponseType;return Object.defineProperty(exports,_noFold="HttpLambdaResponseType",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpLambdaAuthorizer=void 0,Object.defineProperty(exports,_noFold="HttpLambdaAuthorizer",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").HttpLambdaAuthorizer;return Object.defineProperty(exports,_noFold="HttpLambdaAuthorizer",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpIamAuthorizer=void 0,Object.defineProperty(exports,_noFold="HttpIamAuthorizer",{enumerable:!0,configurable:!0,get:()=>{var value=require("./iam").HttpIamAuthorizer;return Object.defineProperty(exports,_noFold="HttpIamAuthorizer",{enumerable:!0,configurable:!0,value}),value}});

View File

@@ -0,0 +1,48 @@
import type { HttpRouteAuthorizerBindOptions, HttpRouteAuthorizerConfig, IHttpRouteAuthorizer } from '../../../aws-apigatewayv2';
/**
* Properties to initialize HttpJwtAuthorizer.
*/
export interface HttpJwtAuthorizerProps {
/**
* The name of the authorizer
* @default - same value as `id` passed in the constructor
*/
readonly authorizerName?: string;
/**
* The identity source for which authorization is requested.
*
* @default ['$request.header.Authorization']
*/
readonly identitySource?: string[];
/**
* A list of the intended recipients of the JWT.
* A valid JWT must provide an aud that matches at least one entry in this list.
*/
readonly jwtAudience: string[];
}
/**
* Authorize Http Api routes on whether the requester is registered as part of
* an AWS Cognito user pool.
*/
export declare class HttpJwtAuthorizer implements IHttpRouteAuthorizer {
private readonly id;
private readonly jwtIssuer;
private readonly props;
private authorizer?;
/**
* The authorizationType used for JWT Authorizer
*/
readonly authorizationType = "JWT";
/**
* Initialize a JWT authorizer to be bound with HTTP route.
* @param id The id of the underlying construct
* @param jwtIssuer The base domain of the identity provider that issues JWT
* @param props Properties to configure the authorizer
*/
constructor(id: string, jwtIssuer: string, props: HttpJwtAuthorizerProps);
/**
* Return the id of the authorizer if it's been constructed
*/
get authorizerId(): string;
bind(options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpJwtAuthorizer=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_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};class HttpJwtAuthorizer{id;jwtIssuer;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_authorizers.HttpJwtAuthorizer",version:"2.252.0"};authorizer;authorizationType="JWT";constructor(id,jwtIssuer,props){this.id=id,this.jwtIssuer=jwtIssuer,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_authorizers_HttpJwtAuthorizerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpJwtAuthorizer),error}}get authorizerId(){if(!this.authorizer)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`AuthorizerNotAttached`,"Cannot access authorizerId until authorizer is attached to a HttpRoute");return this.authorizer.authorizerId}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteAuthorizerBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return this.authorizer||(this.authorizer=new(aws_apigatewayv2_1()).HttpAuthorizer(options.scope,this.id,{httpApi:options.route.httpApi,identitySource:this.props.identitySource??["$request.header.Authorization"],type:aws_apigatewayv2_1().HttpAuthorizerType.JWT,authorizerName:this.props.authorizerName??this.id,jwtAudience:this.props.jwtAudience,jwtIssuer:this.jwtIssuer})),{authorizerId:this.authorizer.authorizerId,authorizationType:this.authorizationType}}}exports.HttpJwtAuthorizer=HttpJwtAuthorizer;

View File

@@ -0,0 +1,81 @@
import type { HttpRouteAuthorizerBindOptions, HttpRouteAuthorizerConfig, IHttpRouteAuthorizer } from '../../../aws-apigatewayv2';
import type { IRoleRef } from '../../../aws-iam';
import type { IFunction } from '../../../aws-lambda';
import { Duration } from '../../../core';
/**
* Specifies the type responses the lambda returns
*/
export declare enum HttpLambdaResponseType {
/** Returns simple boolean response */
SIMPLE = 0,
/** Returns an IAM Policy */
IAM = 1
}
/**
* Properties to initialize HttpTokenAuthorizer.
*/
export interface HttpLambdaAuthorizerProps {
/**
* Friendly authorizer name
* @default - same value as `id` passed in the constructor.
*/
readonly authorizerName?: string;
/**
* The identity source for which authorization is requested.
*
* @default ['$request.header.Authorization']
*/
readonly identitySource?: string[];
/**
* How long APIGateway should cache the results. Max 1 hour.
* Disable caching by setting this to `Duration.seconds(0)`.
*
* @default Duration.minutes(5)
*/
readonly resultsCacheTtl?: Duration;
/**
* The types of responses the lambda can return
*
* If HttpLambdaResponseType.SIMPLE is included then
* response format 2.0 will be used.
*
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html#http-api-lambda-authorizer.payload-format-response
*
* @default [HttpLambdaResponseType.IAM]
*/
readonly responseTypes?: HttpLambdaResponseType[];
/**
* The IAM role that the API Gateway service assumes while invoking the authorizer.
*
* Supported only for REQUEST authorizers.
*
* @default - No role
*/
readonly role?: IRoleRef;
}
/**
* Authorize Http Api routes via a lambda function
*/
export declare class HttpLambdaAuthorizer implements IHttpRouteAuthorizer {
private readonly id;
private readonly handler;
private readonly props;
private authorizer?;
private httpApi?;
/**
* The authorizationType used for Lambda Authorizer
*/
readonly authorizationType = "CUSTOM";
/**
* Initialize a lambda authorizer to be bound with HTTP route.
* @param id The id of the underlying construct
* @param pool The lambda function handler to use for authorization
* @param props Properties to configure the authorizer
*/
constructor(id: string, handler: IFunction, props?: HttpLambdaAuthorizerProps);
/**
* Return the id of the authorizer if it's been constructed
*/
get authorizerId(): string;
bind(options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpLambdaAuthorizer=exports.HttpLambdaResponseType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>tmp,tmp},aws_iam_1=()=>{var tmp=require("../../../aws-iam");return aws_iam_1=()=>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},HttpLambdaResponseType;(function(HttpLambdaResponseType2){HttpLambdaResponseType2[HttpLambdaResponseType2.SIMPLE=0]="SIMPLE",HttpLambdaResponseType2[HttpLambdaResponseType2.IAM=1]="IAM"})(HttpLambdaResponseType||(exports.HttpLambdaResponseType=HttpLambdaResponseType={}));class HttpLambdaAuthorizer{id;handler;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_authorizers.HttpLambdaAuthorizer",version:"2.252.0"};authorizer;httpApi;authorizationType="CUSTOM";constructor(id,handler,props={}){this.id=id,this.handler=handler,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_authorizers_HttpLambdaAuthorizerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpLambdaAuthorizer),error}}get authorizerId(){if(!this.authorizer)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`AuthorizerNotAttached`,"Cannot access authorizerId until authorizer is attached to a HttpRoute");return this.authorizer.authorizerId}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteAuthorizerBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(this.httpApi&&this.httpApi.apiId!==options.route.httpApi.apiId)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`CannotAttachSameAuthorizerToMultipleApis`,"Cannot attach the same authorizer to multiple Apis",options.scope);if(!this.authorizer){const enableSimpleResponses=(this.props.responseTypes??[HttpLambdaResponseType.IAM]).includes(HttpLambdaResponseType.SIMPLE)||void 0;this.httpApi=options.route.httpApi,this.authorizer=new(aws_apigatewayv2_1()).HttpAuthorizer(options.scope,this.id,{httpApi:options.route.httpApi,identitySource:this.props.identitySource??["$request.header.Authorization"],type:aws_apigatewayv2_1().HttpAuthorizerType.LAMBDA,authorizerName:this.props.authorizerName??this.id,enableSimpleResponses,payloadFormatVersion:enableSimpleResponses?aws_apigatewayv2_1().AuthorizerPayloadVersion.VERSION_2_0:aws_apigatewayv2_1().AuthorizerPayloadVersion.VERSION_1_0,authorizerUri:lambdaAuthorizerArn(this.handler),resultsCacheTtl:this.props.resultsCacheTtl??core_1().Duration.minutes(5),role:this.props.role}),this.props.role||this.handler.addPermission(`${core_1().Names.nodeUniqueId(this.authorizer.node)}-Permission`,{scope:options.scope,principal:new(aws_iam_1()).ServicePrincipal("apigateway.amazonaws.com"),sourceArn:core_1().Stack.of(options.route).formatArn({service:"execute-api",resource:options.route.httpApi.apiId,resourceName:`authorizers/${this.authorizer.authorizerId}`})})}return{authorizerId:this.authorizer.authorizerId,authorizationType:this.authorizationType}}}exports.HttpLambdaAuthorizer=HttpLambdaAuthorizer;function lambdaAuthorizerArn(handler){return`arn:${core_1().Stack.of(handler).partition}:apigateway:${core_1().Stack.of(handler).region}:lambda:path/2015-03-31/functions/${handler.functionArn}/invocations`}

View File

@@ -0,0 +1,54 @@
import type { HttpRouteAuthorizerBindOptions, HttpRouteAuthorizerConfig, IHttpRouteAuthorizer } from '../../../aws-apigatewayv2';
import type { IUserPool, IUserPoolClient } from '../../../aws-cognito';
/**
* Properties to initialize HttpUserPoolAuthorizer.
*/
export interface HttpUserPoolAuthorizerProps {
/**
* The user pool clients that should be used to authorize requests with the user pool.
* @default - a new client will be created for the given user pool
*/
readonly userPoolClients?: IUserPoolClient[];
/**
* The AWS region in which the user pool is present
* @default - same region as the Route the authorizer is attached to.
*/
readonly userPoolRegion?: string;
/**
* Friendly name of the authorizer
* @default - same value as `id` passed in the constructor
*/
readonly authorizerName?: string;
/**
* The identity source for which authorization is requested.
*
* @default ['$request.header.Authorization']
*/
readonly identitySource?: string[];
}
/**
* Authorize Http Api routes on whether the requester is registered as part of
* an AWS Cognito user pool.
*/
export declare class HttpUserPoolAuthorizer implements IHttpRouteAuthorizer {
private readonly id;
private readonly pool;
private readonly props;
private authorizer?;
/**
* The authorizationType used for UserPool Authorizer
*/
readonly authorizationType = "JWT";
/**
* Initialize a Cognito user pool authorizer to be bound with HTTP route.
* @param id The id of the underlying construct
* @param pool The user pool to use for authorization
* @param props Properties to configure the authorizer
*/
constructor(id: string, pool: IUserPool, props?: HttpUserPoolAuthorizerProps);
/**
* Return the id of the authorizer if it's been constructed
*/
get authorizerId(): string;
bind(options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpUserPoolAuthorizer=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_apigatewayv2_1=()=>{var tmp=require("../../../aws-apigatewayv2");return aws_apigatewayv2_1=()=>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};class HttpUserPoolAuthorizer{id;pool;props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigatewayv2_authorizers.HttpUserPoolAuthorizer",version:"2.252.0"};authorizer;authorizationType="JWT";constructor(id,pool,props={}){this.id=id,this.pool=pool,this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cognito_IUserPool(pool),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_authorizers_HttpUserPoolAuthorizerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpUserPoolAuthorizer),error}}get authorizerId(){if(!this.authorizer)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`AuthorizerNotAttached`,"Cannot access authorizerId until authorizer is attached to a HttpRoute");return this.authorizer.authorizerId}bind(options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_HttpRouteAuthorizerBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}if(!this.authorizer){const region=this.props.userPoolRegion??core_1().Stack.of(options.scope).region,clients=this.props.userPoolClients??[this.pool.addClient("UserPoolAuthorizerClient")];this.authorizer=new(aws_apigatewayv2_1()).HttpAuthorizer(options.scope,this.id,{httpApi:options.route.httpApi,identitySource:this.props.identitySource??["$request.header.Authorization"],type:aws_apigatewayv2_1().HttpAuthorizerType.JWT,authorizerName:this.props.authorizerName??this.id,jwtAudience:clients.map(c=>c.userPoolClientId),jwtIssuer:`https://cognito-idp.${region}.amazonaws.com/${this.pool.userPoolId}`})}return{authorizerId:this.authorizer.authorizerId,authorizationType:this.authorizationType}}}exports.HttpUserPoolAuthorizer=HttpUserPoolAuthorizer;