feat(rewrite): tambah infrastructure — LLM client + full file persistence
Sub-fase 3a & 3e infrastructure TypeScript (@zesdex/infrastructure):
- llm/provider.ts: LlmClient (OpenAI/Anthropic-compatible fetch + SSE,
retry 10x exponential backoff + jitter, abort on 401/402/403,
stream quota-aware tool-call delta accumulation)
- resolveApiKey: settings.api_keys → app_config.env_var → inline default
- utils: writeJsonAtomic (tmp+rename+fsync), slugify, writeOsc52,
truncateChars, buildWorkspaceTree, runCommand
- persistence/cms: JsonSettingsRepository, JsonAppConfigRepository
(Claude credential auto-detection dari ~/.claude/settings.json + env),
JsonConversationRepository, JsonlEditLogRepository (append NDJSON),
MarkdownMemoryRepository (YAML-ish frontmatter), FileRewindBlobRepository
- persistence/iam: FileSystemSessionRepository, FileSystemSessionLockRepository,
FileSystemOAuthRepository
- Workspace @zesdex/infrastructure tsc clean, semua test domain+application
tetap hijau (38 pass)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>