contextengine 0.1.2 copy "contextengine: ^0.1.2" to clipboard
contextengine: ^0.1.2 copied to clipboard

Provider-agnostic AI orchestration, memory, and context-optimization layer for Flutter apps.

Changelog #

0.1.2 #

Add repository field to pubspec.yaml.

0.1.1 #

Bug fixes and hardening before first public publish:

  • Fix FileStorage not writing to disk when enableBufferedWrites is false (flush was skipped by an inverted guard clause)
  • Fix InsecureXorStorage.deleteMessages silently passing DateTime.now() instead of null, changing "delete all" semantics to "delete up to now"
  • Fix CostEstimator._findClosestPricing returning wrong pricing for model variants (e.g. gpt-4o-mini-2024 matched gpt-4o instead of gpt-4o-mini); now prefers the longest prefix match
  • Fix FileStorage._DbState.fromJson crashing on corrupted role fields; now falls back to Role.user via orElse
  • Fix LocalStorage.deleteMessages interface declaring non-nullable DateTime before while implementations accept nullable; interface now declares DateTime? before
  • Remove unused enableBufferedWrites field from FileStorage
  • Remove KNOW.md from package
  • Fix 6 analyzer warnings in test files (unused imports, unused variables, single-quote consistency)

0.1.0 #

Initial pre-release. Core pipeline, memory, and orchestration layer is functional. Not yet recommended for production use without reviewing the reference/stub status of individual modules.

Real (production-usable) #

  • Context pipeline: sliding window (token-counted), relevance gate, budget allocator (priority-ordered trimming), summarizer with truncation fallback
  • Memory engine: fact storage, conflict resolution (supersede, confidence-weighted, callback), versioning, importance scoring
  • Graph adapter: entity indexing, keyword-scored retrieval
  • Sync manager: offline queue, idempotent writes, partial failure handling, conflict resolution
  • Observability: 10 callback hooks at every pipeline stage
  • Privacy: regex-based field redaction (email, phone, SSN)
  • FileStorage: file-backed persistent storage (survives app restarts)
  • OpenAIProvider: real LLM adapter using dart:io HttpClient
  • Tool calling: schema translation for OpenAI/Anthropic/Gemini formats
  • JSON output: repair-retry for malformed JSON
  • Cost estimation: per-provider pricing tables
  • Multimodal: content blocks with capability gating
  • Concurrency guard: prevents overlapping sendMessage calls
  • Performance: parallel token counting, token count cache, parallel memory retrieval, entity index fast path

Reference / stub (not production-ready) #

  • InsecureXorStorage: XOR "encryption" — NOT secure, demonstrates the hook only. Use platform secure storage with AES-GCM in production.
  • InMemoryVectorStore: bag-of-words hash embedding. Lexical, not semantic. Wire to a real embedding API for semantic recall.
  • FactExtractor regex mode: catches 4 fixed sentence shapes. Enable LLM mode (enableLlmExtraction: true) for real conversational accuracy.
  • Token counting: chars/4 estimation. Real adapters need tiktoken or provider-specific counting endpoints.

Not yet built #

  • Gemini, Claude, Ollama provider adapters
  • Isar, Hive, Drift storage adapters
  • Real AES-GCM encryption adapter
  • Isolate usage for heavy compute
  • CI pipeline
0
likes
160
points
148
downloads

Documentation

API reference

Publisher

verified publisherrahulsha.com.np

Weekly Downloads

Provider-agnostic AI orchestration, memory, and context-optimization layer for Flutter apps.

Repository (GitHub)
View/report issues

Topics

#ai #llm #context #memory #flutter

License

MIT (license)

Dependencies

meta

More

Packages that depend on contextengine