diff --git a/src/assets/cdk/bin/cdk.ts b/src/assets/cdk/bin/cdk.ts index 498eca3a..b3ce780a 100644 --- a/src/assets/cdk/bin/cdk.ts +++ b/src/assets/cdk/bin/cdk.ts @@ -51,9 +51,13 @@ async function main() { const stackName = toStackName(spec.name, target.name); // Extract credentials from deployed state for this target - const targetState = (deployedState as Record)?.targets as Record> | undefined; + const targetState = (deployedState as Record)?.targets as + | Record> + | undefined; const targetResources = targetState?.[target.name]?.resources as Record | undefined; - const credentials = targetResources?.credentials as Record | undefined; + const credentials = targetResources?.credentials as + | Record + | undefined; new AgentCoreStack(app, stackName, { spec, diff --git a/src/cli/commands/deploy/actions.ts b/src/cli/commands/deploy/actions.ts index 70cd4bcc..2b4dbd94 100644 --- a/src/cli/commands/deploy/actions.ts +++ b/src/cli/commands/deploy/actions.ts @@ -1,4 +1,5 @@ import { ConfigIO, SecureCredentials } from '../../../lib'; +import type { DeployedState } from '../../../schema'; import { validateAwsCredentials } from '../../aws/account'; import { createSwitchableIoHost } from '../../cdk/toolkit-lib'; import { buildDeployedState, getStackOutputs, parseAgentOutputs, parseGatewayOutputs } from '../../cloudformation'; @@ -20,7 +21,6 @@ import { } from '../../operations/deploy'; import { formatTargetStatus, getGatewayTargetStatuses } from '../../operations/deploy/gateway-status'; import type { DeployResult } from './types'; -import type { DeployedState } from '../../../schema'; export interface ValidatedDeployOptions { target: string; @@ -190,7 +190,7 @@ export async function handleDeploy(options: ValidatedDeployOptions): Promise 0) { - const existingPreSynthState = await configIO.readDeployedState().catch(() => ({targets: {}} as DeployedState)); + const existingPreSynthState = await configIO.readDeployedState().catch(() => ({ targets: {} }) as DeployedState); const targetState = existingPreSynthState.targets?.[target.name] ?? { resources: {} }; targetState.resources ??= {}; targetState.resources.credentials = deployedCredentials; diff --git a/src/cli/tui/hooks/useCdkPreflight.ts b/src/cli/tui/hooks/useCdkPreflight.ts index 9b95c742..c669adaa 100644 --- a/src/cli/tui/hooks/useCdkPreflight.ts +++ b/src/cli/tui/hooks/useCdkPreflight.ts @@ -364,7 +364,10 @@ export function useCdkPreflight(options: PreflightOptions): PreflightResult { // Check if API key providers need setup before CDK synth (CDK needs credential ARNs) // Skip this check if skipIdentityCheck is true (e.g., plan command only synthesizes) - const needsCredentialSetup = !skipIdentityCheck && (hasIdentityApiProviders(preflightContext.projectSpec) || hasIdentityOAuthProviders(preflightContext.projectSpec)); + const needsCredentialSetup = + !skipIdentityCheck && + (hasIdentityApiProviders(preflightContext.projectSpec) || + hasIdentityOAuthProviders(preflightContext.projectSpec)); if (needsCredentialSetup) { // Get all credentials for the prompt (not just missing ones) const allCredentials = getAllCredentials(preflightContext.projectSpec); @@ -641,7 +644,7 @@ export function useCdkPreflight(options: PreflightOptions): PreflightResult { if (Object.keys(deployedCredentials).length > 0) { const configIO = new ConfigIO(); const target = context.awsTargets[0]; - const existingState = await configIO.readDeployedState().catch(() => ({ targets: {} } as DeployedState)); + const existingState = await configIO.readDeployedState().catch(() => ({ targets: {} }) as DeployedState); const targetState = existingState.targets?.[target!.name] ?? { resources: {} }; targetState.resources ??= {}; targetState.resources.credentials = deployedCredentials; diff --git a/src/cli/tui/screens/mcp/AddGatewayFlow.tsx b/src/cli/tui/screens/mcp/AddGatewayFlow.tsx index c863c421..0f99cc83 100644 --- a/src/cli/tui/screens/mcp/AddGatewayFlow.tsx +++ b/src/cli/tui/screens/mcp/AddGatewayFlow.tsx @@ -21,13 +21,7 @@ interface AddGatewayFlowProps { onDeploy?: () => void; } -export function AddGatewayFlow({ - isInteractive = true, - onExit, - onBack, - onDev, - onDeploy, -}: AddGatewayFlowProps) { +export function AddGatewayFlow({ isInteractive = true, onExit, onBack, onDev, onDeploy }: AddGatewayFlowProps) { const { createGateway, reset: resetCreate } = useCreateGateway(); const { gateways: existingGateways, refresh: refreshGateways } = useExistingGateways(); const { targets: unassignedTargets } = useUnassignedTargets(); diff --git a/src/cli/tui/screens/mcp/AddGatewayScreen.tsx b/src/cli/tui/screens/mcp/AddGatewayScreen.tsx index 4301657c..13269eef 100644 --- a/src/cli/tui/screens/mcp/AddGatewayScreen.tsx +++ b/src/cli/tui/screens/mcp/AddGatewayScreen.tsx @@ -26,12 +26,7 @@ interface AddGatewayScreenProps { unassignedTargets: string[]; } -export function AddGatewayScreen({ - onComplete, - onExit, - existingGateways, - unassignedTargets, -}: AddGatewayScreenProps) { +export function AddGatewayScreen({ onComplete, onExit, existingGateways, unassignedTargets }: AddGatewayScreenProps) { const wizard = useAddGatewayWizard(unassignedTargets.length); // JWT config sub-step tracking (0 = discoveryUrl, 1 = audience, 2 = clients)