chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import type {
|
||||
CodePipelineDisableStageTransitionParams,
|
||||
CodePipelineDisableStageTransitionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const disableStageTransitionTool: ToolConfig<
|
||||
CodePipelineDisableStageTransitionParams,
|
||||
CodePipelineDisableStageTransitionResponse
|
||||
> = {
|
||||
id: 'codepipeline_disable_stage_transition',
|
||||
name: 'CodePipeline Disable Stage Transition',
|
||||
description:
|
||||
'Prevent artifacts from transitioning into or out of a CodePipeline stage, freezing the pipeline at that point',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
stageName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the stage to disable the transition for',
|
||||
},
|
||||
transitionType: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Inbound to block artifacts entering the stage, Outbound to block artifacts leaving it',
|
||||
},
|
||||
reason: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Reason the transition is disabled, shown in the pipeline console (max 300 characters)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/disable-stage-transition',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
stageName: params.stageName,
|
||||
transitionType: params.transitionType,
|
||||
reason: params.reason,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to disable CodePipeline stage transition')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineName: data.output.pipelineName,
|
||||
stageName: data.output.stageName,
|
||||
transitionType: data.output.transitionType,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineName: { type: 'string', description: 'Pipeline name' },
|
||||
stageName: { type: 'string', description: 'Stage whose transition was disabled' },
|
||||
transitionType: {
|
||||
type: 'string',
|
||||
description: 'Transition type that was disabled (Inbound or Outbound)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import type {
|
||||
CodePipelineEnableStageTransitionParams,
|
||||
CodePipelineEnableStageTransitionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const enableStageTransitionTool: ToolConfig<
|
||||
CodePipelineEnableStageTransitionParams,
|
||||
CodePipelineEnableStageTransitionResponse
|
||||
> = {
|
||||
id: 'codepipeline_enable_stage_transition',
|
||||
name: 'CodePipeline Enable Stage Transition',
|
||||
description:
|
||||
'Re-enable artifacts transitioning into or out of a CodePipeline stage after it was disabled',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
stageName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the stage to enable the transition for',
|
||||
},
|
||||
transitionType: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Inbound to allow artifacts entering the stage, Outbound to allow artifacts leaving it',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/enable-stage-transition',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
stageName: params.stageName,
|
||||
transitionType: params.transitionType,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to enable CodePipeline stage transition')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineName: data.output.pipelineName,
|
||||
stageName: data.output.stageName,
|
||||
transitionType: data.output.transitionType,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineName: { type: 'string', description: 'Pipeline name' },
|
||||
stageName: { type: 'string', description: 'Stage whose transition was enabled' },
|
||||
transitionType: {
|
||||
type: 'string',
|
||||
description: 'Transition type that was enabled (Inbound or Outbound)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
import type {
|
||||
CodePipelineGetPipelineParams,
|
||||
CodePipelineGetPipelineResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getPipelineTool: ToolConfig<
|
||||
CodePipelineGetPipelineParams,
|
||||
CodePipelineGetPipelineResponse
|
||||
> = {
|
||||
id: 'codepipeline_get_pipeline',
|
||||
name: 'CodePipeline Get Pipeline',
|
||||
description:
|
||||
'Get the structure of a CodePipeline pipeline, including its stages, actions, and variables',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
version: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Pipeline version to retrieve (defaults to the current version)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/get-pipeline',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
...(params.version !== undefined && { version: params.version }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to get CodePipeline pipeline')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineName: data.output.pipelineName,
|
||||
pipelineArn: data.output.pipelineArn,
|
||||
roleArn: data.output.roleArn,
|
||||
version: data.output.version,
|
||||
pipelineType: data.output.pipelineType,
|
||||
executionMode: data.output.executionMode,
|
||||
artifactStoreType: data.output.artifactStoreType,
|
||||
artifactStoreLocation: data.output.artifactStoreLocation,
|
||||
stages: data.output.stages,
|
||||
variables: data.output.variables,
|
||||
created: data.output.created,
|
||||
updated: data.output.updated,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineName: { type: 'string', description: 'Pipeline name' },
|
||||
pipelineArn: { type: 'string', description: 'Pipeline ARN', optional: true },
|
||||
roleArn: { type: 'string', description: 'IAM role ARN the pipeline assumes' },
|
||||
version: { type: 'number', description: 'Pipeline version number', optional: true },
|
||||
pipelineType: { type: 'string', description: 'Pipeline type (V1 or V2)', optional: true },
|
||||
executionMode: {
|
||||
type: 'string',
|
||||
description: 'Execution mode (QUEUED, SUPERSEDED, PARALLEL)',
|
||||
optional: true,
|
||||
},
|
||||
artifactStoreType: {
|
||||
type: 'string',
|
||||
description: 'Artifact store type (S3)',
|
||||
optional: true,
|
||||
},
|
||||
artifactStoreLocation: {
|
||||
type: 'string',
|
||||
description: 'Artifact store bucket location',
|
||||
optional: true,
|
||||
},
|
||||
stages: {
|
||||
type: 'array',
|
||||
description: 'Pipeline stages with their actions (name, category, provider, configuration)',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
stageName: { type: 'string', description: 'Stage name' },
|
||||
actions: {
|
||||
type: 'array',
|
||||
description: 'Actions in the stage, in run order',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
variables: {
|
||||
type: 'array',
|
||||
description: 'Pipeline variable declarations with default values',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Variable name' },
|
||||
defaultValue: { type: 'string', description: 'Default value' },
|
||||
description: { type: 'string', description: 'Variable description' },
|
||||
},
|
||||
},
|
||||
},
|
||||
created: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the pipeline was created',
|
||||
optional: true,
|
||||
},
|
||||
updated: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the pipeline was last updated',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
import type {
|
||||
CodePipelineGetPipelineExecutionParams,
|
||||
CodePipelineGetPipelineExecutionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getPipelineExecutionTool: ToolConfig<
|
||||
CodePipelineGetPipelineExecutionParams,
|
||||
CodePipelineGetPipelineExecutionResponse
|
||||
> = {
|
||||
id: 'codepipeline_get_pipeline_execution',
|
||||
name: 'CodePipeline Get Pipeline Execution',
|
||||
description:
|
||||
'Get details of a CodePipeline execution, including status, trigger, source revisions, and resolved variables',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the pipeline execution',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/get-pipeline-execution',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
pipelineExecutionId: params.pipelineExecutionId,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to get CodePipeline pipeline execution')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineExecutionId: data.output.pipelineExecutionId,
|
||||
pipelineName: data.output.pipelineName,
|
||||
pipelineVersion: data.output.pipelineVersion,
|
||||
status: data.output.status,
|
||||
statusSummary: data.output.statusSummary,
|
||||
executionMode: data.output.executionMode,
|
||||
executionType: data.output.executionType,
|
||||
triggerType: data.output.triggerType,
|
||||
triggerDetail: data.output.triggerDetail,
|
||||
artifactRevisions: data.output.artifactRevisions,
|
||||
variables: data.output.variables,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineExecutionId: { type: 'string', description: 'Pipeline execution ID' },
|
||||
pipelineName: { type: 'string', description: 'Pipeline name' },
|
||||
pipelineVersion: { type: 'number', description: 'Pipeline version number', optional: true },
|
||||
status: {
|
||||
type: 'string',
|
||||
description:
|
||||
'Execution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed)',
|
||||
},
|
||||
statusSummary: {
|
||||
type: 'string',
|
||||
description: 'Status summary for the execution',
|
||||
optional: true,
|
||||
},
|
||||
executionMode: {
|
||||
type: 'string',
|
||||
description: 'Execution mode (QUEUED, SUPERSEDED, PARALLEL)',
|
||||
optional: true,
|
||||
},
|
||||
executionType: {
|
||||
type: 'string',
|
||||
description: 'Execution type (STANDARD or ROLLBACK)',
|
||||
optional: true,
|
||||
},
|
||||
triggerType: {
|
||||
type: 'string',
|
||||
description: 'What triggered the execution (e.g., Webhook, StartPipelineExecution)',
|
||||
optional: true,
|
||||
},
|
||||
triggerDetail: {
|
||||
type: 'string',
|
||||
description: 'Detail about the trigger (e.g., user ARN)',
|
||||
optional: true,
|
||||
},
|
||||
artifactRevisions: {
|
||||
type: 'array',
|
||||
description: 'Source artifact revisions for the execution',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Artifact name' },
|
||||
revisionId: { type: 'string', description: 'Revision ID (e.g., commit SHA)' },
|
||||
revisionSummary: {
|
||||
type: 'string',
|
||||
description: 'Revision summary (e.g., commit message)',
|
||||
},
|
||||
revisionUrl: { type: 'string', description: 'URL of the revision' },
|
||||
created: { type: 'number', description: 'Epoch ms when the revision was created' },
|
||||
},
|
||||
},
|
||||
},
|
||||
variables: {
|
||||
type: 'array',
|
||||
description: 'Resolved pipeline variables for the execution',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Variable name' },
|
||||
resolvedValue: { type: 'string', description: 'Resolved variable value' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
import type {
|
||||
CodePipelineGetPipelineStateParams,
|
||||
CodePipelineGetPipelineStateResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getPipelineStateTool: ToolConfig<
|
||||
CodePipelineGetPipelineStateParams,
|
||||
CodePipelineGetPipelineStateResponse
|
||||
> = {
|
||||
id: 'codepipeline_get_pipeline_state',
|
||||
name: 'CodePipeline Get Pipeline State',
|
||||
description:
|
||||
'Get the current state of a CodePipeline pipeline, including stage and action status and pending approval tokens',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/get-pipeline-state',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to get CodePipeline pipeline state')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineName: data.output.pipelineName,
|
||||
pipelineVersion: data.output.pipelineVersion,
|
||||
created: data.output.created,
|
||||
updated: data.output.updated,
|
||||
stageStates: data.output.stageStates,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineName: { type: 'string', description: 'Pipeline name' },
|
||||
pipelineVersion: { type: 'number', description: 'Pipeline version number', optional: true },
|
||||
created: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the pipeline was created',
|
||||
optional: true,
|
||||
},
|
||||
updated: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the pipeline was last updated',
|
||||
optional: true,
|
||||
},
|
||||
stageStates: {
|
||||
type: 'array',
|
||||
description: 'Per-stage state including latest execution status and action details',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
stageName: { type: 'string', description: 'Stage name' },
|
||||
status: {
|
||||
type: 'string',
|
||||
description:
|
||||
'Latest stage execution status (InProgress, Succeeded, Failed, Stopped, Cancelled)',
|
||||
},
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
description: 'Pipeline execution ID currently in the stage',
|
||||
},
|
||||
inboundTransitionEnabled: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the inbound transition into the stage is enabled',
|
||||
},
|
||||
actionStates: {
|
||||
type: 'array',
|
||||
description:
|
||||
'Per-action state with status, summary, error details, and approval token (for pending manual approvals)',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { disableStageTransitionTool } from '@/tools/codepipeline/disable_stage_transition'
|
||||
import { enableStageTransitionTool } from '@/tools/codepipeline/enable_stage_transition'
|
||||
import { getPipelineTool } from '@/tools/codepipeline/get_pipeline'
|
||||
import { getPipelineExecutionTool } from '@/tools/codepipeline/get_pipeline_execution'
|
||||
import { getPipelineStateTool } from '@/tools/codepipeline/get_pipeline_state'
|
||||
import { listActionExecutionsTool } from '@/tools/codepipeline/list_action_executions'
|
||||
import { listPipelineExecutionsTool } from '@/tools/codepipeline/list_pipeline_executions'
|
||||
import { listPipelinesTool } from '@/tools/codepipeline/list_pipelines'
|
||||
import { putApprovalResultTool } from '@/tools/codepipeline/put_approval_result'
|
||||
import { retryStageExecutionTool } from '@/tools/codepipeline/retry_stage_execution'
|
||||
import { startExecutionTool } from '@/tools/codepipeline/start_execution'
|
||||
import { stopExecutionTool } from '@/tools/codepipeline/stop_execution'
|
||||
|
||||
export * from './types'
|
||||
|
||||
export const codepipelineDisableStageTransitionTool = disableStageTransitionTool
|
||||
export const codepipelineEnableStageTransitionTool = enableStageTransitionTool
|
||||
export const codepipelineGetPipelineTool = getPipelineTool
|
||||
export const codepipelineGetPipelineExecutionTool = getPipelineExecutionTool
|
||||
export const codepipelineGetPipelineStateTool = getPipelineStateTool
|
||||
export const codepipelineListActionExecutionsTool = listActionExecutionsTool
|
||||
export const codepipelineListPipelineExecutionsTool = listPipelineExecutionsTool
|
||||
export const codepipelineListPipelinesTool = listPipelinesTool
|
||||
export const codepipelinePutApprovalResultTool = putApprovalResultTool
|
||||
export const codepipelineRetryStageExecutionTool = retryStageExecutionTool
|
||||
export const codepipelineStartExecutionTool = startExecutionTool
|
||||
export const codepipelineStopExecutionTool = stopExecutionTool
|
||||
@@ -0,0 +1,144 @@
|
||||
import type {
|
||||
CodePipelineListActionExecutionsParams,
|
||||
CodePipelineListActionExecutionsResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listActionExecutionsTool: ToolConfig<
|
||||
CodePipelineListActionExecutionsParams,
|
||||
CodePipelineListActionExecutionsResponse
|
||||
> = {
|
||||
id: 'codepipeline_list_action_executions',
|
||||
name: 'CodePipeline List Action Executions',
|
||||
description:
|
||||
'List action-level execution history for a CodePipeline pipeline, including per-action status, timing, and error details',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Only return action executions for this pipeline execution',
|
||||
},
|
||||
maxResults: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Maximum number of action executions to return (1-100, default 100)',
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Pagination token from a previous call',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/list-action-executions',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
...(params.pipelineExecutionId && { pipelineExecutionId: params.pipelineExecutionId }),
|
||||
...(params.maxResults !== undefined && { maxResults: params.maxResults }),
|
||||
...(params.nextToken && { nextToken: params.nextToken }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to list CodePipeline action executions')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
actionExecutionDetails: data.output.actionExecutionDetails,
|
||||
nextToken: data.output.nextToken,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
actionExecutionDetails: {
|
||||
type: 'array',
|
||||
description: 'Action execution history, most recent first',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
pipelineExecutionId: { type: 'string', description: 'Pipeline execution ID' },
|
||||
actionExecutionId: {
|
||||
type: 'string',
|
||||
description:
|
||||
'Action execution ID (use as the approval token for PARALLEL execution-mode pipelines)',
|
||||
},
|
||||
pipelineVersion: { type: 'number', description: 'Pipeline version number' },
|
||||
stageName: { type: 'string', description: 'Stage the action belongs to' },
|
||||
actionName: { type: 'string', description: 'Action name' },
|
||||
startTime: { type: 'number', description: 'Epoch ms when the action started' },
|
||||
lastUpdateTime: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the action was last updated',
|
||||
},
|
||||
updatedBy: { type: 'string', description: 'Who or what last updated the action' },
|
||||
status: {
|
||||
type: 'string',
|
||||
description: 'Action execution status (InProgress, Abandoned, Succeeded, Failed)',
|
||||
},
|
||||
externalExecutionId: {
|
||||
type: 'string',
|
||||
description: 'ID of the external system execution (e.g., CodeBuild build ID)',
|
||||
},
|
||||
externalExecutionSummary: {
|
||||
type: 'string',
|
||||
description: 'Summary from the external system execution',
|
||||
},
|
||||
externalExecutionUrl: {
|
||||
type: 'string',
|
||||
description: 'URL of the external system execution',
|
||||
},
|
||||
errorCode: { type: 'string', description: 'Error code if the action failed' },
|
||||
errorMessage: { type: 'string', description: 'Error message if the action failed' },
|
||||
},
|
||||
},
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
description: 'Pagination token for the next page of results',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
import type {
|
||||
CodePipelineListPipelineExecutionsParams,
|
||||
CodePipelineListPipelineExecutionsResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listPipelineExecutionsTool: ToolConfig<
|
||||
CodePipelineListPipelineExecutionsParams,
|
||||
CodePipelineListPipelineExecutionsResponse
|
||||
> = {
|
||||
id: 'codepipeline_list_pipeline_executions',
|
||||
name: 'CodePipeline List Pipeline Executions',
|
||||
description: 'List recent executions of a CodePipeline pipeline with status and source revisions',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
maxResults: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Maximum number of executions to return (1-100, default 100)',
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Pagination token from a previous call',
|
||||
},
|
||||
succeededInStage: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Only return executions that succeeded in this stage',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/list-pipeline-executions',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
...(params.maxResults !== undefined && { maxResults: params.maxResults }),
|
||||
...(params.nextToken && { nextToken: params.nextToken }),
|
||||
...(params.succeededInStage && { succeededInStage: params.succeededInStage }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to list CodePipeline pipeline executions')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
executions: data.output.executions,
|
||||
nextToken: data.output.nextToken,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
executions: {
|
||||
type: 'array',
|
||||
description: 'Pipeline execution summaries, most recent first',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
pipelineExecutionId: { type: 'string', description: 'Pipeline execution ID' },
|
||||
status: {
|
||||
type: 'string',
|
||||
description:
|
||||
'Execution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed)',
|
||||
},
|
||||
statusSummary: { type: 'string', description: 'Status summary for the execution' },
|
||||
startTime: { type: 'number', description: 'Epoch ms when the execution started' },
|
||||
lastUpdateTime: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the execution was last updated',
|
||||
},
|
||||
executionMode: {
|
||||
type: 'string',
|
||||
description: 'Execution mode (QUEUED, SUPERSEDED, PARALLEL)',
|
||||
},
|
||||
executionType: {
|
||||
type: 'string',
|
||||
description: 'Execution type (STANDARD or ROLLBACK)',
|
||||
},
|
||||
stopTriggerReason: {
|
||||
type: 'string',
|
||||
description: 'Reason the execution was stopped, if applicable',
|
||||
},
|
||||
triggerType: { type: 'string', description: 'What triggered the execution' },
|
||||
triggerDetail: { type: 'string', description: 'Detail about the trigger' },
|
||||
rollbackTargetPipelineExecutionId: {
|
||||
type: 'string',
|
||||
description: 'Execution ID this run rolled back to, if it was a rollback',
|
||||
},
|
||||
sourceRevisions: {
|
||||
type: 'array',
|
||||
description: 'Source revisions (commit IDs, summaries, URLs) for the execution',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
description: 'Pagination token for the next page of results',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import type {
|
||||
CodePipelineListPipelinesParams,
|
||||
CodePipelineListPipelinesResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listPipelinesTool: ToolConfig<
|
||||
CodePipelineListPipelinesParams,
|
||||
CodePipelineListPipelinesResponse
|
||||
> = {
|
||||
id: 'codepipeline_list_pipelines',
|
||||
name: 'CodePipeline List Pipelines',
|
||||
description: 'List all CodePipeline pipelines in an AWS account and region',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
maxResults: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Maximum number of pipelines to return (1-1000)',
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Pagination token from a previous call',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/list-pipelines',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
...(params.maxResults !== undefined && { maxResults: params.maxResults }),
|
||||
...(params.nextToken && { nextToken: params.nextToken }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to list CodePipeline pipelines')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelines: data.output.pipelines,
|
||||
nextToken: data.output.nextToken,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelines: {
|
||||
type: 'array',
|
||||
description: 'List of pipelines with name, version, type, and timestamps',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Pipeline name' },
|
||||
version: { type: 'number', description: 'Pipeline version number' },
|
||||
pipelineType: { type: 'string', description: 'Pipeline type (V1 or V2)' },
|
||||
executionMode: {
|
||||
type: 'string',
|
||||
description: 'Execution mode (QUEUED, SUPERSEDED, PARALLEL)',
|
||||
},
|
||||
created: { type: 'number', description: 'Epoch ms when the pipeline was created' },
|
||||
updated: { type: 'number', description: 'Epoch ms when the pipeline was last updated' },
|
||||
},
|
||||
},
|
||||
},
|
||||
nextToken: {
|
||||
type: 'string',
|
||||
description: 'Pagination token for the next page of results',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
import type {
|
||||
CodePipelinePutApprovalResultParams,
|
||||
CodePipelinePutApprovalResultResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const putApprovalResultTool: ToolConfig<
|
||||
CodePipelinePutApprovalResultParams,
|
||||
CodePipelinePutApprovalResultResponse
|
||||
> = {
|
||||
id: 'codepipeline_put_approval_result',
|
||||
name: 'CodePipeline Put Approval Result',
|
||||
description:
|
||||
'Approve or reject a pending CodePipeline manual approval action. The approval token is available from Get Pipeline State on the pending approval action',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
stageName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the stage containing the approval action',
|
||||
},
|
||||
actionName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the manual approval action',
|
||||
},
|
||||
token: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Approval token from Get Pipeline State for the pending approval',
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Approval decision: Approved or Rejected',
|
||||
},
|
||||
summary: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Summary explaining the approval decision (max 512 characters)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/put-approval-result',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
stageName: params.stageName,
|
||||
actionName: params.actionName,
|
||||
token: params.token,
|
||||
status: params.status,
|
||||
summary: params.summary,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to submit CodePipeline approval result')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
approvedAt: data.output.approvedAt,
|
||||
status: data.output.status,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
approvedAt: {
|
||||
type: 'number',
|
||||
description: 'Epoch ms when the approval or rejection was submitted',
|
||||
optional: true,
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
description: 'The submitted approval decision (Approved or Rejected)',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
import type {
|
||||
CodePipelineRetryStageExecutionParams,
|
||||
CodePipelineRetryStageExecutionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const retryStageExecutionTool: ToolConfig<
|
||||
CodePipelineRetryStageExecutionParams,
|
||||
CodePipelineRetryStageExecutionResponse
|
||||
> = {
|
||||
id: 'codepipeline_retry_stage_execution',
|
||||
name: 'CodePipeline Retry Stage Execution',
|
||||
description: 'Retry the failed actions (or all actions) of a failed CodePipeline stage',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
stageName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the failed stage to retry',
|
||||
},
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the pipeline execution in the failed stage',
|
||||
},
|
||||
retryMode: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Scope of the retry: FAILED_ACTIONS or ALL_ACTIONS',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/retry-stage-execution',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
stageName: params.stageName,
|
||||
pipelineExecutionId: params.pipelineExecutionId,
|
||||
retryMode: params.retryMode,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to retry CodePipeline stage execution')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineExecutionId: data.output.pipelineExecutionId,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
description: 'ID of the pipeline execution with the retried stage',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import type {
|
||||
CodePipelineStartExecutionParams,
|
||||
CodePipelineStartExecutionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const startExecutionTool: ToolConfig<
|
||||
CodePipelineStartExecutionParams,
|
||||
CodePipelineStartExecutionResponse
|
||||
> = {
|
||||
id: 'codepipeline_start_execution',
|
||||
name: 'CodePipeline Start Execution',
|
||||
description: 'Start a CodePipeline pipeline execution, optionally overriding pipeline variables',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline to start',
|
||||
},
|
||||
clientRequestToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Idempotency token to identify a unique execution request',
|
||||
},
|
||||
variables: {
|
||||
type: 'json',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Pipeline variable overrides as an array of { name, value } objects',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/start-execution',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
...(params.clientRequestToken && { clientRequestToken: params.clientRequestToken }),
|
||||
...(params.variables && params.variables.length > 0 && { variables: params.variables }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to start CodePipeline pipeline execution')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineExecutionId: data.output.pipelineExecutionId,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
description: 'ID of the pipeline execution that was started',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
import type {
|
||||
CodePipelineStopExecutionParams,
|
||||
CodePipelineStopExecutionResponse,
|
||||
} from '@/tools/codepipeline/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const stopExecutionTool: ToolConfig<
|
||||
CodePipelineStopExecutionParams,
|
||||
CodePipelineStopExecutionResponse
|
||||
> = {
|
||||
id: 'codepipeline_stop_execution',
|
||||
name: 'CodePipeline Stop Execution',
|
||||
description:
|
||||
'Stop a CodePipeline pipeline execution, either finishing in-progress actions or abandoning them',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
awsRegion: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS region (e.g., us-east-1)',
|
||||
},
|
||||
awsAccessKeyId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS access key ID',
|
||||
},
|
||||
awsSecretAccessKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'AWS secret access key',
|
||||
},
|
||||
pipelineName: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Name of the pipeline',
|
||||
},
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'ID of the pipeline execution to stop',
|
||||
},
|
||||
abandon: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Abandon in-progress actions instead of letting them finish (default false)',
|
||||
},
|
||||
reason: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Reason for stopping the execution (max 200 characters)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: '/api/tools/codepipeline/stop-execution',
|
||||
method: 'POST',
|
||||
headers: () => ({
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params) => ({
|
||||
region: params.awsRegion,
|
||||
accessKeyId: params.awsAccessKeyId,
|
||||
secretAccessKey: params.awsSecretAccessKey,
|
||||
pipelineName: params.pipelineName,
|
||||
pipelineExecutionId: params.pipelineExecutionId,
|
||||
...(params.abandon !== undefined && { abandon: params.abandon }),
|
||||
...(params.reason && { reason: params.reason }),
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Failed to stop CodePipeline pipeline execution')
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
pipelineExecutionId: data.output.pipelineExecutionId,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
pipelineExecutionId: {
|
||||
type: 'string',
|
||||
description: 'ID of the pipeline execution that was stopped',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
import type { ToolResponse } from '@/tools/types'
|
||||
|
||||
interface CodePipelineConnectionConfig {
|
||||
awsRegion: string
|
||||
awsAccessKeyId: string
|
||||
awsSecretAccessKey: string
|
||||
}
|
||||
|
||||
export interface CodePipelineListPipelinesParams extends CodePipelineConnectionConfig {
|
||||
maxResults?: number
|
||||
nextToken?: string
|
||||
}
|
||||
|
||||
export interface CodePipelineListPipelinesResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelines: {
|
||||
name: string
|
||||
version: number | undefined
|
||||
pipelineType: string | undefined
|
||||
executionMode: string | undefined
|
||||
created: number | undefined
|
||||
updated: number | undefined
|
||||
}[]
|
||||
nextToken?: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineStateParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
}
|
||||
|
||||
export interface CodePipelineActionState {
|
||||
actionName: string
|
||||
status: string | undefined
|
||||
summary: string | undefined
|
||||
lastStatusChange: number | undefined
|
||||
externalExecutionId: string | undefined
|
||||
externalExecutionUrl: string | undefined
|
||||
errorCode: string | undefined
|
||||
errorMessage: string | undefined
|
||||
percentComplete: number | undefined
|
||||
token: string | undefined
|
||||
revisionId: string | undefined
|
||||
entityUrl: string | undefined
|
||||
}
|
||||
|
||||
export interface CodePipelineStageState {
|
||||
stageName: string
|
||||
status: string | undefined
|
||||
pipelineExecutionId: string | undefined
|
||||
inboundTransitionEnabled: boolean | undefined
|
||||
actionStates: CodePipelineActionState[]
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineStateResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineName: string
|
||||
pipelineVersion: number | undefined
|
||||
created: number | undefined
|
||||
updated: number | undefined
|
||||
stageStates: CodePipelineStageState[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineExecutionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
pipelineExecutionId: string
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineExecutionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineExecutionId: string
|
||||
pipelineName: string
|
||||
pipelineVersion: number | undefined
|
||||
status: string
|
||||
statusSummary: string | undefined
|
||||
executionMode: string | undefined
|
||||
executionType: string | undefined
|
||||
triggerType: string | undefined
|
||||
triggerDetail: string | undefined
|
||||
artifactRevisions: {
|
||||
name: string
|
||||
revisionId: string | undefined
|
||||
revisionSummary: string | undefined
|
||||
revisionUrl: string | undefined
|
||||
created: number | undefined
|
||||
}[]
|
||||
variables: {
|
||||
name: string
|
||||
resolvedValue: string
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineListPipelineExecutionsParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
maxResults?: number
|
||||
nextToken?: string
|
||||
succeededInStage?: string
|
||||
}
|
||||
|
||||
export interface CodePipelineListPipelineExecutionsResponse extends ToolResponse {
|
||||
output: {
|
||||
executions: {
|
||||
pipelineExecutionId: string
|
||||
status: string
|
||||
statusSummary: string | undefined
|
||||
startTime: number | undefined
|
||||
lastUpdateTime: number | undefined
|
||||
executionMode: string | undefined
|
||||
executionType: string | undefined
|
||||
stopTriggerReason: string | undefined
|
||||
triggerType: string | undefined
|
||||
triggerDetail: string | undefined
|
||||
rollbackTargetPipelineExecutionId: string | undefined
|
||||
sourceRevisions: {
|
||||
actionName: string
|
||||
revisionId: string | undefined
|
||||
revisionSummary: string | undefined
|
||||
revisionUrl: string | undefined
|
||||
}[]
|
||||
}[]
|
||||
nextToken?: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineStartExecutionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
clientRequestToken?: string
|
||||
variables?: { name: string; value: string }[]
|
||||
}
|
||||
|
||||
export interface CodePipelineStartExecutionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineExecutionId: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineStopExecutionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
pipelineExecutionId: string
|
||||
abandon?: boolean
|
||||
reason?: string
|
||||
}
|
||||
|
||||
export interface CodePipelineStopExecutionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineExecutionId: string
|
||||
}
|
||||
}
|
||||
|
||||
export type CodePipelineRetryMode = 'FAILED_ACTIONS' | 'ALL_ACTIONS'
|
||||
|
||||
export interface CodePipelineRetryStageExecutionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
pipelineExecutionId: string
|
||||
retryMode: CodePipelineRetryMode
|
||||
}
|
||||
|
||||
export interface CodePipelineRetryStageExecutionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineExecutionId: string
|
||||
}
|
||||
}
|
||||
|
||||
export type CodePipelineApprovalStatus = 'Approved' | 'Rejected'
|
||||
|
||||
export interface CodePipelinePutApprovalResultParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
actionName: string
|
||||
token: string
|
||||
status: CodePipelineApprovalStatus
|
||||
summary: string
|
||||
}
|
||||
|
||||
export interface CodePipelinePutApprovalResultResponse extends ToolResponse {
|
||||
output: {
|
||||
approvedAt: number | undefined
|
||||
status: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
version?: number
|
||||
}
|
||||
|
||||
export interface CodePipelineActionDeclaration {
|
||||
name: string
|
||||
category: string
|
||||
owner: string
|
||||
provider: string
|
||||
version: string
|
||||
runOrder: number | undefined
|
||||
configuration: Record<string, string>
|
||||
inputArtifacts: string[]
|
||||
outputArtifacts: string[]
|
||||
}
|
||||
|
||||
export interface CodePipelineStageDeclaration {
|
||||
stageName: string
|
||||
actions: CodePipelineActionDeclaration[]
|
||||
}
|
||||
|
||||
export interface CodePipelineGetPipelineResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineName: string
|
||||
pipelineArn: string | undefined
|
||||
roleArn: string
|
||||
version: number | undefined
|
||||
pipelineType: string | undefined
|
||||
executionMode: string | undefined
|
||||
artifactStoreType: string | undefined
|
||||
artifactStoreLocation: string | undefined
|
||||
stages: CodePipelineStageDeclaration[]
|
||||
variables: {
|
||||
name: string
|
||||
defaultValue: string | undefined
|
||||
description: string | undefined
|
||||
}[]
|
||||
created: number | undefined
|
||||
updated: number | undefined
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineListActionExecutionsParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
pipelineExecutionId?: string
|
||||
maxResults?: number
|
||||
nextToken?: string
|
||||
}
|
||||
|
||||
export interface CodePipelineActionExecutionDetail {
|
||||
pipelineExecutionId: string | undefined
|
||||
actionExecutionId: string | undefined
|
||||
pipelineVersion: number | undefined
|
||||
stageName: string | undefined
|
||||
actionName: string | undefined
|
||||
startTime: number | undefined
|
||||
lastUpdateTime: number | undefined
|
||||
updatedBy: string | undefined
|
||||
status: string | undefined
|
||||
externalExecutionId: string | undefined
|
||||
externalExecutionSummary: string | undefined
|
||||
externalExecutionUrl: string | undefined
|
||||
errorCode: string | undefined
|
||||
errorMessage: string | undefined
|
||||
}
|
||||
|
||||
export interface CodePipelineListActionExecutionsResponse extends ToolResponse {
|
||||
output: {
|
||||
actionExecutionDetails: CodePipelineActionExecutionDetail[]
|
||||
nextToken?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type CodePipelineTransitionType = 'Inbound' | 'Outbound'
|
||||
|
||||
export interface CodePipelineDisableStageTransitionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
transitionType: CodePipelineTransitionType
|
||||
reason: string
|
||||
}
|
||||
|
||||
export interface CodePipelineDisableStageTransitionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
transitionType: CodePipelineTransitionType
|
||||
}
|
||||
}
|
||||
|
||||
export interface CodePipelineEnableStageTransitionParams extends CodePipelineConnectionConfig {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
transitionType: CodePipelineTransitionType
|
||||
}
|
||||
|
||||
export interface CodePipelineEnableStageTransitionResponse extends ToolResponse {
|
||||
output: {
|
||||
pipelineName: string
|
||||
stageName: string
|
||||
transitionType: CodePipelineTransitionType
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user