fix: AgentCoreのリセット時にsessionIdを再生成してバックエンドの会話記憶を消去#1571
Closed
nakamaru-seiya24-fixer wants to merge 154 commits into
Closed
fix: AgentCoreのリセット時にsessionIdを再生成してバックエンドの会話記憶を消去#1571nakamaru-seiya24-fixer wants to merge 154 commits into
nakamaru-seiya24-fixer wants to merge 154 commits into
Conversation
chore: add `cdk.json` to `.gitignore`
💄 faviconとロゴを変更
…gaixer ✨ ページのタイトルを`GaiXer`に変更
* ✨ とりあえずJWTクレームにテナントIDを追加してみた * ✨ テナントIDの格納方法を変更 * ✨ preTokenGenerationをPythonへ移行 * 🐛 TenantIDの設定を忘れてた * 🐛 fix runtime * 🐛 Pythonファイルの場所を移動 * 🐛 LambdaVersionを2.0に修正 --------- Co-authored-by: Naoki Hosoya <64571463+hosoya-naoki20-fixer@users.noreply.github.com>
* ✨ feat(iam): add simple tenant IAM role creation with AssumeRoleWithWebIdentity - Created TenantIamRole CDK construct for IAM role only - Simplified deployment with just the IAM role creation - Added CLI script for easy deployment with parameters - Includes helper methods for common policy patterns - Minimal infrastructure - just the IAM role * 📝 docs: 日本語ドキュメントに更新 * ✨ feat(scripts): npm run cdk:deploy:tenant コマンドを追加 - ルートディレクトリから実行可能なnpmスクリプトを追加 - パラメータを受け取れる柔軟なデプロイスクリプトを実装 - ドキュメントを更新して使用方法を明記 * 🐛 fix: deploy-tenant-role.jsをgitに追加 - .gitignoreを更新してscriptsディレクトリのJSファイルを許可 - npm run cdk:deploy:tenantが正しく動作するように修正 * 🔧 refactor: ビルドプロセスを削除してデプロイを高速化 - deploy-tenant-role.jsからビルドステップを削除 - CDKは必要に応じて自動的にTypeScriptをコンパイルするため不要 * 🐛 fix: CDKデプロイコマンドを修正 - 他のCDKコマンドと同じ形式に統一 - npm run cdk -- deploy を使用するように変更 * ♻️ refactor: CDKコンテキストを使用したデプロイに変更 - カスタムnpmスクリプトとシェルスクリプトを削除 - cdk.jsonを追加して標準的なCDK設定を使用 - create-stacks.tsにテナントIAMロールスタックを統合 - CDKコンテキストパラメータでスタックを有効化・設定可能に * ♻️ refactor(cdk): CDKスタックをcommon/tenantディレクトリに分離し、テナント個別デプロイをサポート - packages/cdk/lib/stacks/common/: 共通スタック(メインアプリケーション) - packages/cdk/lib/stacks/tenant/: テナント固有スタック(IAMロールなど) - bin/generative-ai-use-cases-tenant.ts: テナントスタック用の新しいCDKアプリエントリポイント - npm run cdk:deploy:tenant: テナントスタックデプロイ用の新しいnpmコマンド - scripts/deploy-tenant-role.js: テナントIAMロールデプロイ用のヘルパースクリプト - docs/tenant-stack-deployment.md: テナントスタックデプロイのドキュメント * ♻️ refactor: デプロイコマンドを簡素化し、不要なヘルパースクリプトを削除 - npm run cdk:deploy:tenant に --all フラグを追加 - scripts/deploy-tenant-role.js を削除(npm コマンドで直接実行可能) - ドキュメントを更新して新しいデプロイフローを反映 * ♻️ refactor: テナントIAMロールのポリシー設定を更新 - S3ポリシーメソッドを削除(現時点では不要) - DynamoDBポリシーをテナント別テーブルアクセス用に更新 - テーブル命名規則: <BaseTableName>-<TenantId> - 例: ChatHistory-tenant123 - ドキュメントにIAMポリシー設定セクションを追加 * ✨ feat: 共通スタックとテナントスタック用に別々のcdk.json設定ファイルを実装 - cdk.json: 共通スタック(メインアプリケーション)用 - cdk.tenant.json: テナント固有スタック用 - npm run cdk:deploy: 共通スタックのみデプロイ - npm run cdk:deploy:tenant: テナントスタックのみデプロイ - npm run cdk:destroy:tenant: テナントスタック削除コマンドを追加 - CloudFormationパラメータ使用時のIAMロール作成にCfnJsonを使用して動的キー問題を解決 - ドキュメントを更新して設定ファイルの分離を説明 * 📝 docs: テナント設定用のサンプルファイルを追加 - cdk.tenant.example.json: テナント設定のテンプレートファイル - .gitignoreにcdk.tenant.jsonを追加(実際のテナント設定を誤ってコミットしないため) - ドキュメントを更新してサンプルファイルの使用方法を説明 * 🔥 remove: git追跡からcdk.tenant.jsonを削除 - cdk.tenant.jsonはテナント固有の設定を含むため、gitで追跡すべきではない - 代わりにcdk.tenant.example.jsonをテンプレートとして使用 - .gitignoreで適切に除外設定済み * :globe_with_meridians: docs: tenant-iam-role-only-ja.mdを削除し、tenant-stack-deployment-ja.mdを追加 * :wrench: fix: 全てのファイルの末尾に改行を追加 * :sparkles: feat: cdk:diff:tenant npmスクリプトを追加 * :wrench: fix: cdk:diff:tenantがcdk.tenant.jsonの設定を使用するように修正 - cdk-tenant.jsラッパースクリプトを追加して設定ファイルの切り替えを実装 - generative-ai-use-cases-tenant.tsでgetAllContext()を使用するように更新 - npmスクリプトを簡潔に修正 * :sparkles: feat: cdk-tenant.jsラッパースクリプトを追加 * :memo: docs: ラッパースクリプトアプローチの説明を追加 - cdk-tenant.jsに詳細なコメントを追加 - 英語・日本語のドキュメントに仕組みの説明を追加 - CDKの制約とソリューションを明確に説明 * :recycle: refactor: ラッパースクリプトを削除し、よりシンプルなアプローチに変更 - cdk-tenant.jsラッパースクリプトを削除 - generative-ai-use-cases-tenant.tsでcdk.tenant.jsonを直接読み込むように改善 - CDKのコンテキストとマージして、コマンドライン引数も優先できるように実装 * :wrench: chore: cdk.tenant.jsonから不要なapp/watchフィールドを削除 - テナントアプリが直接設定を読み込むため、appフィールドは不要 - contextフィールドのみを含むシンプルな構造に変更 * :sparkles: feat: スタック名のプレフィックスを設定可能に - stackNamePrefixパラメータを追加 - デフォルト: 'TenantIamRoleStack' - cdk.tenant.jsonまたはコマンドラインで設定可能 * :recycle: refactor: スタック名を設定不可にし、TenantStack-<tenantid>に固定 - stackNamePrefixパラメータを削除 - スタック名をTenantStack-<tenantid>に固定 - ドキュメントを更新 * 📝 docs: CDKコンテキスト方式を含む最新の実装に合わせてドキュメントを更新 * 🔧 fix: テナントロールのデフォルト名をTenantRole-<tenantId>に変更 * 📝 docs: テナントデプロイメントドキュメントをnpmスクリプト方式のみに簡素化 * :bug: fix(tenant-iam): Cognitoユーザープールの正しいフェデレーティッドプリンシパル条件キーを使用 - Cognito User PoolのARNから正しい条件キー(cognito-identity.amazonaws.com:aud)を抽出 - OIDCプロバイダーとその他のタイプに対する適切な処理を追加 - これにより「Federated principals must be valid domain names」エラーを修正 * :bug: fix(tenant-iam): Cognito Identity Poolの正しいフェデレーティッドプリンシパルを使用 - Cognito Identity PoolのARNに対して'cognito-identity.amazonaws.com'をプリンシパルとして使用 - WebIdentityPrincipalのfederatedパラメータとconditionキーを分離して処理 - これにより「Federated principals must be valid domain names」エラーを修正 * :fire: remove unneccesary jest.config.js
* 🎨 apply `npm run lint` * 🚨 一旦anyを潰した * 🐛 fix type error * 📝 PRのテンプレートをFIXER向けに変更 * 📝 PRテンプレートに申し送り事項の項目を追加
* ➖ remove husky and lint-staged * 🔥 remove pre-commit hook
* ✨ feat(iam): シングルロールでのマルチテナントリソースアクセス対応を追加 - MultiTenantRole構造を新規作成し、テナントIDベースの動的IAMポリシーを実装 - Pre Token Generation Lambdaで追加されるテナントIDタグを利用したリソースアクセス制御 - S3、DynamoDB、Bedrockへのテナント別アクセス制御ポリシーを追加 - STSのAssumeRoleWithWebIdentityとSessionタギングをサポート * ♻️ refactor(iam): テナント別テーブル構成に対応するようDynamoDBポリシーを更新 - DynamoDBアクセスポリシーをテナント別テーブル構成に対応 - テーブル命名規則: <prefix>-tenant-<tenant-id> - S3バケットポリシーも同様の命名規則で統一 - より多くのDynamoDB操作を許可(Scan, BatchGetItem, BatchWriteItem等) * 🐛 fix(iam): CfnJsonを使用してCognito条件キーの動的解決エラーを修正 - CloudFormationの制限により、IAMポリシー条件の動的キーはサポートされない - CfnJsonを使用してデプロイ時に条件キーを解決するように修正 - FederatedPrincipalを使用してWebIdentity認証を適切に設定 * ✨ feat(iam): IAMロール名を明示的に指定 - スタック名を含むロール名を明示的に設定 - パターン: <StackName><env>-MultiTenantAccessRole - 例: GenerativeAiUseCasesStackdev-MultiTenantAccessRole - AWS ConsoleやドキュメントでのロールIDを予測可能に * 🔥 remove(docs): 実装ガイドをリポジトリから削除 - multi-tenant-sts-implementation.mdは内部実装ガイドのため - PRには含めず、ローカルでの参照用として保持 * 🔥 remove(iam): Bedrockアクセスポリシーを削除 - マルチテナント構成ではBedrockへの直接アクセスは不要 - S3とDynamoDBのテナント別リソースアクセスのみに限定
* litellm-proxy-serverを追加 * デプロイ時のエラー解消 * 環境変数の追加 * config.yamlで各種LLMプロバイダーとの接続情報を管理する形に修正 * フォーマットの修正 * 修正漏れ * ダブルクォートに統一 * Dockerfileの不要な処理を削除
* feat: add httpClient * ➕ add orval * 👽️ generate schemas of LiteLLM API with Orval * 🔧 add orval config * 🚚 move API schema files * 🔧 add `orval:generate` script * 📦️ `npm i` * ✨ CreateConverseCommandInputの宣言だけ作った * ✨ httpClientを関数単位に改造 * 🔥 型定義ファイルが微妙だったので消した * ➕ add `string-argv` * 👽️ OpenAPIの定義ファイルをOpenAIのものに変更 * 🔥 OpenAPI定義を諦めた * ✨ OpenAIを使ってテキスト生成するクライアントを書いた * 🚚 rename file * ✨ LiteLLMに対応させた * 🔥 remove `httpClient.ts` * 🔥 Orvalの残渣を削除 * function urlでの呼び出しに対応するよう改修 * litellm-proxy-server起動スクリプトを修正 * 不要なコンソールを削除 * lintエラーの解消 * lintエラーの解消 * 不要な括弧を削除 --------- Co-authored-by: Y.Muro <165998973+muro-yuta24-fixer@users.noreply.github.com>
index.htmlにキャッシュ制御用のメタタグを追加し、ブラウザ側でHTMLファイルを キャッシュしないように設定。これにより、デプロイ後に即座に新バージョンが 反映されるようになり、ユーザーにキャッシュクリアを依頼する必要がなくなる。 - Cache-Control: no-cache, no-store, must-revalidate - Pragma: no-cache - Expires: 0 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
* litellmのモデル一覧をハードコード * Dockerfileを修正 * gpt-4.5-previewを除外
* 🔥 remove LiteLLM proxy configuration file * 🙈 ignore config.yaml
* ⚡ LiteLLM ProxyのLambda関数にProvisioned Concurrencyを設定 * 🐛 バグ修正
* ✨ feat(auth): STS AssumeRoleWithWebIdentity実装を追加
- AssumeRoleWithWebIdentity Lambda関数を作成
- /auth/assume-role APIエンドポイントを追加
- フロントエンド用STSクレデンシャルフックを実装
- テナント固有リソースアクセス用のユーティリティを追加
- AWS SDKクライアントファクトリーを作成
マルチテナント対応の第二段階として、STSによる一時的な認証情報の取得機能を実装。
Cognito JWTトークンからテナントIDを取得し、動的にテナント固有のリソースへの
アクセス権限を持つ一時的なクレデンシャルを生成する。
* 🔥 remove(frontend): Bedrock関連のコードを削除
現時点ではBedrockへのアクセスは不要なため、awsClientFactoryから
BedrockRuntimeClient関連のコードを削除
* 🎨 fix(lint): ファイル末尾に改行を追加
以下のファイルにEOF改行を追加:
- packages/web/src/utils/awsClientFactory.ts
- packages/web/src/hooks/useTenantResources.ts
- packages/web/src/hooks/useSTSCredentials.ts
- packages/cdk/lambda/assumeRoleForTenant.ts
* ♻️ refactor(sts): AssumeRoleWithWebIdentityの実装を修正
AWS SDKドキュメントに基づいて実装を修正:
- JWTトークンをSTSに直接渡すように変更
- Lambda内でのトークン検証とテナントID抽出を削除
- STSがCognitoと連携してトークンを検証し、クレームを抽出
- 不要な環境変数(USER_POOL_ID, USER_POOL_CLIENT_ID)を削除
STSがトークンの検証とセッションタグの設定を自動的に処理するため、
Lambda関数はトークンをSTSに渡すだけのシンプルな実装になりました。
* fix: 修正ビルドエラーとAWS SDK依存関係の追加
- useHttpのインポートをdefault importに修正
- DynamoDBのAttributeValue型を正しくインポート
- @aws-sdk/client-s3とclient-dynamodbの依存関係を追加
* ♻️ refactor(multi-tenant): STSを使用したバックエンド経由のリソースアクセスに変更
- フロントエンドからAWS SDKの直接使用を削除
- S3とDynamoDB操作用のバックエンドLambda関数を追加
- 各Lambda関数でSTS AssumeRoleWithWebIdentityを使用してテナント固有のアクセスを実装
- フロントエンドのuseTenantResourcesフックをバックエンドAPI呼び出しに更新
- 不要なuseSTSCredentialsフックとawsClientFactoryを削除
* 🔥 remove(frontend): useTenantResourcesフックを削除(PR#16で実装予定)
- 現時点では使用されていないuseTenantResourcesフックを削除
- 実際のマルチテナント機能実装時(PR#16)に追加予定
* 🐛 fix(lambda): テナント分離アーキテクチャに合わせて修正
- DynamoDBとS3で個別のテナントリソース(table/bucket)を使用するように修正
- テーブル名: {prefix}-tenant-{tenantId} (例: chats-tenant-companyA)
- バケット名: {prefix}-tenant-{tenantId} (例: files-tenant-companyA)
- tenantIdをアイテムに追加する処理を削除(テーブル/バケット自体で分離)
- PR#12のIAMポリシーと整合性を保つ実装に変更
* 🗃️ feat(dynamodb): マルチテナントDynamoDBアクセスの実装 (#16)
* feat: マルチテナントDynamoDBアクセスの実装
- テナントIDをJWTから抽出するユーティリティを追加
- テナント別テーブル名を生成する機能を実装
- TenantRepositoryクラスでテナント分離を実現
- 既存コードの移行ガイドを作成
- 実装の次のステップをドキュメント化
* 📝 fix(multi-tenant): clarify tenant isolation approach and fix IAM policies
- Document that tenant ID extraction from JWT claims is still necessary
- Explain that PrincipalTag-based ABAC requires Cognito configuration
- Update IAM policies to grant broader permissions with app-level isolation
- Add comprehensive documentation about current approach and future improvements
- Fix disconnect between IAM policies expecting session tags and STS implementation
* 🔒 refactor(multi-tenant): adopt zero-trust security model
- Remove unnecessary TagSession permission from IAM role
- Update documentation to emphasize zero-trust benefits
- Clarify that application-level validation is the primary security boundary
- Explain why zero-trust is better than tag-based ABAC for this use case
* ✨ feat(multi-tenant): implement tag-based ABAC with session tags
- Update Cognito Pre-Token Generation to add AWS session tags claim
- Rewrite IAM role to support PrincipalTag-based policies
- Enable true IAM-level tenant isolation with dynamic resource access
- Add comprehensive documentation for tag-based ABAC approach
- Configure trust policy to allow sts:TagSession for session tagging
* 🏷️ fix: replace 'any' types with proper TypeScript types
- Replace 'any' cast with proper FederatedPrincipal in multi-tenant-role.ts
- Create MessageItem interface for typed message handling
- Fix ListChatsResponse return type to match Pagination<Chat>
- Add missing id and createdDate fields to SystemContext mapping
- Fix duplicate ExpressionAttributeValues in updateFeedback
* 🎨 refactor: remove all TypeScript type annotations
- Remove all type annotations from multi-tenant-role.ts
- Remove type annotations from tenantUtils.ts
- Remove type annotations from assumeRoleForTenant.ts
- Remove type annotations from repositoryV2.ts
- Convert all functions to plain JavaScript style without types
* 🏷️ fix: complete TypeScript type safety improvements
- Add proper types to all function parameters
- Define MultiTenantRoleProps interface
- Remove unused imports to fix linting issues
- Ensure all files end with newline
* 🔧 fix(cdk): resolve CDK synthesis token resolution error
- Use WebIdentityPrincipal without conditions to avoid token resolution issues
- Remove duplicate trust policy statements
- Simplify role creation for Cognito OIDC provider
* feat: マルチテナントDynamoDBアクセスの実装を完了
- repository.tsの全関数をテナント対応に更新
- 全Lambdaハンドラーがeventパラメータを渡すように修正
- CDKインフラをテーブルベース名とIAMポリシーで更新
- テナント別テーブルアクセスのためのIAMポリシーを追加
これにより、各テナントのデータが分離されたDynamoDBテーブルに保存されるようになります。
* ♻️ refactor(repository): integrate v2 tenant changes into original files
- Updated repository.ts to include tenant-specific table logic
- Added helper functions getTableName() and getStatsTableName()
- All repository functions now accept event parameter for tenant context
- Removed separate v2 files (repositoryV2.ts, createChatV2.ts)
- Updated migration guide to reference updated repository.ts instead of v2
* 📝 docs: add comprehensive tenant resource access documentation
- Created HOW_USERS_ACCESS_TENANT_RESOURCES.md explaining both approaches
- Added TENANT_ACCESS_FLOW.md with visual flow diagrams
- Created PR_COMPARISON.md analyzing differences between PR#15 and PR#16
- Added PR16_NEEDED_CHANGES.md summarizing required changes
- Documented complete user journey from registration to resource access
* 🎨 docs: add ASCII flow diagrams for tenant resource access
- Created detailed ASCII art showing complete user journey
- Illustrated both PR#15 (IAM-level) and PR#16 (app-level) flows
- Added resource naming and isolation visualization
- Included decision flow for choosing the right approach
- Shows error scenarios and access control boundaries
* ✨ feat(unified): implement unified multi-tenant access approach
- Created unifiedTenantClient.ts for STS credential management with caching
- Implemented repositoryUnified.ts using IAM-secured DynamoDB clients
- Added createChatUnified.ts as example handler implementation
- Combined PR#15 IAM security with PR#16 API simplicity
- Credential caching reduces STS overhead while maintaining security
- Frontend remains simple with normal API calls
- IAM enforces tenant boundaries at AWS level
* 🔥 docs: remove unnecessary documentation and consolidate
- Removed analysis/comparison docs (PR_COMPARISON, etc.)
- Removed redundant flow diagrams and access guides
- Consolidated all essential information into:
- README.md: Complete multi-tenant implementation guide
- IMPLEMENTATION_STEPS.md: Remaining implementation tasks
- Simplified documentation structure for easier maintenance
* 🎨 docs: add ASCII flow diagrams for tenant access
- Added TENANT_ACCESS_FLOW.md showing all three approaches
- Added UNIFIED_APPROACH_FLOW.md with detailed unified architecture
- Includes credential caching, IAM enforcement, and performance details
- Shows complete user journey from login to resource access
* ♻️ refactor(multi-tenant): simplify and complete unified approach implementation
- Replace repository.ts with unified approach using AssumeRoleWithWebIdentity
- Rename unifiedTenantClient.ts to tenantDynamoDBClient.ts for clarity
- Add MULTI_TENANT_ROLE_ARN env var to all DynamoDB Lambda functions
- Add multiTenantAssumeRolePolicy to all DynamoDB Lambda functions
- Remove unnecessary files and duplicates (jest.config.js, unused lambdas)
- Simplify documentation to focus on the unified approach
- Maintain backward compatibility with table naming structure
* ✨ feat(multi-tenant): add generic multi-service tenant access support
- Created tenantClientFactory.ts for unified access to all AWS services
- Added support for S3, SQS, SNS, and Lambda with tenant isolation
- Refactored tenantDynamoDBClient.ts to use the central factory
- Added IAM policy helpers for all supported services
- Updated documentation with examples for each service type
- Restored deleted functionality with improved architecture
* ♻️ refactor(multi-tenant): simplify implementation to focus on essentials
- Removed unnecessary example files and centralized factory
- Created tenantCredentials.ts for shared credential management
- Kept tenantDynamoDBClient.ts focused on DynamoDB access
- Simplified documentation to remove specific service examples
- Maintained extensibility for future resource types without over-engineering
* ♻️ refactor(multi-tenant): simplify to rely on IAM-based tenant isolation
- Removed unnecessary tenant ID caching logic
- Simplified credential management - IAM policies handle isolation
- Clarified that tenant ID extraction is only for table naming, not security
- Updated documentation to explain tag-based access control (ABAC)
- Security is enforced by AWS IAM using ${aws:PrincipalTag/TenantID}
* 📝 docs(lambda): 包括的な移行ガイドと実装ステップを追加
- 5フェーズの詳細な移行ガイドを追加
- 即時・短期・中期・長期の実装目標を明確化
- モニタリングとセキュリティのベストプラクティスを追加
- パフォーマンス最適化の推奨事項を追加
* Revert "📝 docs(lambda): 包括的な移行ガイドと実装ステップを追加"
This reverts commit 1945d4e.
* 🐛 fix(multi-tenant): PR#16のレビュー指摘事項を修正
- RoleSessionName の64文字制限を修正
- STS AssumeRole にリトライロジックを追加(最大3回、指数バックオフ付き)
- テナント別の認証情報キャッシュを実装
- 認証情報の有効期限チェックと自動クリーンアップを追加
- Pre-Token Generation Lambda にエラーハンドリングを追加
- TenantRepository ラッパークラスを追加(よりクリーンなAPI提供)
これらの修正により、マルチテナント実装の信頼性とパフォーマンスが向上します。
* ✨ feat(multi-tenant): リポジトリパターンの改善とバリデーションドキュメント追加
- TenantRepository にインターフェースとゲッターを追加
- withRepository と withTenantRepository ラッパー関数を追加
- エラーハンドリングの自動化
- ボイラープレートコードの削減(66%削減)
- よりクリーンで簡潔なハンドラー実装が可能に
- テナントIDバリデーションの包括的なドキュメントを追加
- マルフォームドIDの例と対処法
- セキュリティ考慮事項
- 実装戦略とフェーズ
- 簡略化されたハンドラーの実装例を追加
これらの改善により、コードの可読性とメンテナンス性が大幅に向上します。
* ♻️ refactor(lambda): 改善されたリポジトリパターンへの移行
- 全てのLambdaハンドラーをtenantRepositoryパターンに移行
- withTenantRepositoryを使用してエラーハンドリングを自動化
- イベントパラメータの受け渡しを削除し、コードを66%削減
- 不要になったexamplesディレクトリを削除
* 📝 docs(lambda): リポジトリパターンのドキュメント整理
- 長いコメントをtenantRepository.tsから専用ドキュメントに移動
- docs/REPOSITORY_PATTERN.mdに包括的な使用ガイドを作成
- 使用パターン、移行ガイド、APIリファレンスを含む
- コード内には必要最小限のコメントと@seeリファレンスのみ保持
* 🐛 fix(cdk): 削除されたLambda関数への参照を修正
- assumeRoleForTenant, tenantS3Operations, tenantDynamoDBOperations Lambdaの参照を削除
- これらの機能は統一アプローチで各Lambda内で直接処理されるように変更済み
- package.jsonの重複依存関係を修正 (@aws-sdk/s3-request-presigner)
- デプロイエラーを解消
* 🚑 fix(lambda): テナント専用テーブルが存在しない場合のフォールバック処理を追加
- AssumeRoleWithWebIdentityが失敗した場合のフォールバック処理を追加
- デフォルトテナントは標準のDynamoDBクライアントを使用
- テナント専用テーブルが存在しない場合はデフォルトテーブルにフォールバック
- PR#18でテナント専用テーブルが作成されるまでの暫定対応
* 🐛 fix(lambda): 構文エラーを修正
- findSystemContextById関数の括弧の閉じ忘れを修正
- executeDynamoDBOperation呼び出しの構文を正しく修正
* 📝 docs(lambda): デプロイ戦略とトラブルシューティングガイドを追加
- フェーズ別デプロイ戦略を明記
- フォールバック動作の詳細説明を追加
- 500エラーの対処法を含むトラブルシューティングセクションを拡充
- デバッグログの例を追加
* ♻️ refactor(lambda): リポジトリパターン実装を元に戻し、将来の検討用にドキュメントを移動
- Repository patternの実装を一旦元に戻す
- 全てのLambdaハンドラーを元の実装パターンに復元
- tenantRepository.tsファイルを削除
- REPOSITORY_PATTERN.mdをdocs/refactoring/サブディレクトリに移動(将来の参照用)
- repository.ts内のマルチテナント機能は維持(event パラメータ経由)
この変更により、PR#15は純粋にマルチテナントアクセス機能の実装に集中し、
リポジトリパターンのリファクタリングは将来の別PRで検討することにしました。
* 🔥 remove(docs): 不要なドキュメントファイルを削除
- lambda/README.md を削除
- lambda/docs/TENANT_ID_VALIDATION.md を削除
PR#15を単一目的に集中させるため、不要なドキュメントファイルを削除
* 🔒 security(lambda): 認証情報のキャッシュを削除してユーザー分離を強化
## セキュリティ改善
- repository.ts: DynamoDBクライアントのキャッシュを削除
- tenantDynamoDBClient.ts: 認証情報付きクライアントのキャッシュを削除
- tenantCredentials.ts: STS認証情報のキャッシュを削除
## 理由
マルチテナント環境で同一テナント内の異なるユーザー間でのデータアクセス
を防ぐため、各リクエストごとに新しい認証情報を取得するように変更。
これにより、ユーザーごとのチャット履歴の完全な分離が保証される。
## パフォーマンスへの影響
キャッシュ削除によりSTSへのAPI呼び出しが増加するが、
セキュリティとデータプライバシーを優先する設計選択。
* 🔒 fix(api): remove overly permissive IAM policy for tenant tables
- Remove tenantTablePolicy that granted access to all tenant tables
- Default tenant users could access any tenant's data via Lambda execution role
- Security vulnerability: table/*-tenant-* pattern allowed cross-tenant access
- Each Lambda now only accesses tables via explicit CDK grants
* 🔒 fix(tenantCredentials): prevent session name collisions with hash-based naming
- Replace substring truncation with MD5 hash approach
- Prevent session name collisions when tenantId+userId are long
- Ensure timestamp is always included for uniqueness
- Session format: session-{16-char-hash}-{timestamp}
* 🔒 fix(multi-tenant-role): restrict S3 access to stack-specific buckets
- Add env parameter to MultiTenantRoleProps interface
- Update S3 ARN pattern to use stack name prefix for specificity
- Prevent access to buckets in other stacks/accounts
- Pattern: generativeaiusecasesstack{env}-*-tenant-{tenantId}
* 🔒 fix(tenantCredentials): reduce credential duration to 10 minutes
- Change DurationSeconds from 3600 (1 hour) to 600 (10 minutes)
- Reduce security exposure window for temporary credentials
- 10 minutes sufficient for Lambda execution while minimizing risk
* 🔥 remove(tenant-iam-role): delete obsolete multi-tenant implementation
- Remove tenant-iam-role.ts file from previous design iteration
- Remove export from index.ts to clean up API surface
- Current implementation uses unified MultiTenantRole approach
* 🔥 remove(tenantUtils): delete unused getTableNameForTenant function
- Function is never called anywhere in the codebase
- Removes dead code to improve maintainability
- Keep only actively used utility functions
* 📝 fix(repository): remove misleading caching comments
- Remove comments about non-existent caching mechanisms
- Comments mentioned caching but no caching is implemented
- Improve documentation accuracy
* 🚨 fix(lint): resolve ESLint errors
- Fix any type usage with proper error checking in repository.ts
- Remove unused PolicyDocument and FederatedPrincipal imports
- Ensure proper type safety for error handling
* 🔒 fix(multi-tenant): enable session tags for proper tenant isolation
- Add explicit SessionTags in AssumeRoleWithWebIdentity to pass TenantID
- Update trust policy to allow sts:TagSession action
- Restrict DENY policy to only tenant-specific resources (not all resources)
- This enables tag-based access control: ${aws:PrincipalTag/TenantID} in IAM policies
- Fixes 500 error when accessing tenant-specific DynamoDB tables and S3 buckets
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔒 fix(auth): fix Cognito Identity Pool trust relationship for multi-tenant ABAC
- Add explicit trust policy for cognito-identity.amazonaws.com in authenticated role
- Configure proper trust conditions with Identity Pool ID and amr authentication
- Add dependency ordering for CfnIdentityPoolPrincipalTag
- Improve error logging and validation in tenant credential utility
- Set allowUnauthenticatedIdentities to false for security
This resolves the "Invalid identity pool configuration" error by ensuring
the Identity Pool's authenticated role has proper trust relationship to
allow credential generation via GetCredentialsForIdentity.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔒 fix(multi-tenancy): migrate to cognito enhanced flow
AssumeRoleWithWebIdentity を内部で使用するGetCredentialsForIdentity を使用する形に移行
JWT に含まれるtenantId をABAC 方式でポリシーに動的にパースし、アクセス制御を行う
user -> cognito -> sts -> cognito -> user
ref:
https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html#authentication-flow-enhanced
* ⏪ checkout tenant-iam-role.ts to simplify file changes
---------
Co-authored-by: Claude <noreply@anthropic.com>
* 🏗️ feat(dynamodb): テナント別DynamoDBスタック構成を追加
- TenantDynamoDBStack CDKコンストラクトを作成
- テナントオンボーディング用Lambda関数を追加
- テナントステータス確認用Lambda関数を追加
- TenantManagementコンストラクトでAPI統合
- テナントプロビジョニング用スクリプトを追加
- 詳細なプロビジョニングガイドを作成
これにより、各テナント専用のDynamoDBテーブルを簡単にプロビジョニングできるようになります。
* ♻️ refactor(dynamodb): DynamoDB構築をConstructパターンに統一
- TenantDynamoDB Constructを新規作成し、tenant-iam-roleと同様のパターンに統一
- TenantDynamoDBStackを更新し、新しいConstructを使用するように変更
- パラメータベースのデプロイメントをサポート(CloudFormation parametersを使用)
- テストを追加して実装を検証
- pointInTimeRecoveryの非推奨警告を修正(pointInTimeRecoverySpecificationに更新)
- ユーティリティスクリプトへの依存を削除
* 🔧 chore(cdk): CDKテナントデプロイメントコマンドを追加
- npm run cdk:tenant:deploy - テナントスタックをデプロイ
- npm run cdk:tenant:list - テナントスタックをリスト表示
- npm run cdk:tenant:synth - テナントスタックを合成
- npm run cdk:tenant:diff - テナントスタックの差分を表示
- npm run cdk:tenant:destroy - テナントスタックを削除
- テナントデプロイメントガイドドキュメントを追加
* 🔥 remove(scripts): 不要なprovision-tenantスクリプトを削除
- provision-tenant.tsスクリプトを削除(cdk:tenant:deployコマンドで代替)
- package.jsonからprovision-tenantスクリプトを削除
- tenant-provisioning-guide.mdを更新し、CDKコマンドの使用方法を明確化
- 空のscriptsディレクトリを削除
新しいcdk:tenant:*コマンドがIAMロールとDynamoDBスタックの両方を
統合的に管理するため、単独のプロビジョニングスクリプトは不要
* 🚚 refactor(scripts): テナントCDKコマンドをルートpackage.jsonに移動
- cdk:tenant:* コマンドをルートpackage.jsonに移動
- packages/cdk/package.jsonから重複コマンドを削除
- ドキュメントを更新し、コマンドをリポジトリルートから実行することを明確化
- npm workspacesを使用した適切なコマンド構造に統一
* ✨ feat(cdk): テナントスタックデプロイ時のIAMロール作成を切り替え可能に
- TenantStackInputにcreateIamRoleパラメータを追加
- IAMロールの作成を条件付きで実行するロジックを実装
- CDKコンテキストからブーリアン値を正しくパースする処理を追加
- 英語・日本語のドキュメントを更新
- 設定例ファイルを更新
デフォルトではIAMロールを作成し、createIamRole=falseで無効化可能。
これにより、IAMロールが既に存在する場合やDynamoDBテーブルのみが必要な場合に対応。
* 🔥 remove(docs): 不要なテナントプロビジョニングドキュメントを削除
* 🔥 remove(lambda): 不要なテナントプロビジョニングLambda関数を削除
* 🔥 remove unnecessary IAM role stack related code due to it's no longer necessary
* ✨ feat(tenant): add Use Case Builder table to tenant DynamoDB stacks
- Add UseCaseBuilder table to TenantDynamoDB construct with proper schema
- Include Global Secondary Index for useCaseId lookups
- Update TenantDynamoDBStack to expose new table with outputs
- Add USECASE_BUILDER_TABLE_PREFIX constant for consistency
- Update tests to verify 3 tables created (was 2)
- Add specific tests for Use Case Builder table schema and custom base names
Now tenant stacks have complete parity with shared tables:
- Shared: ChatHistory, TokenUsageStats, UseCaseBuilder (3 tables)
- Per-tenant: ChatHistory-tenant-{id}, TokenUsageStats-tenant-{id}, UseCaseBuilder-tenant-{id} (3 tables)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✨ feat(tenant): add environment-based table naming and deletion protection
- Add environment field to tenant configuration (default: 'dev')
- Update table naming pattern to <prefix><env>-tenant-<tenant-id>
- Add environment and tenant ID tags to all DynamoDB tables
- Implement deletion protection: RETAIN for non-dev, DESTROY for dev
- Update helper methods to support environment parameter
- Add comprehensive tests for environment-based functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔥 refactor(tenant): remove cost-related configurations for optimization
- Remove explicit Point-in-Time Recovery configuration from all tables
- Remove explicit encryption settings (uses CDK defaults)
- Remove pointInTimeRecovery and encryption props from interfaces
- Update tests to remove PITR assertions
- Keep environment-based naming, tagging, and deletion policies
- Tables now align with default table configurations for cost efficiency
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✨ feat(tenant): improve table naming convention with proper hyphen separation
- Update table naming from <prefix><env>-tenant-<tenant-id> to <prefix>-<env>-tenant-<tenant-id>
- Improve readability: ChatHistorydev-tenant-fixer → ChatHistory-dev-tenant-fixer
- Update generateTableName helper method with consistent naming
- Update all test assertions to match new naming convention
- Ensure proper hyphen separation for better table name clarity
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✨ feat(tenant): add environment-aware table naming and fix deployment error
- Update tenant table naming to include environment: <prefix>-<env>-tenant-<tenant-id>
- Pass environment from CDK context to Lambda functions via ENVIRONMENT variable
- Fix CDK deployment error by removing unused TenantManagement construct
- Remove orphaned tenant-management.ts file and references
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix(tenant): address PR review feedback
- Fix stack naming to include environment and prevent conflicts
- Make environment parameter required instead of optional
- Update Lambda environment variable to use required pattern
- Make tenantDynamoDB construct private in stack
- Remove unused public getter methods from stack
- Reorganize CfnOutput declarations for better logical grouping
- Update all test cases to include required environment parameter
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 📝 docs(tenant): update tenant stack deployment documentation
- Update architecture explanation from IAM role-based to table-based approach
- Add detailed information about three DynamoDB tables (ChatHistory, TokenUsageStats, UseCaseBuilder)
- Update table naming convention to {BaseTableName}-{environment}-tenant-{tenantId}
- Add environment-based deletion protection and billing mode details
- Update deployment commands to new cdk:tenant:* pattern
- Add stack naming pattern: TenantDynamoDBStack{environment}-{tenantId}
- Remove outdated IAM role references and configuration examples
- Include construct directory structure and tagging information
- Update both English and Japanese versions with identical structural changes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* 🔐 feat(usecase-builder): ユースケースビルダーのDynamoDB テナント分離の実装 - useCaseBuilderRepository.tsにマルチテナントDynamoDBアクセスサポートを追加 - 全てのユースケースLambda関数をテナントコンテキスト対応に更新 - UseCaseBuilderコンストラクトにマルチテナントサポートの環境変数を追加 - テナント固有のDynamoDBテーブルへのアクセス制御を実装 - チャット機能と同様のテナント分離パターンを適用 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🧹 refactor(usecase-builder): remove unused table parameter - Remove table property from UseCaseBuilderProps interface - Remove table from constructor props destructuring - Remove table parameter from UseCaseBuilder instantiation The table parameter was never used as the construct creates its own internal table. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
* ✨ feat(s3): テナント専用S3バケットスタックの実装
## 概要
テナント専用S3バケットプロビジョニング機能を実装。DynamoDBパターンに基づく設計。
## 主な実装内容
### アーキテクチャ
- `TenantS3` construct: テナント専用S3バケット作成
- `TenantS3Stack`: スタック定義とCloudFormation出力
- テナントごとに3つのバケット作成:
- Documents bucket (RAG/knowledge base用)
- Chat attachments bucket (チャットファイルアップロード用)
- Analytics bucket (使用状況分析・レポート用)
### グローバル一意命名戦略
**命名パターン**: `{BucketBaseName}-{environment}{hashedEnv:8}-tenant-{tenantId}-{hashedGuid:remaining}`
- 最大63文字制限に準拠
- SHA256ハッシュによる一意性保証
- 特殊文字のサニタイゼーション
### 設定管理
```json
{
"tenantId": "tenant123",
"environment": "dev",
"removalPolicy": false,
"tenantRegion": "us-east-1"
}
```
### セキュリティ機能
- S3バケット暗号化 (S3 Managed)
- パブリックアクセスブロック
- SSL強制
- バージョニング有効
- 7日間の不完全マルチパートアップロード自動削除
### CORS設定
- Documents/Chat バケットにCORS設定
- Analytics バケットはバックエンド専用
## テスト
- 16のテストケースで包括的カバレッジ
- バケット名生成、セキュリティ、ライフサイクル、タグ付け検証
- 63文字制限とAWS命名規則準拠確認
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 📝 docs(tenant): S3プロビジョニング機能のドキュメント更新
## 更新内容
### English Documentation (docs/tenant-stack-deployment.md)
- Added S3 bucket provisioning information
- Updated architecture section with S3 bucket details
- Added bucket naming convention with hash-based uniqueness
- Documented three bucket types: Documents, Chat, Analytics
- Added security features and CORS configuration
- Updated deployment commands with removalPolicy examples
### Japanese Documentation (docs/tenant-stack-deployment-ja.md)
- S3バケットプロビジョニング情報を追加
- アーキテクチャセクションにS3バケット詳細を更新
- ハッシュベース一意性を持つバケット命名規則を追加
- 3つのバケットタイプを文書化:Documents、Chat、Analytics
- セキュリティ機能とCORS設定を追加
- removalPolicyの例でデプロイメントコマンドを更新
## 主要な追加情報
### バケット命名戦略
```
{BucketBaseName}-{environment}{hashedEnv:8}-tenant-{tenantId}-{hashedGuid:remaining}
```
- 63文字制限に準拠
- SHA256ハッシュによる一意性保証
- AWS S3命名規則準拠
### セキュリティ機能
- S3管理暗号化
- パブリックアクセス完全ブロック
- SSL/TLS強制
- バージョニング有効
- ライフサイクル管理
### 設定例
```json
{
"tenantId": "tenant123",
"environment": "dev",
"removalPolicy": false
}
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix(s3): S3バケットが削除されない問題を修正
- CDKコンテキストパラメータを removalPolicy から enableAutoDelete にリネーム
- S3バケットにautoDeleteObjectsプロパティを追加してバケット削除を有効化
- npm run cdk:tenant:destroy 実行時にS3バケットとその中身が正しく削除されるように修正
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ♻️ refactor(s3): align tenant S3 configurations with default buckets
- Remove lifecycle rules to match default bucket behavior
- Add objectOwnership: OBJECT_WRITER for consistency
- Standardize CORS configuration using addCorsRule method
- Maintain tenant isolation through naming and tagging
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix(s3): implement deterministic bucket naming to prevent duplicates
- Replace Date.now() and Math.random() with deterministic hash generation
- Use SHA256 hash of bucketBaseName + environment + tenantId + accountId + region
- Ensure same inputs always produce same bucket names (idempotent deployments)
- Prevent duplicate S3 buckets on CDK re-deployment
- Enable proper CDK resource tracking and updates
Fixes non-deterministic bucket naming issue identified in PR review.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ♻️ refactor(tenant): make removalPolicy non-nullable in TenantStackInput
- Change removalPolicy?: boolean to removalPolicy: boolean
- Remove default value fallback as property is now required
- Improve API clarity by requiring explicit removal policy specification
- Address PR review feedback about non-nullable property type
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔥 remove(s3): remove CORS and lifecycle configurations and tests
- Remove addCorsRule() calls from documentsBucket and chatBucket
- Remove lifecycleRules from commonBucketProps configuration
- Remove test cases for CORS and lifecycle rule configurations
- Simplify S3 bucket configuration to essential security features only
- All tests now pass (13/13) with cleaner, simplified implementation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 📝 docs(tenant): update S3 bucket naming documentation
- Update bucket naming convention to reflect deterministic hash structure
- Add detailed breakdown of hash input components and structure
- Remove outdated CORS and lifecycle configuration references
- Add comprehensive example with component breakdown
- Document key benefits of deterministic naming approach
- Update best practices to reflect simplified S3 configuration
Aligns documentation with implemented deterministic naming fix.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔥
* 📝 docs(tenant): update parameter name from removalPolicy to enableAutoDelete
Update documentation and configuration examples to use enableAutoDelete parameter instead of removalPolicy.
Changes:
- Updated cdk.tenant.example.json to use enableAutoDelete
- Updated tenant-stack-deployment.md with enableAutoDelete parameter
- Updated tenant-stack-deployment-ja.md with enableAutoDelete parameter
This aligns user-facing documentation with the actual parameter used in CDK context.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ♻️ refactor(s3): simplify bucket naming by removing redundant hashedEnv
- Remove hashedEnv (8-char hash) from S3 bucket naming pattern
- Simplify from: {bucket}-{env}{hashedEnv:8}-tenant-{id}-{guidHash}
- To: {bucket}-{env}-tenant-{id}-{guidHash}
- Increase guidHash space by ~8 characters for better uniqueness
- Update all tests to match new naming pattern
- Update English and Japanese documentation
- All 13 tenant-s3 tests pass
Benefits:
- Cleaner, more readable bucket names
- Eliminates redundant hashes (both contained same account/region info)
- More space for unique hash component
- Maintains deterministic, globally unique naming
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* ➖ remove `openai` * ➕ add `langchain` * ✨ バックエンドを実装した * ✨ フロントエンドから呼べるようにした * 🔐 クレデンシャル情報をいい感じにした * ✨ いい感じにした * ✏️ fix typo * ♻️ remove unused import * ✨ OpenAIをLangChain経由で呼べるようにした * ✨ Azure OpenAIを使用していたものをOpenAIに完全に移行 * ✨ 最低限のマルチモーダル対応 * ⚰️ 結局使わなくなったコードを削除 * ✨ S3からのデータのロードに対応 * 🏷️ フロントエンドをちょっとリファクタ * ♻️ remove unused import * 🔥 remove unused comments * ✨ 動いたのでコメント解除 * 🚨 不要なESLintのignoreを削除 * 💡 APIのコードにJSDocをつけた * 💡 コメント外し忘れ
* 🚚 GitHubリポジトリのURLを`aws-samples`から`fixer-github`に変更した * ✨ バージョン表示を一旦非表示にした
* 🔐 feat(s3): implement tenant S3 isolation with ABAC - Add tenant-specific S3 client creation using Cognito Identity Pool credentials - Implement S3 bucket pattern matching with environment hash consistency - Update IAM policies for tenant bucket access control via principal tags - Create utility functions for tenant bucket resolution and default tenant detection - Update file upload/download/delete Lambda functions for tenant isolation - Ensure no credential caching for proper user isolation within tenants - Follow same isolation pattern as DynamoDB implementation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(s3): S3バケット命名を決定論的ハッシュに修正 - Date.now()とMath.random()の代わりに固定入力を使用 - 冪等デプロイメントと適切なCDK追跡を保証 - PR#37の決定論的命名戦略に準拠 - CORS設定とライフサイクルルールを追加 - 全てのテナントS3テスト(16/16)が合格 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: cleanup and minor adjustments before rebase * ⏪ remove irrelevant file formats * 🌐 fix(s3): add CORS configuration to tenant S3 buckets - Add CORS rules to both chatBucket and documentsBucket in TenantS3 construct - Import HttpMethods from aws-cdk-lib/aws-s3 for proper CORS configuration - Match CORS settings from default fileBucket (GET, POST, PUT methods allowed) - Enable cross-origin requests for file uploads from browser to tenant buckets Fixes CORS error: "Cross-origin request blocked" when uploading to tenant-dedicated buckets 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔧 refactor(lambda): improve tenant S3 integration and JWT handling Lambda Functions: - Update getFileDownloadSignedUrl to use getTenantIdFromJWT for proper JWT extraction - Update getFileUploadSignedUrl to use getTenantIdFromJWT and improve tenant bucket handling - Add comprehensive logging for debugging tenant bucket operations - Improve error handling and bucket discovery logic Utility Functions: - Add getTenantIdFromJWT function with proper JWT verification using aws-jwt-verify - Add getTenantBucketNameByTenantId function for direct tenant ID-based bucket lookup - Improve findTenantBucket function with better logging and regex pattern matching - Enhanced error handling and fallback mechanisms Key Improvements: - Better separation of concerns between Lambda IAM role (bucket discovery) and tenant role (signed URL generation) - More robust tenant bucket pattern matching with SHA256 hash support - Comprehensive logging throughout the tenant isolation flow - Proper JWT token verification with both USER_POOL_ID and USER_POOL_CLIENT_ID 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🐛 fix(lambda): fix tenant S3 file deletion by using deterministic bucket naming - Switch from getTenantBucketName() to getTenantBucketNameByTenantId() in deleteFile.ts - Extract tenant ID from JWT token instead of event for consistency with upload flow - Use Lambda's IAM role to determine bucket name without requiring s3:ListAllMyBuckets permission - Add detailed logging for debugging tenant-specific operations This fixes the AccessDenied error that occurred when tenant credentials tried to list S3 buckets during file deletion. The deletion now works the same way as upload, using deterministic bucket naming that doesn't require listing permissions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔧 refactor(lambda): improve tenant S3 integration and JWT handling Lambda function improvements: - Add deterministic bucket name generation function to tenantS3Utils - Implement getTenantBucketNameByTenantId() for permission-free bucket discovery - Minor whitespace cleanup in getFileDownloadSignedUrl.ts Infrastructure improvements: - Add CDK_ACCOUNT_ID environment variable to Lambda functions for bucket naming - Add BUCKET_NAME environment variable to download function - Enhance CORS configuration with additional exposed headers for S3 operations These changes support the tenant isolation system by providing deterministic bucket naming that doesn't require s3:ListAllMyBuckets permission, improving security and reliability of tenant-specific file operations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🧹 refactor(s3): clean up unnecessary implementations in tenant S3 isolation Remove unused functions, environment variables, and permissions to streamline the implementation: **Removed Functions:** - getTenantBucketPattern() - no longer needed with deterministic naming - findTenantBucket() - used pattern matching with s3:ListAllMyBuckets - getTenantBucketName() - wrapper around removed pattern matching functions **Environment Variables Cleanup:** - Remove unused HASHED_ENVIRONMENT from all Lambda functions - Remove unused CHAT_BUCKET_BASE/DOCS_BUCKET_BASE (hardcoded in utils) - Clean up getTenantBucketNameByTenantId() to remove unused s3Client parameter **IAM Permission Cleanup:** - Remove unnecessary s3:ListAllMyBuckets permission (not needed with deterministic naming) **Code Quality:** - Remove unused imports and clean up function signatures - Update Lambda functions to use simplified deterministic bucket name generation - Maintain all functionality while removing ~100 lines of unnecessary code This cleanup makes the implementation more secure (fewer IAM permissions), more efficient (no bucket listing), and easier to maintain. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔧 fix(s3): implement tenant S3 isolation with bucket detection fix Add missing CDK_ACCOUNT_ID environment variable to createMessages lambda and implement complete tenant S3 isolation infrastructure: - Add deterministic tenant bucket name generation utilities - Implement tenant-specific S3 client creation - Update file upload/download/deletion lambdas for tenant isolation - Add tenant S3 construct for proper bucket management - Remove deprecated auth utility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔧 fix(multi-tenancy): remove attach multi tenant role policy parts for id pool auth uses default auth role. it is permmitted to access to tenant dedicated resources with ABAC pattern using principalTag. * 🔧 refactor(s3): add fallback bucket parameter to getTenantBucketNameByTenantId - Add fallbackBucketName parameter to getTenantBucketNameByTenantId function - Remove DEFAULT_BUCKET_NAME constant dependency from function - Simplify calling files by removing redundant isDefaultTenant validation - Function now handles all tenant cases internally with appropriate fallbacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔥 remove redundant parts * 🔧 fix(test): update tenant-s3 tests to match 5-bucket implementation (#42) * 🔧 fix(test): update tenant-s3 tests to match 5-bucket implementation * 🎨 apply `npm run lint` --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Naoki Hosoya <64571463+hosoya-naoki20-fixer@users.noreply.github.com>
* 🐛 fix: LiteLLM無効時にフロントエンドでモデルを非表示にする cdk.jsonでlitellmProxyEnabledがfalseの場合、フロントエンドの モデルセレクタにLiteLLMモデル(Gemini 2.5 Flash, Gemini 2.5 Pro) が表示されないように修正。 - WebPropsにlitellmProxyEnabledを追加 - buildEnvironmentにVITE_APP_LITELLM_PROXY_ENABLEDを追加 - useModel.tsで環境変数に基づきモデルリストを条件分岐 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: featuredModelIdsでLiteLLMモデルの表示条件を修正 LiteLLMプロキシが無効の場合、gemini-2.5-proをfeaturedModelIdsから 除外するように修正。また、VITE_APP_LITELLM_PROXY_ENABLEDの型定義を追加。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
ローカル開発環境(npm run web:devw)でlitellmProxyEnabled=trueにしても LiteLLMモデル(Gemini 2.5 Flash/Pro)が表示されない問題を修正。 CloudFormation出力からVITE_APP_LITELLM_PROXY_ENABLEDと VITE_APP_LITELLM_PROXY_ENDPOINTを取得する処理が欠落していた。 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🚨 fix `tailwindcss/no-unnecessary-arbitrary-value` * 🚨 fix `tailwindcss/no-custom-classname` and `tailwindcss/migration-from-tailwind-2` - Add font-mono and custom AWS colors (aws-font-color-secondary, aws-border) to tailwind.config.ts - Add animation classes to ESLint tailwindcss whitelist - Update bg-opacity-75 to Tailwind 3 syntax (bg-gray-500/75) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🎨 format code * 🐛 remove duplicated package --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Bedrock Converse APIでPDFを送信する際にcitations設定を有効にすることで、
画像ベースPDF(スキャン文書など)をClaudeが読み取れるようになります。
- DocumentBlockにcitations: { enabled: true }を追加
- PDFファイルの場合のみcitationsを有効化
- テキストベースPDFの処理には影響なし
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🐛 fix: 議事録生成で長文テキストの出力が途中で切れる問題を修正 長い文字起こしテキスト(27KB以上)を処理する際、LLMのmaxTokens制限に 達して出力が途中で切れる問題を修正。 変更内容: - stopReason='max_tokens'を検出し、自動で継続生成を行うロジックを追加 - 継続生成は最大5回まで実行 - 継続中の進捗状況をUIに表示(例:「継続 1/5 回目」) - 5言語の翻訳ファイルに継続生成メッセージを追加 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: ストリーム処理のエラーハンドリングを改善 - サイレント失敗を防ぐため、連続パースエラーの検出と例外スローを追加 - stopReason='error' のバックエンドエラーを適切に伝播するように修正 - console.debug を console.warn に変更して本番環境での可視性を向上 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🌐 fix: 継続プロンプトを英語に変更しi18nポリシーに準拠 LLMへの内部プロンプトを日本語から英語に変更し、 eslint-disable-next-lineコメントを削除 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: 自動生成タイマーのコロン表示の翻訳エラーを修正 存在しない翻訳キー common.colon を使用していたため、 「4common.colon54」のように表示されていた問題を修正。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🎨 format code * 🐛 fix: 議事録生成のエラーハンドリングにログ出力を追加 catchブロックでエラーが握りつぶされていた問題を修正。 console.errorを追加し、デバッグとエラーモニタリングを可能に。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ♻️ refactor: エラーハンドリングとコールバック処理を改善 - ストリーム完全失敗時(パース成功0件)にエラーをスローするよう変更 - 画面音声キャプチャ失敗時にユーザーへtoast通知を追加 - 重複していたコールバック処理を共通関数handleGenerationStatusに抽出 - 5言語に翻訳キーscreen_audio_failed_fallback_micを追加 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: エラーハンドリングを改善しmax_tokens到達時の警告を追加 - SyntaxError以外のエラー(TypeError, RangeErrorなど)を適切に再スロー - 空ストリーム検出の条件を簡素化(successfulParses === 0で判定) - 最大継続回数到達時にユーザーへ警告を表示 - generatingステータスを明示的に処理 - エラー詳細をコンソールに出力 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: JSONパースエラーログの機密情報露出を防止し警告メッセージを翻訳対応 - JSONパースエラー時に生のchunkデータではなく長さとプレビュー(先頭50文字)のみをログ出力 - max_tokens到達時の警告メッセージを5言語(ja, en, zh, th, vi)で翻訳対応 - ハードコードされた英語メッセージを翻訳キー(output_may_be_incomplete)に置換 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🌐 fix: ESLint i18nhelper/no-jp-string 警告をすべて修正
ハードコードされた日本語文字列を国際化対応の翻訳キーに置き換え:
- ChatListItem.tsx: 日付表示(今日、N日前)、メニュー項目
- SettingsModal.tsx: テーマ/言語/送信方法オプション、ラベル等
- ChatPage.tsx: システムプロンプト、エラーメッセージ、モデル説明翻訳
- useModel.ts: AIモデル説明文を翻訳キーに変更
5言語(ja, en, zh, th, vi)の翻訳ファイルに以下のキーを追加:
- chat.createChatError, chat.defaultSystemPrompt
- chatList.today, chatList.oneDayAgo, chatList.daysAgo, etc.
- model.descriptions.*
- settings.labels.*, settings.theme.*, settings.language.*, etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🌐 fix: ModelSelector.tsx の日本語文字列をi18n対応
- ModelSelector.tsx に useTranslation フックを追加
- 「その他モデル」を t('model.otherModels') に置き換え
- 5言語の翻訳ファイルに model.otherModels キーを追加
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🎨 format code
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* ✨ .envrcでESLintカスタムプラグインを自動ビルドするように追加 * ✨ `devbox.json`の`init_hook`にも追加
* 🚨 fix: ESLint no-undef エラーをすべて修正 TypeScript型参照(React, JSX, NodeJS, SignaturePad)をESLintの グローバル変数として定義し、ObjectsExt.jsのタイプミスを修正。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 fix: ObjectExt.checkExists のロジック反転バグを修正 checkExistsメソッドがオブジェクトの存在確認で逆の動作をしていた問題を修正。 また、TypeErrorのスローにnewキーワードを追加して標準的な書き方に統一。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🔧 refactor: ESLint設定から冗長なglobals.es2020を削除 typescriptConfig.languageOptions.globalsに既にglobals.es2020が 含まれているため、重複定義を削除。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🌐 fix: ESLint @shopify/jsx-no-hardcoded-content 警告をすべて修正
JSX内のハードコードされた文字列をi18n翻訳関数 t() に置き換え、
または eslint-disable コメントで適切に対処。
- 翻訳キーを追加 (全5言語: ja, en, th, zh, vi)
- コンポーネントの日本語/英語ハードコード文字列を t() に置換
- 数値やフォーマット記号など翻訳不要なものは eslint-disable で対応
- i18n初期化前に表示される Loading... は eslint-disable で対応
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🐛 fix: 欠落していた翻訳キーを追加し、DynamicRouterのLoading表示を国際化
- settings.deleteAccountDeletePlaceholder 翻訳キーを全5言語に追加
- DynamicRouter.tsx の "Loading..." を t('common.loading') に変更
- 不要な eslint-disable コメントを削除
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🌐 fix: th, zh, vi に不足していた翻訳キーを追加
PRで追加された新規翻訳キーを3言語(タイ語、中国語、ベトナム語)に追加:
- adminPortal.messages.verifyingAdminPrivileges
- chatSidebar (assistants, chatHistory, searchAssistants)
- common.ellipsis
- files.uploadFiles
- pptx.model (help, label)
- pptx.slideCount.labelWithCount
- userMenu (ariaLabel, logout, settings)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🌐 fix: th, zh, vi に assistant セクションの翻訳キーを追加
ja.yaml と en.yaml に存在していた assistant 関連の翻訳キーが
th, zh, vi に不足していたため追加。
追加したキー:
- assistant.chatPage.model/ragEnabled/sources/view
- assistant.edit.uploadingFiles
- assistant.history.createdWithDate/lastMessageWithDate
- assistant.visibility.privateDescriptionWithParens/publicDescriptionWithParens
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* 🎨 `npm run lint:fix`
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🚨 fix: ESLint @typescript-eslint/no-explicit-any 警告をすべて修正 catch ブロックの any 型を unknown 型に置き換え、isAxiosError 型ガードまたは instanceof Error を使用した型安全なエラーハンドリングに修正。 修正ファイル: - usePptxGeneration.ts (4件) - usePptxTemplates.ts (3件) - UserInviteDialog.tsx (4件) - useRoleMonitor.ts (2件) - auth.ts (1件) - PptxTemplateUploader.tsx (1件) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🚨 fix: auth.ts の isRoleMismatchError と isAuthorizationError で any を unknown に修正 - isRoleMismatchError: 安全でない型キャスト (as ErrorWithResponse) を isAxiosError 型ガードに置き換え - isAuthorizationError: eslint-disable コメントを削除し、isAxiosError 型ガードを使用 - ErrorWithResponse インターフェースを削除し、RoleMismatchData と AuthorizationErrorData に分離 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🚨 fix: usePptxTemplates で Error インスタンスのメッセージを保持するよう修正 catch ブロックで isAxiosError チェック後に instanceof Error チェックを追加し、 S3 アップロード失敗時などのカスタムエラーメッセージが失われる問題を修正。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🚨 fix: UserInviteDialog のエラーハンドリングを改善 - isAxiosError を instanceof Error より先にチェックするよう順序を修正し、 サーバーからのエラーメッセージが正しく表示されるように修正 - 不要な try-catch ラッパーを削除して no-useless-catch エラーを解消 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🚨 fix: usePptxGeneration で Error インスタンスのメッセージを保持するよう修正 usePptxTemplates.ts と同様のパターンで、catch ブロックに instanceof Error チェックを追加し、Axios 以外のエラーでもエラーメッセージが失われないよう修正。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* 🚨 fix(web): ESLint警告・エラーを修正 - no-unused-expressions: 三項演算子をOptional chainingに置換 (3件) - no-unused-expressions: 短絡評価をif文に置換 (2件) - no-empty-object-type: 空interfaceをtype aliasに変更 (1件) - react-hooks/exhaustive-deps: 意図的な依存配列除外にeslint-disable追加 (4件) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 📝 fix(web): eslint-disableコメントの説明を技術的に正確な表現に修正 useRoleMonitor.tsのeslint-disableコメントで「circular dependency」と説明されていたが、 実際の問題は循環依存ではなく、依存配列に含めた場合の無限ループ発生であるため、 より正確な説明に修正。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* こちらが2回表示されてるのを修正 * リンクになるように修正
When users attach files and then switch to a model that doesn't support those file types, they now see a clear error message indicating which model doesn't support which file type (document/image/video) instead of a generic "unsupported extension" error. Changes: - Added translation keys for model-specific errors in 5 languages - Enhanced validateUploadedFiles to detect model capability restrictions - Updated useFiles hook to accept modelFlags and modelName parameters - Updated InputChatContent and ChatPage to pass model info Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
* 🚨 fix(cdk): ESLint no-undef エラーを修正 CDKパッケージでNodeJSとawslambdaのno-undefエラーが発生していた問題を修正。 - eslint.config.cjsで共有設定のglobalsを継承するように変更 - AWS Lambda Response Streaming用のawslambdaグローバルを追加 - 不要になったeslint-disableコメントを削除 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🚨 fix(cdk): テストファイル用のJestグローバル設定を追加 テストファイルでno-undefエラー(describe, test, expect, jest等が未定義)が 発生していたため、ESLint設定にJestグローバル変数の定義を追加。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🔧 add `lint:fix` command for packages/cdk * 🚨 remove unused `eslint-disable-next-line` directives * 🎨 format code --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* スクロールが2つ出る不具合の修正 * 常にスクロールバーが出ているのを修正 * 必要のない対応を戻す * cssの変更を削除
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
全体方針に基づき、独自改修をすべて白紙化し、 本家GenU v5.4.0と同一の状態にリセット。 過去の独自改修履歴はすべてgit logから参照可能。
…ot (#302) * fix: 非AWS系依存パッケージの既知脆弱性を解消(93件→78件) npm updateによりsemver range内で以下のパッケージを更新し、 Critical 1件・High 8件を含む15件の脆弱性を解消した。 対象: handlebars, axios, react-router-dom, vite, flatted, dompurify, follow-redirects, postcss, qs, yaml, brace-expansion, minimatch, ajv, rollup, picomatch, diff 等。 残存78件はAWS SDK/CDK/Amplify内部依存またはbreaking change必須のため 本対応のスコープ外とする。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: Dependabotによる依存パッケージの継続的脆弱性監視を有効化 SDSチェックリスト項目19対応の一環として、Dependabotを導入し 依存パッケージの脆弱性を週次で自動監視する体制を構築する。 AWS SDK関連パッケージはグループ化し、1つのPRにまとめる設定。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* style(web): サイドバーのAgent系メニューのラベルを変更しExperimentalバッジを削除 * style(web): ホームの「試す」ボタンの文言を「開く」に変更 * style(web): AgentCoreページとホームのAgentCore表記をAIエージェントに変更 --------- Co-authored-by: nakayamasota <sota.nakayama.15@gmail.com>
* feat: リリースタグ付与時にSBOMを自動生成するワークフローを追加 SDSチェックリスト項目19対応の一環として、リリースタグ(v*)のpush時に CycloneDX形式のSBOMを自動生成しArtifactsに一時保管するワークフローを追加。 詳細な運用手順は開発・運用ルール/04_SBOM管理運用手順.mdを参照。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: SBOMワークフローの信頼性向上(--ignore-npm-errors削除・バージョン固定) - --ignore-npm-errorsを削除し、依存解決エラー時にワークフローを失敗させるよう変更 - @cyclonedx/cyclonedx-npmのメジャーバージョンを@6に固定し再現性を確保 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: agent-core-list-page * AgentCoreのチャット画面のURLをarnからnameに修正
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
AgentCoreのチャット画面で「最初からやり直す」ボタンを押しても、バックエンドの会話記憶が引き継がれる不具合を修正
原因
sessionIdはコンポーネントのマウント時に一度だけ生成され、リセット時に再生成されていなかった。リセットボタンを押すとローカルのチャット履歴(Zustand)はクリアされるが、
sessionIdが変わらないため、次回送信時に同じruntimeSessionIdが AWS BedrockAgentCore に渡され、バックエンドが以前の会話記憶を保持したまま応答していた。ページリロードではコンポーネントが再マウントされて新しい UUID が生成されるため記憶がリセットされており、症状と一致する。
修正内容
リセット時に
setSessionId(uuidv4())を呼び出し、新しいセッション ID を生成するようにした。AgentCorePage.tsxonResetにsetSessionId(uuidv4())を追加AgentChatUnified.tsxhandleResetChatにsetSessionId(uuidv4())を追加確認手順