Skip to content

Enhance command-based content type inference and distillation logic#56

Merged
fajarhide merged 11 commits intomainfrom
fix/transparant-stats
Apr 12, 2026
Merged

Enhance command-based content type inference and distillation logic#56
fajarhide merged 11 commits intomainfrom
fix/transparant-stats

Conversation

@fajarhide
Copy link
Copy Markdown
Owner

@fajarhide fajarhide commented Apr 12, 2026

PR Auto Describe

Summary

This PR overhauls Omni's core pipeline and CLI stack, replacing the legacy content-type classification model with command-aware routing, cleaning up deprecated code, and streamlining user-facing reporting and performance.


Key Changes

  1. Replaced legacy content-based pipeline routing with command-first profile resolution
  2. Rewrote omni stats CLI: removed --by-type flag, added --project per-project analytics
  3. Deleted unused distillers and deprecated classifier/composer modules
  4. Updated hook logic with auto-sibling command detection for pipe mode

Detailed Breakdown

Core Pipeline Overhaul

  • Removed entire src/pipeline/classifier.rs legacy content classifier
  • Rewrote distiller system: removed content_type() from Distiller trait, replaced get_distiller() with command-based distill_with_command() in src/distillers/mod.rs
  • Deleted unused distillers: infra.rs, log.rs, tabular.rs
  • Updated all distiller tests to use command strings instead of ContentType, updated snapshot outputs for docker/kubectl/nginx workflows
  • Rewrote collapse.rs to use CollapseMode enum instead of ContentType for content-aware collapsing
  • Removed src/pipeline/composer.rs, moving rewind/learning logic directly into hook code

CLI & Stats Updates

  • src/cli/stats.rs: Removed --by-type mode, added --project flag for per-project stats, reworked default view to show top commands, updated JSON output to return command stats instead of content-type data
  • Replaced hardcoded $3/1M token cost calculation with config-driven pricing via new src/guard/config.rs
  • Renamed all Indonesian-named test functions in init.rs, session.rs, stats.rs to English
  • Deleted old truncate_commands() function and associated tests
  • Updated bench targets in benches/pipeline.rs from bench_classify to bench_registry_resolve testing scorer::score_with_command

Hook & Runtime Changes

  • Rewrote src/hooks/pipe.rs and src/hooks/post_tool.rs: removed classifier calls, added auto-sibling command detection for pipe mode, updated rewind/route logic and auto-learn triggers
  • Added src/guard/config.rs for loading user pricing/config settings
  • Updated src/main.rs to detect pipe commands via env vars, added background DB cleanup thread
  • Added new MCP omni_search tool in src/mcp/server.rs
  • Removed Intelligence Consistency check from src/cli/doctor.rs

Notes

  • Distiller snapshot outputs have been updated for docker, kubectl, and nginx workflows to match new command-based distillation logic

Breaking Changes

  1. Public API Break: Removed pipeline::classifier::classify, distillers::get_distiller(), and deprecated ContentType enum usage across core code
  2. CLI Break: Removed --by-type flag from omni stats; JSON output now returns commands instead of content_types
  3. Distiller Trait Break: Distiller trait no longer includes the content_type() method
  4. Hook Logic Break: Pipe mode now requires command context, and pipeline results no longer include ContentType fields

Last updated: 2026-04-12 04:30:58

@fajarhide fajarhide merged commit a46a64a into main Apr 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant