/** * Context endpoints — inspecting, searching, traversing, and curating contexts. * * Contexts are the named `type:slug` anchors memories hang off. These functions * list/search them, read their relationships, pull related memories, and delete * them. Plain functions over a {@link ClientCore}; the `LocusGraphClient` facade * delegates to them. */ import type { ClientCore } from "../core"; import type { BatchGetContextResponse, ContextDetailsResponse, ContextGraphResponse, ContextListResponse, ContextRelationshipsResponse, ContextSearchOptions, ContextSearchResponse, ContextTypesResponse, ForgetContextOptions, ForgetContextResponse, GetContextDetailsOptions, GetContextGraphOptions, GetContextParams, GetContextRelationshipsOptions, GetContextResponse, GetFullContextGraphOptions, GetRelatedMemoriesOptions, GetRelatedMemoriesResponse, LinkContextsOptions, LinkContextsResponse, PaginationOptions, UnlinkContextsOptions, UnlinkContextsResponse } from "../types"; /** List all context types in a graph (GET /v1/contexts/{graph_id}). */ export declare function listContextTypes(core: ClientCore, graphId?: string, options?: PaginationOptions): Promise; /** List contexts by type (GET /v1/contexts/{graph_id}?type={contextType}). */ export declare function listContextsByType(core: ClientCore, contextType: string, graphId?: string, options?: PaginationOptions): Promise; /** Search contexts by name (GET /v1/contexts/{graph_id}?q={query}). */ export declare function searchContexts(core: ClientCore, query: string, graphId?: string, options?: ContextSearchOptions): Promise; /** Get context by exact name across all types (GET /v1/context/{graph_id}?context_name={name}). */ export declare function getContextByName(core: ClientCore, contextName: string, graphId?: string): Promise; /** * Get relationships for a context * (GET /v1/contexts/{graph_id}/{type}/{name}/relationships). Filter by linkType * (related_to / extends / reinforces / contradicts) and direction. */ export declare function getContextRelationships(core: ClientCore, options: GetContextRelationshipsOptions): Promise; /** * Get memories from related contexts in one call: traverse relationships, * collect context IDs, then semantic-search across them. */ export declare function getRelatedMemories(core: ClientCore, options: GetRelatedMemoriesOptions): Promise; /** * Get a single context by context_id (GET /v1/context/{graphId}?context_id={id}). * Throws if not found in the graph (404). */ export declare function getContext(core: ClientCore, params: GetContextParams): Promise; /** Batch get multiple contexts by context_id (POST /v1/context/{graph_id}/batch). */ export declare function batchGetContext(core: ClientCore, contextIds: string[], graphId?: string): Promise; /** * Get a context's metadata and stats by type and name * (GET /v1/contexts/{graph_id}/{context_type}/{context_name}). Throws if the * context doesn't exist in the graph (404). */ export declare function getContextDetails(core: ClientCore, options: GetContextDetailsOptions): Promise; /** * Get the relationship graph around one context * (GET /v1/contexts/{graph_id}/{type}/{name}/graph). Nodes are contexts, * edges are context-context links; `depth` bounds the traversal (1-3). */ export declare function getContextGraph(core: ClientCore, options: GetContextGraphOptions): Promise; /** * Get the whole graph's context network (GET /v1/contexts/{graph_id}/graph). * Filter with `min_refs` and `limit` to keep the map legible. */ export declare function getFullContextGraph(core: ClientCore, options?: GetFullContextGraphOptions): Promise; /** * Link two contexts (POST /v1/contexts/{graph_id}/link). Both contexts must * already exist in the graph; linkType is related_to / extends / reinforces / * contradicts. Requires write permission. */ export declare function linkContexts(core: ClientCore, options: LinkContextsOptions): Promise; /** * Remove one typed edge between two contexts * (DELETE /v1/contexts/{graph_id}/link). Succeeds with `removed: false` when * the edge was not there. Requires write permission. */ export declare function unlinkContexts(core: ClientCore, options: UnlinkContextsOptions): Promise; /** * Forget (delete) a context by type and name * (DELETE /v1/contexts/{graph_id}/{context_type}/{context_name}). Cascades to * its links and orphaned locuses. Requires write permission. */ export declare function forgetContext(core: ClientCore, options: ForgetContextOptions): Promise;