소스 정보
- 저장소
- AzureFoxStudios/wabi
- 최근 소스 활동
- 2026년 8월 28일 15:43
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/AzureFoxStudios/wabi --skill wabidb-core-capabilities명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | wabidb-core-capabilities |
| description | Fact-checked reference for WabiDB's event-store architecture and API. |
| version | 0.3.0 |
| author | Hermes + review |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["WabiDB","Architecture","EventStore","Storage"]}} |
Fact-checked reference for WabiDB's actual architecture — an encrypted event/command store with materialized projections. NOT a generic key-value or SQL database.
/var/home/Ronin/wabiWabiDB is embedded as a library crate (wabidb) and wrapped by an Axum HTTP server (wabi-server). There is no standalone CLI.
| Component | File(s) | Purpose |
|---|---|---|
| Engine | src/engine/mod.rs | WabiDbEngine — top-level API, startup, recovery |
| Sequencer | src/sequencer/mod.rs | Single-threaded commit ordering, 5 crash points |
| Segment writer | src/stream_log/segment_writer.rs | Append-only .wseg files, per-stream |
| Commit index | src/commit_index/ | .widx batcher with fsync durability |
| Projections | src/projections/ | Materialized views via crossbeam-skiplist::SkipMap |
| Crypto | src/crypto/ | Per-stream AES-256-GCM, double ratchet, X3DH |
| Replication | src/replication/ + wabi-server/src/ | SyncTransport trait, HTTP push/pull |
| WabiStore trait | src/engine/wabi_store.rs | Typed domain API (50+ methods) |
| Benchmarks | benches/projection_read.rs | 24 benchmarks across get/list/compact |
WabiDB is not a key-value store. Clients submit structured CommandCommit messages containing typed events. The engine processes them through:
tokio::sync::Semaphore(1) permit. Assigns a monotonic commit_seq (never reused — "burned" on failure)..wseg file.CommitIndexEntry is built with all stream references and submitted to the batcher for fsync.spawn_projection_dispatcher() to update materialized views.commit_seq) is returned via a oneshot channel..wseg): Append-only, max ~64 MiB each, named 00000001.wseg etc. Each record: 48-byte RecordHeader + variable payload + 16-byte padding. Magic b"WABI", CRC32C on header and payload..widx): Global ordering log, batcher with configurable batch size/age. Contains StreamRef entries mapping each event to its segment location..wsnap): Point-in-time serialized projection state for fast recovery..bin + .meta): BLAKE3-addressed large binary data.storage-manifest.json tracking schema version, commit watermark, per-stream metadata.register_stream_key().commit_seq as nonce.RecordHeader, CommitIndexEntry, projection records (messages, wiki, forum, incidents, users), key encoding injectivity (wiki, forum, incidents), and domain JSON round-trips (wiki, forum, incidents).src/fuzz/mod.rs (14 test cases) covering RecordHeader, StreamRef, CommitIndexEntry, and parse_composite_key with empty/truncated/garbage/max-size inputs.crash_point!() macro in the sequencer to simulate hard exits at strategic boundaries.| Index Name | Projection Struct | Event Types | Record Type |
|---|---|---|---|
messages | MessagesProjection | message_created, message_edited, message_deleted | MessageRecord |
reactions | ReactionsProjection | reaction_added | Reaction |
channel_members | ChannelMembersProjection | channel_member_added | ChannelMemberRecord |
users | UsersProjection | user_registered | UserRecord |
emotes | EmotesProjection | emote_upserted | Emote |
webhooks | WebhooksProjection | webhook_upserted | Webhook |
user_layouts | LayoutsProjection | user_layout_upserted | UserLayout |
channels | ChannelProjection | channel_created | Channel (JSON) |
call_sessions | CallSessionsProjection | call_session_created, call_session_ended | CallSession |
call_participants | CallParticipantsProjection | call_participant_joined | CallParticipant |
call_signals |
All projections are registered in engine/mod.rs::build_type_registry().
Drift audit 2026-08-21 (current registry = 31 registrations): the table above is missing these newer entries — dm_identities, server_meta, whiteboard_docs (raw JSON board docs), lore ×4 (lore_repos, lore_commits, lore_file_changes, lore_tokens), and PaymentsProjection (one registration fanning EIGHT event types into four indexes: payment_account_links,payment_intents,payment_policies,payment_user_blocks — see projections/payments). Also newer engine frameworks not covered elsewhere: SecondaryIndex (A1, secondary indexes for messages), QueryableProjection (A2), replication interval + maintenance (A4/A5). ChannelKind now runs Text0→Gallery9, Category10, Lore11, Planning12, Reception13 — all append-only, never renumber.
Six projections support soft-delete via an is_deleted: bool field and a compact() method:
MessagesProjection::compact() — removes deleted messagesWikiProjection::compact() — removes deleted wiki pagesForumProjection::compact() — removes deleted forum postsIncidentProjection::compact() — removes deleted incidentsAlbumProjection::compact() — removes deleted albumsAlbumItemsProjection::compact() — removes deleted album itemscompact() calls ProjectionState::compact_index() which does a two-pass scan:
The list_* methods on each projection accept include_deleted: bool (default false).
WabiStore (src/engine/wabi_store.rs) is the typed domain API for reading/writing WabiDB data:
get_user, get_channel, get_message_typed, list_messages_typed, list_channels, list_channel_members, list_reactions, list_bans, list_role_definitions, get_emotes, get_webhooks, get_user_layout, get_channel_retention, list_albums, get_album, list_items, list_wiki_pages, get_wiki_page, list_forum_threads, list_forum_posts, get_forum_post, list_incidents, get_incident, get_dm_message, list_dm_messages, list_dm_recipientssend_message, create_user, create_channel, add_reaction, remove_reaction, add_channel_member, remove_channel_member, ban_user, unban_user, touch_user, create_album, delete_album, add_item, delete_item, create_wiki_page, update_wiki_page, delete_wiki_page, create_forum_thread, create_forum_post, update_forum_post, delete_forum_post, create_incident, update_incident, resolve_incident, send_dm_messageTwo implementations:
WdbAdapter (wabi-server) — backed by the real engine, writes events via self.run()LocalWabiStore (wabidb) — HashMap-backed in-memory store for testingbenches/projection_read.rs contains 24 benchmarks across three groups:
| Group | Benchmarks | Description |
|---|---|---|
projection_get | 10 | Single-record lookups (messages, members, dm, recipients, reactions, wiki, forum, incidents, albums, items) |
projection_list | 13 | Range scans with optional deleted filtering |
projection_compact | 1 | Compaction of 10% deleted records |
Each benchmark populates 10k records across 100 groups. Run with cargo bench -p wabidb -- projection_read.
SyncTransport trait with pull(), push(), latest_seq() methods.ReqwestTransport implementation using HTTP client.POST /api/v1/sync/pull, POST /api/v1/sync/push, GET /api/v1/sync/status..wseg bytes transferred as base64, written to same path structure on replica.WABIDB_PEER_ENDPOINT env var at server startup.| Purpose | Path |
|---|---|
| Engine + config + recovery | src/engine/mod.rs |
| Sequencer (commit logic) | src/sequencer/mod.rs |
| Segment writer | src/stream_log/segment_writer.rs |
| Commit index + batcher | src/commit_index/ |
| Projections + barrier | src/projections/ |
| Fuzz targets | src/fuzz/mod.rs |
| Power-loss tests | src/tests/power_loss.rs |
| Property tests | src/tests/property_tests.rs |
| Replication trait + config | src/replication/ |
| WabiStore trait + LocalWabiStore | src/engine/wabi_store.rs |
| WdbAdapter (server-side impl) | wabi-server/src/adapter/mod.rs |
| HTTP server + sync endpoints | wabi-server/src/ |
| Benchmarks | benches/projection_read.rs |
get(key) / put(key, value). The API is command/event-based..widx files on disk can conflict with the new batcher's create_new(true) call. Tests work around this by cleaning the commit-index directory between sessions.core/crates/wabidb/src/domain/mod.rs), ChannelKind, migrations, or projections MUST (1) document the change in the relevant plan doc BEFORE implementing, (2) flag the user for sign-off before altering domain types — do NOT silently edit schema, and (3) after landing, update WabiDB docs + skills (wabidb-core-capabilities, wabidb-store-trait, wabidb-projection-system). Embed a ⚠ DB CHANGE marker in any kanban card body that may alter schema. Known gaps when extending surfaces (forum/wiki/gallery): the wiki revision model and a Gallery ChannelKind variant are NOT yet present and require migration + doc + skill updates, not just new API routes.live ChannelKind/Channel domain field. A struct-field change to the Channel domain type risks the postcard replay-break class of bug — old events fail to decode on replay (this is exactly what broke Tim's accounts). Instead key Live behavior off the EXISTING in-memory channel_auto_delete_label map using the sentinel string "live" (already used for timed-retention labels). The backend update-channel-settings handler already accepts autoDeleteAfter: "live". Verified Live Rooms backend (in-memory reaper + per-message TTL + count cap + message-deleted emit + live-buffer-snapshot) lives in wabi-server; port recipe in software-development/wabi-frontend-polish → .Confirm understanding by tracing through the commit path:
process_command() in src/sequencer/mod.rscommit_seq assignment → segment writes → batcher submit → barrier advance → dispatcher → responsecrash_point!() calls and describe what state is durable at each pointCallSignalsProjection |
call_signal_emitted |
CallSignal |
wiki_pages | WikiProjection | wiki_page_created, wiki_page_edited, wiki_page_deleted | WikiPageRecord |
forum_posts | ForumProjection | forum_thread_created, forum_post_created, forum_post_edited, forum_post_deleted | ForumPostRecord |
gallery_works | GalleryWorkProjection | gallery_work_uploaded, gallery_work_edited, gallery_work_deleted | GalleryWorkRecord |
gallery_feedback | GalleryFeedbackProjection | gallery_feedback_added, gallery_feedback_deleted | GalleryFeedbackRecord |
wiki_revisions | WikiRevisionProjection | wiki_revision_created | WikiRevisionRecord |
incidents | IncidentProjection | incident_created, incident_updated, incident_resolved | IncidentRecord |
albums | AlbumProjection | album_created, album_updated, album_deleted | AlbumRecord |
album_items | AlbumItemsProjection | album_item_added, album_item_updated, album_item_removed | AlbumItemRecord |
dm_messages | DmMessagesProjection | dm_message_created | DmMessageRecord |
dm_message_recipients | DmMessageRecipientsProjection | dm_message_recipient_added | DmRecipientRecord |
audit | AuditProjection | role_assigned, role_removed, channel_settings_updated | AuditEntry |
references/live-rooms-architecture-and-port-recipe.md