Commit Graph

1 Commits

Author SHA1 Message Date
Shunsuke Hayashi
2931f600b4 feat(artifacts): add S3-based artifact management system
Implement artifact storage and distribution for θ-cycle outputs:

- src/artifacts/types.ts: Artifact, ArtifactMetadata interfaces
  * ArtifactType enum (file, code, report, image, log, json)
  * SaveArtifactOptions, DownloadUrlOptions, ArtifactFilter
- src/artifacts/manager.ts: S3 + DynamoDB client
  * save() / saveFile() - Upload to S3, store metadata in DynamoDB
  * getDownloadUrl() - Generate presigned URL (default: 1 hour)
  * get() - Retrieve artifact metadata
  * listBySession() / listByUser() - Query artifacts
  * deleteArtifact() / deleteBySession() - Cleanup
  * initializeTable() - DynamoDB table setup
- src/artifacts/manager.test.ts: Unit tests (skeleton)
- src/artifacts/index.ts: Module exports

Features:
- S3 storage with automatic expiration
- Presigned URLs for secure downloads
- DynamoDB metadata with TTL (default: 24 hours)
- GSI for sessionId/userId/type queries
- Session-based cleanup

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 06:57:01 +09:00