Commit Graph

5 Commits

Author SHA1 Message Date
Shunsuke Hayashi
4d4a478758 fix(lint): resolve more ESLint errors for unused variables/imports
- Remove unused imports in test files (manager.test.ts, discord-reply.test.ts)
- Remove unused ThetaPhase import in session/types.ts
- Change unused expiresAt to _expiresAt in session/recovery.ts
- Change unused SEARCH_PROVIDERS to _SEARCH_PROVIDERS in web-search.js
- Remove unused catch parameter _error in codex-reviewer.ts
- Clean up agent-flow.test.ts and githubops.test.ts imports

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 13:02:09 +09:00
Shunsuke Hayashi
4ec77dc3f4 fix(lint): resolve ESLint errors for unused variables
- Change unused catch parameter to _error in codex-reviewer.ts
- Remove unused ArtifactFilter import in artifacts/manager.ts
- Change unused error parameter to _error in session/recovery.ts
- Remove unused saveState import in session/manager.test.ts
- Convert unknown error to string in githubops.test.ts template literal

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 12:43:15 +09:00
Shunsuke Hayashi
415a52055c fix(session, theta, artifacts): fix P1 bugs from Codex review
- P1-1: Set currentPhase at start of execute() instead of end
- P1-2: Add AbortController support to timeout execution
- P1-3: Add createdAt to DynamoDB AttributeDefinitions for GSI
- P1-4: Remove PendingIndex to avoid hot key problem
- P1-5: Add conditional update to prevent recovery race condition
2026-01-26 07:35:38 +09:00
Shunsuke Hayashi
68a9b16c2b fix(response): resolve TypeScript compilation errors
- Add @aws-sdk/client-dynamodb dependency
- Remove non-existent LINE integration (line-reply.ts)
- Change ResponseFormat from enum to const object for type safety
- Fix Discord API imports - use inline types instead of non-existent exports
- Add CreateTableCommand import to artifacts/manager.ts
- Add tmuxTarget property to ReviewOptions
- Remove TimeToLiveSpecification from CreateTable (TTL configured separately)
- Fix timestamp type conversion in createDiscordReply

This resolves build errors when running the clawdbot command.
2026-01-26 07:16:59 +09:00
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