contextengine 0.1.2
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
FileStoragenot writing to disk whenenableBufferedWritesis false (flush was skipped by an inverted guard clause) - Fix
InsecureXorStorage.deleteMessagessilently passingDateTime.now()instead ofnull, changing "delete all" semantics to "delete up to now" - Fix
CostEstimator._findClosestPricingreturning wrong pricing for model variants (e.g.gpt-4o-mini-2024matchedgpt-4oinstead ofgpt-4o-mini); now prefers the longest prefix match - Fix
FileStorage._DbState.fromJsoncrashing on corrupted role fields; now falls back toRole.userviaorElse - Fix
LocalStorage.deleteMessagesinterface declaring non-nullableDateTime beforewhile implementations accept nullable; interface now declaresDateTime? before - Remove unused
enableBufferedWritesfield fromFileStorage - Remove
KNOW.mdfrom 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