trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
28 lines • 1.73 kB
TypeScript
/**
* EAV Store Module (VCS-integrated)
*
* Persists CMS / knowledge-graph entities via vcs:storeAssert|Retract|Link|Unlink
* ops in the integration journal (.trellis/ops.json). See ADR 0008.
*/
import type { Atom } from '../core/store/eav-store.js';
import type { EntityRecord } from '../core/kernel/trellis-kernel.js';
import type { VcsOp } from './types.js';
import type { EngineContext } from './engine-context.js';
export interface StoreEntityCreateOptions {
links?: Array<{
attribute: string;
targetEntityId: string;
}>;
}
export declare function getEntity(ctx: EngineContext, entityId: string): EntityRecord | null;
export declare function listEntities(ctx: EngineContext, type?: string, filters?: Record<string, Atom>, opts?: {
includeVcs?: boolean;
}): EntityRecord[];
export declare function createEntity(ctx: EngineContext, entityId: string, type: string, attributes?: Record<string, Atom>, opts?: StoreEntityCreateOptions): Promise<VcsOp>;
export declare function updateEntity(ctx: EngineContext, entityId: string, updates: Record<string, Atom>): Promise<VcsOp>;
export declare function deleteEntity(ctx: EngineContext, entityId: string): Promise<VcsOp>;
export declare function addFact(ctx: EngineContext, entityId: string, attribute: string, value: Atom): Promise<VcsOp>;
export declare function removeFact(ctx: EngineContext, entityId: string, attribute: string, value: Atom): Promise<VcsOp>;
export declare function addLink(ctx: EngineContext, sourceId: string, attribute: string, targetId: string): Promise<VcsOp>;
export declare function removeLink(ctx: EngineContext, sourceId: string, attribute: string, targetId: string): Promise<VcsOp>;
//# sourceMappingURL=store.d.ts.map