Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b5e0511
refactor: event segmenter
kwaa Apr 20, 2026
88d6cee
refactor: adjust prompt
kwaa Apr 20, 2026
744ef13
refactor: locomo example
kwaa Apr 20, 2026
a6de4cf
refactor: adjust prompt
kwaa Apr 20, 2026
71eb9e0
chore: fmt code
kwaa Apr 21, 2026
4b7bafd
refactor: improve structure
kwaa Apr 21, 2026
3f47d4b
refactor: split prompt
kwaa Apr 21, 2026
090b194
refactor(event-segmentation): include local event metadata in prompts
kwaa Apr 21, 2026
afeb7ee
chore(event-segmentation): log large split fallback errors
kwaa Apr 21, 2026
30172ce
refactor(event-segmentation): hard time gap
kwaa Apr 21, 2026
ea3ffe3
refactor(event-segmentation): pass boundary hints to merge prompt
kwaa Apr 21, 2026
03ddae0
refactor(event-segmentation): add segment length guidance to split pr…
kwaa Apr 21, 2026
95d63de
refactor(event-segmentation): adjust
kwaa Apr 21, 2026
119ed7c
refactor(event-segmentation): embedding-based
kwaa Apr 22, 2026
c4db65c
refactor(event-segmentation): boundary label
kwaa Apr 22, 2026
e3768cf
refactor(event-segmentation): dynamic boundary budget
kwaa Apr 22, 2026
a9a6367
refactor: merge
kwaa Apr 22, 2026
7e6dc54
refactor(event-segmentation/locomo-segmenter): json output
kwaa Apr 23, 2026
60369cf
chore: add locomo segmenter skill
kwaa Apr 23, 2026
94b6d49
chore: lint code
kwaa Apr 23, 2026
4a438a6
chore: update skill
kwaa Apr 23, 2026
2314ed1
refactor: single reason
kwaa Apr 23, 2026
dd6a437
refactor: update
kwaa Apr 23, 2026
4fffc6b
refactor: update prompts
kwaa Apr 23, 2026
ba1dd4b
refactor: improve structure
kwaa Apr 23, 2026
f12c384
refactor: dynamic boundaries budget
kwaa Apr 23, 2026
86179c3
refactor(event-segmentation): split
kwaa Apr 24, 2026
c631104
refactor(event-segmentation): clean
kwaa Apr 24, 2026
fe286b2
refactor(worker): use event segmenter instead of queue
kwaa Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ benchmarks/locomo/data/
benchmarks/locomo/results/
benchmarks/longmemeval/results/

# Claude Code
# Claude Code / Codex
.claude
.codex

# Logs
logs
Expand Down
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ strum = { version = "0.28", features = ["derive"] }
tokio = { version = "1.49.0", features = [ "full" ] }
tracing = "0.1"
tracing-error = "0.2"
tracing-subscriber = "0.3.22"
uuid = { version = "1.20.0", features = [
"serde",
"v4",
Expand Down Expand Up @@ -112,4 +113,4 @@ apalis-postgres.workspace = true
sea-orm.workspace = true
tokio.workspace = true
tracing-error.workspace = true
tracing-subscriber = "0.3.22"
tracing-subscriber.workspace = true
22 changes: 6 additions & 16 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
mod conversation_message;
pub use conversation_message::ConversationMessage;

mod message_queue;
pub use message_queue::{
ADD_BACKPRESSURE_LIMIT, FENCE_TTL_MINUTES, MessageQueue, PendingReview, QueueProcessingStatus,
SegmentationCheck,
};

mod memory;
pub use memory::EpisodicMemory;
pub use memory::SemanticMemory;
pub use memory::{DetailLevel, format_tool_result};

mod pending_review_queue;
pub use pending_review_queue::{
PendingReview, PendingReviewQueueItem, add_pending_review_item, take_pending_review_items,
};

mod message_ingest;
pub use message_ingest::{append_batch_messages, append_message, try_claim_segmentation_job};

pub(crate) mod segmentation_state;
pub use segmentation_state::{
EpisodeSpan, SegmentJobState, SegmentationJobClaim, SegmentationProcessingStatus,
SegmentationState, abort_segmentation_job, commit_segmentation_job, get_claim_messages,
get_episode_span, get_messages_in_range, get_segmentation_processing_status,
get_segmentation_state, recover_stale_segmentation_job,
};
12 changes: 9 additions & 3 deletions crates/core/src/memory/retrieval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pub fn format_tool_result(

#[cfg(test)]
mod tests {
use chrono::Utc;
use chrono::TimeZone;
use chrono::Utc;
use sea_orm::prelude::PgVector;
use uuid::Uuid;

Expand Down Expand Up @@ -87,8 +87,14 @@ mod tests {
#[test]
fn format_tool_result_outputs_only_episodic_content_blocks() {
let episodic = vec![
(episodic_memory("Spoken At: Jun 15, 2026 3 PM\nSam: hello"), 0.9),
(episodic_memory("Spoken At: Jun 16, 2026 4 PM\nEvan: hi"), 0.8),
(
episodic_memory("Spoken At: Jun 15, 2026 3 PM\nSam: hello"),
0.9,
),
(
episodic_memory("Spoken At: Jun 16, 2026 4 PM\nEvan: hi"),
0.8,
),
];

let rendered = format_tool_result(&[], &episodic, &DetailLevel::Auto);
Expand Down
Loading