MagicTelescopeIntegration class

Glues magic's Http / Model / Cache facades into the fluttersdk_telescope store.

Host integration (debug-only):

if (kDebugMode) {
  TelescopePlugin.install();
  MagicTelescopeIntegration.install();
}

Registers five units with TelescopePlugin:

  1. MagicHttpFacadeAdapter ; wraps Magic's network driver with a MagicNetworkInterceptor that feeds TelescopeStore.recordHttp (oracle's reuse-pattern decision kept inside magic).
  2. MagicModelWatcher ; subscribes to ModelCreated, ModelSaved, ModelDeleted and feeds TelescopeStore.recordMagicModel.
  3. MagicCacheWatcher ; placeholder; magic's Cache facade does not currently emit lifecycle events. V1.x will land cache events upstream in magic's Cache layer; this watcher's install is a no-op for now (kept registered so the V1.x event wiring is a one-file change).
  4. MagicEventWatcher ; subscribes to the curated set of magic auth / db / gate-definition events (alpha-2 scope) and feeds TelescopeStore.recordEvent with an empty payload. Per-event field extraction is deferred to a follow-up alpha.
  5. MagicGateWatcher ; subscribes to GateAccessChecked and feeds TelescopeStore.recordGate with the canonical gate result shape (single dynamic arguments wrapped into List<Object?>, user id stringified).

The five integration classes below are exposed for testing but are NOT re-exported from package:magic/magic.dart ; only MagicTelescopeIntegration.install is the documented public entry.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isInstalled bool
Whether install has been called at least once.
no setter

Static Methods

install() → void
Idempotent install. Safe to call multiple times within the same isolate lifetime.
resetForTesting() → void
Test-only reset. Drops the idempotency guard AND restores the three cross-package function pointers (pendingHttpCountReader, recentLogsReader, recentExceptionsReader) to their dusk-side missing-telescope defaults so downstream tests that assert "graceful-empty" behavior do not see leaked bindings from a prior install call. The contract on each pointer is set-once-per-isolate during install + reset-on-resetForTesting.