@gati-framework/runtime
Version:
Gati runtime execution engine for running handler-based applications
101 lines • 3.33 kB
TypeScript
/**
* @module runtime/manifest-store
* @description Manifest Store with pluggable storage backend
*
* This implements Task 15 from the runtime architecture spec:
* - Manifest persistence (handlers and modules)
* - GType schema storage and retrieval
* - Version graph storage
* - Transformer stub storage
* - Timescape metadata persistence
* - Pluggable storage contract (Task 21 Phase 3)
*
* Requirements: 11.5
*/
import type { ManifestStore, HandlerManifest, HookManifest, GType, Transformer, VersionGraph, TimescapeMetadata } from './types/manifest-store.js';
import type { StorageContract } from './types/storage-contract.js';
/**
* Manifest Store implementation with pluggable storage backend
*
* Delegates all storage operations to a StorageContract implementation.
* Defaults to in-memory storage if no storage backend is provided.
*/
export declare class InMemoryManifestStore implements ManifestStore {
private storage;
constructor(storage?: StorageContract);
/**
* Store a handler or module manifest
*/
storeManifest(manifest: HandlerManifest): Promise<void>;
/**
* Retrieve a manifest by ID and optional version
*/
getManifest(id: string, version?: string): Promise<HandlerManifest | undefined>;
/**
* Get all versions of a manifest
*/
getAllManifestVersions(id: string): Promise<HandlerManifest[]>;
/**
* Store a GType schema
*/
storeGType(gtype: GType): Promise<void>;
/**
* Retrieve a GType schema by reference
*/
getGType(ref: string): Promise<GType | undefined>;
/**
* Store a transformer stub
*/
storeTransformer(transformer: Transformer): Promise<void>;
/**
* Retrieve a transformer by ID
*/
getTransformer(id: string): Promise<Transformer | undefined>;
/**
* Get transformers for a version pair
*/
getTransformersForVersions(handlerId: string, fromVersion: string, toVersion: string): Promise<Transformer[]>;
/**
* Store or update a version graph
*/
storeVersionGraph(graph: VersionGraph): Promise<void>;
/**
* Retrieve a version graph for a handler
*/
getVersionGraph(handlerId: string): Promise<VersionGraph | undefined>;
/**
* Store Timescape metadata
*/
storeTimescapeMetadata(metadata: TimescapeMetadata): Promise<void>;
/**
* Retrieve Timescape metadata
*/
getTimescapeMetadata(handlerId: string, version: string): Promise<TimescapeMetadata | undefined>;
/**
* Store a hook manifest
*/
storeHookManifest(manifest: HookManifest): Promise<void>;
/**
* Retrieve a hook manifest by handler ID
*/
getHookManifest(handlerId: string): Promise<HookManifest | null>;
/**
* List all hook manifests
*/
listHookManifests(): Promise<HookManifest[]>;
/**
* Clear all stored data (for testing)
*/
clear(): Promise<void>;
/**
* Get store statistics
*/
getStats(): import("./types/storage-contract.js").StorageStats;
}
/**
* Create a new manifest store with optional storage backend
*
* @param storage - Optional storage backend (defaults to in-memory)
*/
export declare function createManifestStore(storage?: StorageContract): ManifestStore;
//# sourceMappingURL=manifest-store.d.ts.map