TypeScript type definitions for memory indexing, entries, and agent capabilities in an AI coding assistant. Reuse when managing persistent agent memory and state.
// Source: https://github.com/autohandai/code-cli | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
* @license
* Copyright 2025 Autohand AI LLC
* SPDX-License-Identifier: Apache-2.0
*/
export type MemoryLevel = 'project' | 'user';
export interface MemoryEntry {
id: string;
content: string;
createdAt: string;
updatedAt: string;
tags?: string[];
source?: string;
origin?: { sessionId: string };
}
export interface MemoryIndex {
version: number;
entries: MemoryIndexEntry[];
}
export interface MemoryIndexEntry {
id: string;
preview: string;
createdAt: string;
updatedAt: string;
tags?: string[];
}
export interface SimilarityMatch {
entry: MemoryEn
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key