Commit Graph

2 Commits

Author SHA1 Message Date
aditya 37b6d27d0b feat(acms): implement builtin/context skill for CRP
Wire the three CRP tool handlers in context_ops.py to the ACMS pipeline
and ContextTierService, replacing NotImplementedError stubs with
functional implementations:

- request_context: Sources fragments from ContextTierService, filters
  by query/focus keywords, and delegates to ACMSPipeline.assemble()
  for budget-constrained context assembly. Accepts optional plan_id
  for actor-context invocation.

- query_history: Searches across hot/warm/cold tiers for fragments
  matching the query string via case-insensitive substring matching.
  Returns results sorted by last-accessed timestamp.

- get_context_budget: Returns current token budget state (max, reserved,
  available, used) computed from ContextBudget defaults and hot-tier
  fragment token counts.

Additionally:
- Register ACMSPipeline as a Singleton in the DI container
- Create build_context_skill_definition() factory for SkillRegistry
  auto-registration of the builtin/context skill
- Replace 3 obsolete NotImplementedError test scenarios with 8 new
  functional BDD scenarios covering all handler paths

Lint, typecheck, and coverage (98%) all pass.

ISSUES CLOSED: #873
2026-03-26 07:52:09 +00:00
freemo d3b182e10e feat(acms): add context request protocol models
Add CRP domain models for the Advanced Context Management System:
- ContextRequest: Focus-driven context retrieval with breadth, depth,
  strategy, temporal_scope, and skeleton_ratio parameters
- ContextFragment: Retrieved context with UKO URI, provenance,
  relevance score, token count, and detail level metadata
- ContextBudget: Token budget management with reservation support
- DetailLevel: Five-tier enum (skeleton through full)
- DetailLevelMap: Name-to-integer resolution registry with inheritance

Add builtin/context skill with stubbed tools (request_context,
query_history, get_context_budget) wired to future ACMS pipeline.

ISSUES CLOSED: #190
2026-03-02 14:32:31 +00:00