titan_colossus 2.0.8
titan_colossus: ^2.0.8 copied to clipboard
Enterprise performance monitoring, AI testing, and MCP integration for Titan. Scry observation, Relay bridge, Blueprint generation, 48 MCP tools, and Lens debug overlay.
Changelog #
2.0.8 - 2026-03-17 #
Added #
Sentinel — Silent HTTP Interception
- Sentinel —
HttpOverrides-based HTTP interception that captures alldart:ioHTTP traffic (works withpackage:http, Dio, Envoy, rawHttpClient). Like Charles Proxy, built into the app. Install withColossus.init(enableSentinel: true). - SentinelRecord — Immutable HTTP transaction record with method, URL, headers, request/response bodies, timing, status code, and outcome. Supports
toMetricJson()(compact) andtoDetailJson()(full) serialization. - SentinelConfig — Configuration for URL filtering (
excludePatterns,includePatterns), body capture limits (maxBodyCapture,captureRequestBody,captureResponseBody), header capture, and record retention (maxRecords). - Sentinel.install() / uninstall() — One-call install/teardown. Chains previous
HttpOverridesby default for compatibility. - Sentinel.createClient() — Factory for creating intercepted
HttpClientinstances directly, bypassing zone-scoped overrides (useful in Flutter test environments). - chainPreviousOverrides — Parameter to skip chaining previous
HttpOverridesin test environments where mock overrides block network access. - Colossus integration — Sentinel records auto-feed into
trackApiMetric(), Tremor evaluation, Relay endpoints, and Lens overlay. - Relay endpoints —
GET /sentinel/recordsandDELETE /sentinel/recordsfor querying/clearing HTTP records from MCP servers.
DevToolsBridge — Flutter DevTools Integration
- DevToolsBridge — Connects Colossus to Flutter DevTools via three integration layers. Installed automatically by
Colossus.init(enableDevTools: true)(default in debug mode). - Service extensions — 8 queryable
ext.colossus.*endpoints:getPerformance,getApiMetrics,getSentinelRecords,getTerrain,getMemorySnapshot,getAlerts,getFrameworkErrors,getEvents(with optional source filter). - Timeline annotations —
timelinePageLoad(),timelineTremor(),timelineApiCall()feed named spans into the DevTools Performance timeline for correlation with frame timing. - Event streaming —
postTremorAlert(),postApiMetric(),postRouteChange(),postFrameworkError()push real-time events viadart:developerpostEventfor live dashboards without polling. - Structured logging —
DevToolsBridge.log()writes to the standard DevTools Logging tab (visible without custom extensions).
Performance #
- Sentinel overhead — SentinelRecord creation: 0.34 µs/record. URL filtering: 0.08 µs/url. Body buffering (30B): 0.18 µs. Install/uninstall: 0.01 µs/cycle. All sub-microsecond on hot path.
- DevToolsBridge overhead — Timeline annotation: 0.86 µs/call. Event posting: 0.64 µs/call. Logging: 0.19 µs/call.
2.0.7 - 2026-03-17 #
Added #
- WidgetTester text injection —
StratagemRunnernow accepts an optionalWidgetTesterparameter. When provided,enterTextandclearTextactions usetester.enterText()fromflutter_testinstead of manual controller lookup. Falls back to 3-strategy injection if noEditableTextfound at target position. - Colossus tester passthrough —
executeStratagem(),executeStratagemFile(),executeCampaign(), andexecuteCampaignJson()accept optionalWidgetTester? testerfor widget test contexts. - StrikeAt text input — New
strikeText(),strikeTextByKey(), andstrikeClearText()methods on theStrikeAtextension for text input in widget tests.
2.0.6 - 2026-03-17 #
Fixed #
- Keypad Detection —
validLabelin Scry now allows single-character labels for interactive widgets (digits, operators)._extractLabelfalls back to Semantics label for icon-only interactive widgets._extractGlyphnulls out icon-text labels on interactive widgets to prevent duplicate labeling. - Tremor Log Flooding — Added 30-second cooldown to
Tremor.evaluate(). Recurring tremors (e.g.jankRate,fps) now fire once per cooldown window instead of on every frame batch (~60/sec). Cooldown is configurable via thecooldownparameter on all factory constructors and MCPaddTremor.
Changed #
- maxGlyphs — Increased from 200 to 300 to accommodate denser screens (e.g. keypads with 16+ buttons).
2.0.5 - 2026-03-17 #
Fixed #
- Stale Tableau —
getAiContext()now passes the current route toTableauCapture.capture(), fixing stale screen data when navigated away from root. - StrikeAt FakeAsync — Replaced
Future.delayedwithpump(duration)to avoid test hangs in FakeAsync zones. Added monotonictimeStampon swipe/drag PointerEvents for VelocityTracker. AddedpumpAndSettle()for double-tap. - StratagemRunner timestamps — Added
_elapsedDuration field for monotonically increasing timestamps during stratagem execution. - flutter_test dependency — Moved
flutter_testfromdev_dependenciestodependenciessincestrike_at.dartis inlib/.
Added #
- StrikeAt export —
strike_at.dartis now exported from the package barrel file.
Performance #
- Scry observation pipeline — Merged overlay scan + maxDepth into Pass 1 (−2 glyph iterations). Merged 5 scoring sub-passes into 1 combined
_applyAllScoringpass (−4 element iterations). Added_Glyphpre-extraction class to eliminate repeated map lookups/casts across 7+ passes. Converted_overlayTypesfrom List to Set for O(1) lookup. Eliminatedancestors.join(' ')in_groupElementsand_detectAlerts. Result: Scry Small −25%, Form −21%, Medium/Large/DataRich −11%.
2.0.4 - 2026-03-16 #
Fixed #
- Fresco Screenshot on Inner Pages — Screenshots captured via Relay on navigated (non-root) pages returned blank white images (375 bytes). Root cause:
RenderRepaintBoundary.toImage()produced stale composited layers after route changes. Fixed by capturing directly fromRenderView.layer(the fully composited screen output) and pumping a frame viaendOfFramebefore capture. Screenshots now work on all pages regardless ofRepaintBoundarypresence.
2.0.3 - 2026-03-14 #
Fixed #
- GestureDetector Visibility —
GestureDetectorandInkWellwrapping non-text children (Container, Image, custom widgets) were invisible to Scry because label-less Glyphs were filtered out in the observation pipeline. TableauCapture now synthesizes labels from the widget Key (preferred) or screen coordinates (fallback), ensuring all interactive widgets are discoverable. - GestureDetector Enabled State —
_getEnabledStatenow checksonTap,onLongPress, andonDoubleTapforGestureDetector, andonTapforInkWell. Previously both always reportedisEnabled: trueregardless of whether callbacks were set.
Recommendation #
Add a Key to GestureDetector and InkWell widgets that wrap non-text children for stable Scry targeting:
GestureDetector(
key: const ValueKey('profile-avatar'),
onTap: () => navigateToProfile(),
child: CircleAvatar(backgroundImage: userImage),
)
2.0.2 - 2026-03-12 #
Fixed #
- DI Inspection — Compute lazy types from public API (
registeredTypes.difference(instances)) instead of unpublishedTitan.lazyTypesgetter. Fixes static analysis error that caused 0/50 pana score. - Relay WASM Compatibility — Changed conditional import from
dart.library.htmltodart.library.js_interopfor web platform selection.
2.0.1 - 2025-06-15 #
Changed #
- Updated
titan_envoyconstraint to^1.1.0(transport abstraction layer)
2.0.0 - 2026-03-09 #
Added #
Scry — Real-Time AI Agent Interface (18 Intelligence Capabilities)
- Scry — AI agent loop: observe screen → decide → act → observe result. Returns structured
ScryGazewith all visible elements, screen type classification, form status, and spatial analysis. - ScryGaze — Observation result with
ScryElementlist,ScryScreenType, alerts, and landmarks. - ScryElement — Screen element with kind, label, value, semantics, position, and reachability metadata.
- ScryDiff — Compare screen states: appeared/disappeared/changed elements, route changes, overlay changes.
- 18 intelligence capabilities: spatial layout, reachability, scroll inventory, overlay detection, toggle states, tab order, target stability scoring, multiplicity, ancestor context, form validation, element grouping, landmarks, visual prominence, value type inference, action impact prediction, layout pattern detection.
- 16 action types:
tap,enterText,clearText,scroll,back,longPress,doubleTap,swipe,navigate,waitForElement,waitForElementGone,pressKey,submitField,toggleSwitch,toggleCheckbox,selectDropdown. - Multi-action support —
scry_actaccepts anactionsarray for batched execution. - Drag action —
scry_actsupportsdragwithvalue="x,y"coordinate format. - Screen type classification —
ScryScreenTypeenum: login, form, list, detail, settings, empty, error, dashboard, unknown. - Alert detection —
ScryAlertwithScryAlertSeverityfor framework error and performance issue highlighting.
Relay — Cross-Platform HTTP Bridge
- Relay — Platform-agnostic HTTP bridge connecting MCP server to running Flutter app.
- Native (Android, iOS, macOS, Windows, Linux): HTTP server on port 8642
- Web (Chrome, Firefox, Edge): WebSocket client connecting to MCP server's
/relayendpoint (reversed connection)
- RelayConfig — Configuration with host, port, authToken, targetUrl.
- RelayHandler — 36 route handlers for all MCP tools.
- RelayStatus — Health reporting with uptime and platform info.
- Graceful port-in-use handling — WebSocket relay silently falls back on busy ports.
MCP Server — 48 Tools, 5 Transports
- Blueprint MCP Server — Full Model Context Protocol server with 48 tools across 11 categories.
- 5 Transport protocols: stdio, HTTP+SSE, WebSocket, Streamable HTTP (MCP 2025-03-26), auto-detect (all-in-one).
- TLS/SSL support —
--tls-certand--tls-keyfor encrypted connections across all HTTP transports. - Bearer token authentication —
--auth-token(repeatable) for secure access. Health endpoint remains public. - API key rotation —
--auth-tokens-filewith hot-reload: file changes detected automatically, zero-downtime key rotation without server restart. - McpWebSocketClient — Dart client with auto-reconnect, exponential backoff (±25% jitter), heartbeat/pong, message queuing, and
McpConnectionStatusstream. - Screenshot vision —
capture_screenshotsaves PNG to.titan/screenshots/and returns MCP image content for AI visual analysis. - toggle_lens — Show/hide Lens FAB during MCP sessions.
New MCP Tools (17 tools added since 1.3.0)
get_api_metrics— API metrics with latency percentiles (p50/p95/p99), success rate, endpoint groupingget_api_errors— Failed API requests for quick error triageget_tremors— Current Tremor alert thresholdsadd_tremor— Add Tremor alerts at runtime (8 types: fps, jankRate, pageLoad, memory, rebuilds, leaks, apiLatency, apiErrorRate)remove_tremor— Remove Tremor by namereset_tremors— Reset all Tremor fired statesget_widget_tree— Widget tree statistics (element count, max depth, top 20 types)get_events— Integration events from Colossus bridges (atlas, basalt, argus, bastion)get_route_history— Navigation route history in chronological orderreplay_session— Replay saved Shade sessions via Phantomcapture_screenshot— Screenshot with disk save + inline image contentaudit_accessibility— Accessibility audit (labels, touch targets, semantic roles)inspect_di— Titan DI container (Vault) inspectioninspect_envoy— Envoy HTTP client configuration and courier chainconfigure_envoy— Runtime Envoy configuration (base URL, timeouts, headers, couriers)reload_page— Re-navigate current route or full widget tree rebuildtoggle_lens— Show/hide Lens debug FAB
Cross-Package Integration Bridges
- ColossusEnvoy — Auto-wires Envoy
MetricsCouriermetrics to Colossus for API tracking. - ColossusBasalt — Bridge for Basalt infrastructure events (circuit trips, saga steps, etc.).
- ColossusBastion — Bridge for Bastion widget lifecycle events.
- ColossusAtlasObserver — Bridge for Atlas navigation events and page load timing.
- ColossusArgus — Bridge for Argus authentication state changes.
Colossus.trackEvent()— Unified event ingestion from all bridges.
Lens Integration Tabs
- BridgeLensTab — Cross-package event visualization with source filtering.
- EnvoyLensTab — HTTP traffic visualization (requests, latency, errors, courier chain).
- ArgusLensTab — Auth session tracking (sign-in/sign-out events, token refreshes).
Error Detection
- FrameworkError — Captures
FlutterError.onErrorandErrorWidgetinstances for overflow, build, layout, paint, and gesture errors. get_framework_errorsMCP tool for error reporting.
Performance Monitoring Enhancements
- API Tremors —
apiLatencyandapiErrorRateTremor types for HTTP monitoring. - MarkCategory.api — New metric category for API-related marks.
- Richer API reporting — Latency percentiles, endpoint auto-grouping (numeric IDs and UUIDs normalized).
Changed #
- FAB hidden during recording — Lens FAB auto-hides when Shade recording is active.
- Tooltip → Semantics — Lens FAB uses
Semanticswidget instead ofTooltipto avoid "No Overlay" crash (Lens wraps aboveMaterialApp). - Lens.relayConnected —
ValueNotifier<bool>for reactive FAB visibility control via MCP. - Updated dependencies —
titan_atlas: ^1.1.1,titan_argus: ^1.0.4.
Fixed #
- Web relay query params — WebSocket relay now parses path with
Uri.tryParse()to strip query params before route matching. - Scry proximity pairs — Reject distant horizontal proximity pairs.
- Interactive multiplicity — Suppress duplicate interactive element detection.
- NavigationBar targeting — Classify
NavigationDestinationas interactive for correct tap targeting. - Semantics label discovery —
widget.properties.labelfor Lens FAB detection in Scry glyph scanner.
1.3.0 - 2026-03-06 #
Added #
AI Blueprint Generation — Six-Phase Discovery & Testing Engine
- Scout — Passive session analyzer that builds a flow graph (Terrain) from recorded Shade sessions. Discovers screens, transitions, and interactive elements automatically.
- Terrain — Flow graph model storing discovered routes (Outposts), transitions (Marches), and structural metadata (dead ends, unreliable transitions, auth-protected screens). Exports to Mermaid diagrams and AI-ready maps.
- Outpost — Discovered screen node with route pattern, interactive elements, display elements, and dimensional info.
- March — Discovered transition edge with source/destination routes, trigger type, trigger element, timing, and reliability score.
- Lineage — Prerequisite chain resolver that computes the navigation steps required to reach any screen from the app's entry point. Outputs AI-consumable setup instructions.
- Gauntlet — Edge-case test generator that produces targeted Stratagems for specific screens based on their interactive elements (taps, long-presses, text inputs, scrolls, boundary values).
- Stratagem — Executable test step specification with route, action, expected outcomes, and metadata. Serializable to/from JSON for AI consumption. Includes
StratagemRunnerfor headless execution. - Campaign — Multi-route test orchestrator that sequences Stratagems across flows, managing setup, execution, and teardown. Supports JSON campaign definitions.
- Verdict — Per-Stratagem execution result with pass/fail, timing, error details, and captured Tableau snapshots. Rich equality and serialization.
- Debrief — Verdict analyzer that produces structured reports with pass/fail ratios, failure categorization, fix suggestions, and AI-ready summaries.
- RouteParameterizer — Normalizes dynamic route segments (e.g.,
/user/42→/user/:id) for consistent terrain mapping. - Signet — Screen identity fingerprint using interactive element hashing for change detection across sessions.
AI-Bridge Export — Bringing Blueprint Data to IDE-Time AI Assistants
- BlueprintExport — Structured container for exporting
Terrain,Stratagems,Verdicts, andDebriefresults to disk. Factory constructorsfromScout()(live app) andfromSessions()(offline analysis). Serializes to JSON viatoJson()/toJsonString()and generates AI-ready Markdown prompts viatoAiPrompt(). - BlueprintExportIO — File I/O utilities:
save()writesblueprint.json,savePrompt()writesblueprint-prompt.md,saveAll()writes both.loadTerrain()andloadSessions()for offline consumption. Auto-creates directories. - Export CLI (
bin/export_blueprint.dart) — Command-line tool for offline Blueprint export from saved Shade sessions. Flags:--sessions-dir,--output-dir,--patterns(comma-separated route patterns),--intensity(quick/standard/thorough),--prompt-only,--help. - Blueprint MCP Server (
bin/blueprint_mcp_server.dart) — Model Context Protocol server exposing Blueprint data to AI assistants (Copilot, Claude) over stdio. Tools:get_terrain(json/mermaid/ai_map),get_stratagems,get_ai_prompt,get_dead_ends,get_unreliable_routes,get_route_patterns. File-level caching with automatic invalidation. blueprintExportDirectoryon ColossusPlugin — Set a directory path (e.g.,'.titan') and the plugin auto-exportsblueprint.json+blueprint-prompt.mdon app shutdown viaonDetach(). Fire-and-forget for zero-friction developer experience.
Blueprint Lens Tab — Interactive Debug Overlay
- BlueprintLensTab — Lens plugin with five interactive sub-tabs:
- Terrain — Live flow graph metrics (screens, transitions, sessions, dead ends, unreliable transitions) with reactive auto-refresh
- Lineage — Route selector and prerequisite chain viewer with copy-to-clipboard actions
- Gauntlet — Edge-case generator with intensity selector, stratagem cards, and pattern count display
- Campaign — JSON campaign builder with execute/copy actions and result display
- Debrief — Verdict analysis with insights, fix suggestions, and AI summary export
Zero-Code Auto-Integration
autoLearnSessions— Whentrue(default), completed Shade recordings are automatically fed to Scout. No manuallearnFromSession()wiring needed.terrainNotifier—ChangeNotifierthat fires after everylearnFromSession()call. Blueprint Lens Tab subscribes automatically for live-updating metrics.autoAtlasIntegration— Whentrue(default), ColossusPlugin automatically:- Registers
ColossusAtlasObserverfor page-load timing viaAtlas.addObserver() - Pre-seeds
RouteParameterizerwith declared Atlas route patterns viaAtlas.registeredPatterns - Auto-wires
Shade.getCurrentRouteviaAtlas.current.path(only if not user-provided) - Gracefully degrades if Atlas is not present or not initialized
- Registers
enableTableauCapture— Defaults totruein ColossusPlugin (vsfalseinColossus.init()for backward compatibility). Required for Scout discovery.
Changed #
- ColossusPlugin — Three new configuration parameters:
enableTableauCapture,autoLearnSessions,autoAtlasIntegration. All default totruefor zero-configuration setup. - Colossus.init() — New
autoLearnSessionsparameter (default:true). Colossus now owns the Shade → Scout → Terrain pipeline internally.
1.2.0 - 2026-03-05 #
Fixed #
- Shade session persistence — Recorded sessions now survive Lens hide/show cycles. Session is stored on
Colossusinstance instead of disposed Pillar.
Added #
- Auto-show Lens after FAB stop — Lens overlay automatically opens when stopping a recording via the floating action button.
- Draggable FAB — Lens floating button can be dragged to any position. Position persists across hide/show. Added
Lens.resetFabPosition()to restore defaults.
Changed #
- Plugin tabs first — Plugin tabs (Shade) now appear before built-in tabs (Pillars, Herald, Vigil, Chronicle) in the Lens panel.
1.1.0 - 2026-03-04 #
Added #
- ColossusPlugin — One-line
TitanPluginadapter for full Colossus integration. Add or remove performance monitoring with a single line inBeacon(plugins: [...])- Manages
Colossus.init(),Lensoverlay,ShadeListener, export/route callbacks, auto-replay, andColossus.shutdown()automatically
- Manages
1.0.4 - 2026-03-04 #
Changed #
- Assert → Runtime Errors:
PhantomspeedMultiplier validation andColossus.instanceguard changed from debug-onlyassertto runtime errors (ArgumentError/StateError)
1.0.2 - 2026-03-03 #
1.0.1 - 2026-03-02 #
- Lens —
Lens,LensPlugin, andLensLogSinkmoved here fromtitan_bastion. Import frompackage:titan_colossus/titan_colossus.dart.
1.0.0 #
- Initial release
- Colossus — Enterprise performance monitoring Pillar
- Pulse — Frame metrics (FPS, jank detection, build/raster timing)
- Stride — Page load timing with Atlas integration
- Vessel — Memory monitoring and leak detection
- Echo — Widget rebuild tracking
- Tremor — Configurable performance alerts via Herald
- Decree — Performance report generation
- Lens integration — Plugin tab for the Lens debug overlay
- ColossusAtlasObserver — Automatic route timing via Atlas