trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
18 lines • 1.06 kB
TypeScript
/**
* Ontology rollup evaluation — aggregates over graph links or join-entities.
*/
import type { EAVStore, Atom } from '../store/eav-store.js';
import type { PropertyValueSpecification, RollupConfig, SchemaDefinition } from '../ontology/types.js';
export interface RollupEvalContext {
store: EAVStore;
entityId: string;
schema?: SchemaDefinition;
getEntityType?: (entityId: string) => string | undefined;
}
/** Collect related entity ids for a rollup field. */
export declare function collectRollupRelatedIds(rollup: RollupConfig, ctx: RollupEvalContext): string[];
export declare function evaluateRollup(rollup: RollupConfig, ctx: RollupEvalContext): Atom;
/** Project ontology relation fields from graph links onto a binding row. */
export declare function projectRelationFields(binding: Record<string, Atom>, schema: SchemaDefinition, store: EAVStore, entityId: string): void;
export declare function findRollupField(schema: SchemaDefinition, name: string): PropertyValueSpecification | undefined;
//# sourceMappingURL=rollup.d.ts.map