GeoLeaf Core API - v3.0.0
    Preparing search index...

    Registry of declared GeoLeaf capabilities.

    Consumed by:

    • Module init() methods to register capabilities (via GeoLeaf.plugins.registerCapability)
    • GeoLeaf.Introspection facade to expose schemas to studio / form-builder
    • Future: ModuleRegistry to gate init order on capability activation
    interface ICapabilityRegistry {
        register(decl: ICapabilityDeclaration): void;
        isEnabled(
            id: string,
            config: { get(key: string, defaultValue?: unknown): unknown },
        ): boolean;
        isLoaded(id: string): boolean;
        ensureLoaded(id: string): Promise<void>;
        getSchema(id: string): ICapabilitySchema | null;
        getAllSchemas(): readonly ICapabilitySchema[];
        noteInstaller(id: string, facts: ICapabilityInstallFacts): void;
        getAllStatuses(
            config: { get(key: string, defaultValue?: unknown): unknown },
        ): readonly ICapabilityStatus[];
    }
    Index

    Methods

    • Returns true when the capability is enabled according to the profile config. Evaluates the gate synchronously — does not trigger loading.

      Parameters

      • id: string

        Capability id.

      • config: { get(key: string, defaultValue?: unknown): unknown }

        Config reader (same shape as IGeoLeafConfig).

      Returns boolean

    • Ensures the capability's loader has been called. No-op if already loaded or no loader was declared. Safe to call multiple times — calls the loader exactly once.

      Parameters

      • id: string

      Returns Promise<void>

    • Records the build-time facts of the installer that carries id.

      Called by preset Pass 1 (presets/apply-preset.ts) and by nothing else: a capability declared through the runtime channel has no installer, and that absence is embarked: false.

      Parameters

      • id: string

        Capability id — the one already passed to register().

      • facts: ICapabilityInstallFacts

        What the installer knows and the declaration does not.

      Returns void

    • Returns the activation status of every registered capability, in registration order.

      Parameters

      • config: { get(key: string, defaultValue?: unknown): unknown }

        Dotted-path config reader. GeoLeaf.Config is one.

      Returns readonly ICapabilityStatus[]