Commit Graph
11 Commits
Author SHA1 Message Date
asepharyana 49e79322b4 feat(api): port Fase 5 REST API — Bun.serve router + JWT middleware + auth/session/conversation/chat handlers + composition root 2026-09-02 22:50:38 +07:00
asepharyana 1b130e69b3 fix(auth): perbaiki base64url encode JWT — string di-base64 dulu sebelum replace chars 2026-09-02 22:50:38 +07:00
asepharyana 4b4730cff7 feat(ipc): port 3g IPC + bgbash — framed Unix-socket server/client + background job registry, wire bash tools 2026-09-02 22:50:38 +07:00
asepharyana fd58b4661f feat(auth): tambah OAuth loopback server untuk capture authorization-code redirect 2026-09-02 22:50:38 +07:00
asepharyana 7e8a160b0e feat(auth): port 3f auth infrastructure — Argon2 passwords + HS256 JWT tokens 2026-09-02 22:50:38 +07:00
asepharyana edc007619b feat(workflow): port 3d workflow + hive-mind engine — parse, execute, cycle, synthesis, docs 2026-09-02 22:50:38 +07:00
asepharyana a14a2275ff feat(subagent): port 3c subagent engine — run_agent loop + spawn/delegate/parallel 2026-09-02 22:50:38 +07:00
asepharyana 82b51f7921 feat(infra): port tool system ke TypeScript (37 tools + registry + executor)
Fase 3b rewrite Zesdex dari Rust ke TypeScript/Bun:
- Tool interface, ToolCtx + ToolCtxBuilder, InfrastructureToolExecutor
- Registry: allTools (37 tool), toolDefs, toolIsRisky, toolIsParallelSafe
- FS tools: read, write, edit, delete
- Search: grep, glob (glob matcher ringan)
- Shell: bash (timeout + timeout_spawn), bash_output, bash_kill
- Git: git_operator, git_worktree, git_cred + checkGitDestructive, checkCredentialRead
- Memory: remember, forget, recall via MarkdownMemoryRepository
- Utilitas: cd, dir_list, dir_cache_update, pong, todowrite, todofinish
- Best-practice: best_practice, commit_convention + BestPracticeEngine
- Web search (async fetch ke SearXNG), semantic_search/rebuild_index/list_symbols
- Workflow/spawn/parallel_delegate (delegasi ke engine 3c/3d dengan placeholder)
- Graduated checks + resolve_path sandbox (anti path-escape)
- 16 test tool system (registry, guards, resolve_path, fs roundtrip)

54 test hijau (38 lama + 16 baru), tsc strict bersih.
2026-09-02 22:50:38 +07:00
asepharyanaandClaude Opus 5 a2c7e5d44c 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>
2026-09-02 22:50:38 +07:00
asepharyanaandClaude Opus 5 03538a455a feat(rewrite): tambah application layer — port traits & use cases TypeScript
Paket @zesdex/application (apps/packages/application):
- ports: ProviderService (chat/chatStream+abort), PasswordService,
  TokenService, AuthService
- agent: AgentTurnServiceImpl (loop 50 iterasi, auto-compact 60k chars,
  adaptive max-tokens 800/1600/4096, temp 0.2/0.7, ErrorTracker,
  eksekusi tool read-only paralel terbatas mempertahankan urutan)
  + compact_messages_with_ai
- auth: OAuthUseCase (PKCE S256 + CSRF state), SessionServiceImpl
- cms: ConversationServiceImpl, MemoryServiceImpl, SettingsServiceImpl
- 11 unit test Bun (PKCE, OAuth CSRF, turn_service helper)
- tsconfig paths untuk workspace @zesdex/*

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 22:50:38 +07:00
asepharyanaandClaude Opus 5 07e84e43b3 feat(rewrite): bootstrap monorepo Bun + port domain layer ke TypeScript
Mulai migrasi Zesdex dari Rust ke TypeScript/Bun.

- Root workspace package.json, tsconfig strict, bun.lock, gitignore fix
- Paket @zesdex/domain (apps/packages/domain):
  - core: ChatMessage/Conversation/ToolCall/SseParser/repairJson/
    sanitizeToolArguments/UsageStats/Store/DomainError
  - auth: Session/SessionId/SessionLock/OAuth + repository & service interfaces
  - cms: AppConfig/Settings/SettingsPatch/Memory/EditLog + repository &
    service interfaces
  - agent: TurnEvent/SessionRuntime/AgentTurnParams/AgentProgress/prompt
  - subagent & workflow models
- Wire-shape JSON disamakan dengan Rust (serde rename/flatten/skip_if)
- 27 unit test Bun port dari test Rust (SseParser, repair_json, resolve_effective_model, session id)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 22:50:38 +07:00