1
Source Layout
Shinwoo PARK edited this page 2026-05-11 19:50:13 +09:00

Source Layout

The repository is now organized by domain folders under src/ instead of a flat list of top-level runtime files.

Current src/ structure

  • src/core/ — shared adapter interfaces, common types, and fact helpers
  • src/persona/ — persona initialization runtime
  • src/schedule/ — schedule generation, listing, and pruning
  • src/availability/ — availability persistence and snapshot resolution
  • src/conversation/ — DM-style conversation orchestration
  • src/memory/ — fact-draft persistence into IdentityDB
  • src/timing/ — timing constants, delay helpers, and timing profile class
  • src/providers/grok/ — xAI-specific runtime client and adapter helpers

Why the structure changed

The repository moved to domain folders to make the runtime easier to navigate as BoxBrain grew beyond a few flat modules.

This structure now makes it clearer where to look for:

  • public entrypoints for a domain
  • internal helpers related to that domain
  • class-based service abstractions for stateful integrations
  • provider-specific code that should stay separate from the provider-agnostic core

Class-oriented runtime surface

The current repository also leans more heavily on class-based entrypoints while still keeping the existing functional helpers.

Notable exported classes:

  • PersonaService
  • ScheduleService
  • AvailabilityService
  • ConversationService
  • FactDraftMemoryStore
  • TimingProfile
  • GrokApiClient

That means consumers can choose between:

  • functional usage for quick direct calls
  • service-class usage for cleaner composition inside larger applications

Important packaging note

The folder layout described on this page is the repository source structure.

The published package is still consumed through the package root exports, not through documented public subpath exports.

See API Reference for the supported root-level public surface.