Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ function main() {
}

main();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions scripts/migrate-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ function migrateDirectory(dir) {
}

migrateDirectory("tests");
// AUDIT_MARKER
1 change: 1 addition & 0 deletions scripts/migrate-v1-to-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,4 @@ migrate(storagePath)
console.error("Migration failed:", error);
process.exit(1);
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,3 +748,4 @@ export function isConfigured(): boolean {
// The system should check specific sub-configurations when features are invoked.
return true;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,3 +632,4 @@ function formatMemoriesForCompaction(memories: any[]): string {

return output;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export const id =
typeof pkg.name === "string" && pkg.name.trim() ? pkg.name.trim() : "opencode-mem0";
export { OpenCodeMemPlugin };
export default { id, server: OpenCodeMemPlugin } satisfies PluginModule;
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/ai-provider-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export class AIProviderFactory {
return aiSessionManager.cleanupExpiredSessions();
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/opencode-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,4 @@ export async function generateStructuredOutput<T>(options: {
});
return result.output as T;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/provider-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ export function buildMemoryProviderConfig(
iterationTimeout: overrides.iterationTimeout ?? config.autoCaptureIterationTimeout,
};
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/providers/anthropic-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,4 @@ export class AnthropicMessagesProvider extends BaseAIProvider {
return null;
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/providers/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ export abstract class BaseAIProvider {

abstract supportsSession(): boolean;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/providers/google-gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,4 @@ export class GoogleGeminiProvider extends BaseAIProvider {
return { success: false, error: `Max iterations (${maxIterations}) reached`, iterations };
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/providers/openai-chat-completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,4 @@ export class OpenAIChatCompletionProvider extends BaseAIProvider {
};
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/providers/openai-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,4 @@ export class OpenAIResponsesProvider extends BaseAIProvider {
return data;
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/session/ai-session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
private readonly sessionRetentionMs: number;

constructor() {
this.dbPath = join(CONFIG.storagePath, AI_SESSIONS_DB_NAME);

Check failure on line 24 in src/services/ai/session/ai-session-manager.ts

View workflow job for this annotation

GitHub Actions / check

TypeError: undefined is not an object (evaluating 'CONFIG.storagePath')

at new AISessionManager (/home/runner/work/opencode-mem0/opencode-mem0/src/services/ai/session/ai-session-manager.ts:24:24) at /home/runner/work/opencode-mem0/opencode-mem0/src/services/ai/session/ai-session-manager.ts:225:33 at requestImportModule (2:1)
const dir = dirname(this.dbPath);
if (!existsSync(dir)) {
mkdirSync(dir, { recursive: true });
Expand Down Expand Up @@ -223,3 +223,4 @@
}

export const aiSessionManager = new AISessionManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/session/session-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ export interface SessionUpdateParams {
conversationId?: string;
metadata?: Record<string, any>;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/tools/tool-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ export class ToolSchemaConverter {
};
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/ai/validators/user-profile-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,4 @@ export class UserProfileValidator {
return errors;
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/api-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,3 +1171,4 @@ export async function handleConflictStats(): Promise<
return { success: false, error: "Internal error" };
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/auto-capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,4 @@ Analyze this conversation. If it contains technical work (code, bugs, features,
tags: (result.data.tags || []).map((t: string) => t.toLowerCase().trim()),
};
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/cleanup-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ export class CleanupService {
}

export const cleanupService = new CleanupService();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,4 @@ export class LocalMemoryClient {
}

export const memoryClient = new LocalMemoryClient();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ export function formatContextForPrompt(

return parts.join("\n");
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/deduplication-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ export class DeduplicationService {
}

export const deduplicationService = new DeduplicationService();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/embedding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ export class EmbeddingService {
}

export const embeddingService = EmbeddingService.getInstance();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/jsonc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ export function stripJsoncComments(content: string): string {
// Remove trailing commas before } or ]
return result.replace(/,\s*([}\]])/g, "$1");
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/language-detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ export function getLanguageName(code: string): string {
}
return lang?.name || "English";
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ export function log(message: string, data?: unknown) {
: `[${timestamp}] ${message}\n`;
appendFileSync(logFile, line);
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/memory-conflicts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,3 +647,4 @@ export function getAllUnresolvedConflicts(

return allConflicts.sort((a, b) => b.detectedAt - a.detectedAt).slice(0, limit);
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/memory-lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,4 @@ export async function runLifecycleMaintenance(): Promise<void> {
log("Lifecycle maintenance error", { error: String(error) });
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/memory-scoring-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,4 @@ export async function runOneTimeScoringRecalculation(): Promise<{
}> {
return recalculateAllScores(true);
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/memory-scoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,4 @@ export function recordAccess(currentAccessCount: number): {
lastAccessed: Date.now(),
};
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/migration-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,4 @@ export class MigrationService {
}

export const migrationService = new MigrationService();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/platform-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ export function serve(options: ServeOptions): Promise<PlatformServer> {

return createNodeServer(options);
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/privacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export function isFullyPrivate(content: string): boolean {
const stripped = stripPrivateContent(content).trim();
return stripped === "[REDACTED]" || stripped === "";
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/retrieval-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ export function calculateDiversityPenalty(

return 0;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/secret-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ export function resolveSecretValue(value: string | undefined): string | undefine

return value;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/connection-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ export class ConnectionManager {
}

export const connectionManager = new ConnectionManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/shard-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,4 @@ export class ShardManager {
}

export const shardManager = new ShardManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/sqlite-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ export function getDatabase(): new (path: string) => Database {
}
return DatabaseImpl;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/transcript-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,4 @@ export class TranscriptManager {
}

export const transcriptManager = new TranscriptManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ export interface SearchResult {
contextBoost?: number;
finalScore?: number;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/sqlite/vector-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,3 +664,4 @@ export class VectorSearch {
}

export const vectorSearch = new VectorSearch();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ export function getTags(directory: string): {
project: getProjectTagInfo(directory),
};
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/transcript-capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ export async function cleanupOldTranscripts(): Promise<number> {

return transcriptManager.deleteOldTranscripts(cutoffTime);
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-memory-learning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,4 @@ Use the update_user_profile tool to save the ${existingProfile ? "updated" : "ne

return rawData as UserProfileData;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-profile/profile-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ export function getUserProfileContext(userId: string): string | null {

return parts.join("\n");
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-profile/profile-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ export const safeObject = <T extends object>(obj: any, fallback: T): T => {
}
return result && typeof result === "object" && !Array.isArray(result) ? (result as T) : fallback;
};
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-profile/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export interface UserProfileChangelog {
profileDataSnapshot: string;
createdAt: number;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-profile/user-profile-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,4 @@ export class UserProfileManager {
}

export const userProfileManager = new UserProfileManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/user-prompt/user-prompt-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,4 @@ export class UserPromptManager {
}

export const userPromptManager = new UserPromptManager();
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/vector-backends/backend-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,4 @@ export async function createVectorBackend(
return exactScanBackend;
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/vector-backends/exact-scan-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,4 @@ export class ExactScanBackend implements VectorBackend {
return dot / (Math.sqrt(magA) * Math.sqrt(magB));
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/vector-backends/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ export interface VectorBackendFactoryOptions {
probeUSearch?: () => Promise<boolean>;
createUSearchBackend?: () => VectorBackend;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/vector-backends/usearch-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,4 @@ export class USearchBackend implements VectorBackend {
}
}
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/web-server-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,4 @@ self.onmessage = async (event: MessageEvent<WorkerMessage>) => {
} as WorkerResponse);
}
};
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/services/web-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,3 +523,4 @@ export async function startWebServer(config: WebServerConfig): Promise<WebServer
await server.start();
return server;
}
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ export interface MemoryMetadata {
}

export type AIProviderType = "openai-chat" | "openai-responses" | "anthropic";
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/types/usearch.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module "usearch";
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1388,3 +1388,4 @@ document.addEventListener("DOMContentLoaded", async () => {

lucide.createIcons();
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions src/web/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ window.t = t;
window.getLanguage = getLanguage;
window.setLanguage = setLanguage;
window.applyLanguage = applyLanguage;
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/ai-provider-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,4 @@ describe("AI provider config", () => {
expect(capturedBody?.temperature).toBeUndefined();
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/anthropic-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ describe("AnthropicMessagesProvider", () => {
expect(capturedBody?.max_tokens).toBe(2048);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/config-resolution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ describe("project-scoped config resolution", () => {
expect(CONFIG.opencodeProvider).toBeUndefined();
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ describe("config", () => {
});
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/language-detector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ describe("getLanguageName", () => {
expect(getLanguageName("xyz")).toBe("English");
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/memory-engine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,3 +721,4 @@ describe("Memory Engine Integration", () => {
});
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/memory-scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ describe("memory scope", () => {
expect(res.results.map((r: any) => r.id)).toEqual(["shard-a", "shard-b"]);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/openai-chat-completion-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,4 @@ describe("OpenAIChatCompletionProvider", () => {
expect(result.success).toBe(false);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/opencode-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,4 @@ describe("state management", () => {
expect(isProviderConnected("gemini")).toBe(false);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/plugin-loader-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ describe("OpenCode 1.3.x plugin-loader contract", () => {
}
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/privacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
it("should replace <private> tags with [REDACTED]", () => {
const input = "Hello <private>secret data</private> world";
const result = stripPrivateContent(input);
expect(result).toBe("Hello [REDACTED] world");

Check failure on line 9 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

Expected: "Hello [REDACTED] world" Received: "Hello <private>secret data</private> world" at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:9:22)
});

it("should handle multiple <private> tags", () => {
const input = "<private>first</private> and <private>second</private>";
const result = stripPrivateContent(input);
expect(result).toBe("[REDACTED] and [REDACTED]");

Check failure on line 15 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

Expected: "[REDACTED] and [REDACTED]" Received: "<private>first</private> and <private>second</private>" at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:15:22)
});

it("should be case-insensitive", () => {
const input = "<PRIVATE>secret</PRIVATE>";
const result = stripPrivateContent(input);
expect(result).toBe("[REDACTED]");

Check failure on line 21 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

Expected: "[REDACTED]" Received: "<PRIVATE>secret</PRIVATE>" at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:21:22)
});

it("should handle multiline content inside tags", () => {
const input = "<private>\nline1\nline2\n</private>";
const result = stripPrivateContent(input);
expect(result).toBe("[REDACTED]");

Check failure on line 27 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

- "[REDACTED]" + "<private> + line1 + line2 + </private>" - Expected - 1 + Received + 4 at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:27:22)
});

it("should return unchanged string when no tags present", () => {
Expand All @@ -41,14 +41,14 @@
it("should handle adjacent private tags", () => {
const input = "<private>a</private><private>b</private>";
const result = stripPrivateContent(input);
expect(result).toBe("[REDACTED][REDACTED]");

Check failure on line 44 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

Expected: "[REDACTED][REDACTED]" Received: "<private>a</private><private>b</private>" at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:44:22)
});
});

describe("isFullyPrivate", () => {
it("should return true when content is only a private tag", () => {
const result = isFullyPrivate("<private>secret</private>");
expect(result).toBe(true);

Check failure on line 51 in tests/privacy.test.ts

View workflow job for this annotation

GitHub Actions / check

error: expect(received).toBe(expected)

Expected: true Received: false at <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/privacy.test.ts:51:22)
});

it("should return true for empty string", () => {
Expand All @@ -72,3 +72,4 @@
});
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/profile-tool-runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,4 @@ describe("memory tool profile runtime behavior", () => {
);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/profile-write.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,4 @@ describe("UserProfileManager – explicit preference writes", () => {
expect(last.changeType).toBe("update");
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/project-scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ describe("project scope identity", () => {
expect(rootTag.projectPath).toBe(nestedTag.projectPath);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/tags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ describe("tags", () => {
});
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/tool-scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

async function createPlugin(defaultScope?: "project" | "all-projects") {
mockConfig.memory.defaultScope = defaultScope;
const { OpenCodeMemPlugin } = await import("../src/index.js");

Check failure on line 122 in tests/tool-scope.test.ts

View workflow job for this annotation

GitHub Actions / check

ReferenceError: Cannot access 'OpenCodeMemPlugin' before initialization.

at createPlugin (/home/runner/work/opencode-mem0/opencode-mem0/tests/tool-scope.test.ts:122:46) at async <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/tool-scope.test.ts:152:26)

Check failure on line 122 in tests/tool-scope.test.ts

View workflow job for this annotation

GitHub Actions / check

ReferenceError: Cannot access 'OpenCodeMemPlugin' before initialization.

at createPlugin (/home/runner/work/opencode-mem0/opencode-mem0/tests/tool-scope.test.ts:122:46) at async <anonymous> (/home/runner/work/opencode-mem0/opencode-mem0/tests/tool-scope.test.ts:143:26)
return OpenCodeMemPlugin({ directory: "/workspace", client: {} });
}

Expand Down Expand Up @@ -157,3 +157,4 @@
expect(lastListScope).toBe("project");
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/vector-backends/backend-factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ describe("vector backend factory", () => {
expect(backend.getBackendName()).toBe("exact-scan");
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/vector-backends/exact-scan-backend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ describe("ExactScanBackend", () => {
expect(result).toEqual([]);
});
});
// AUDIT_MARKER
1 change: 1 addition & 0 deletions tests/vector-backends/migration-fallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ describe("migration with backend abstraction", () => {
expect(results.map((r) => r.id)).toEqual(["a"]);
});
});
// AUDIT_MARKER
Loading
Loading