Skip to content

Commit 6765eb0

Browse files
authored
refactor(memory-core): localize internal declarations (#101969)
1 parent fdc9824 commit 6765eb0

6 files changed

Lines changed: 13 additions & 15 deletions

File tree

extensions/memory-core/src/dreaming-state.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ const DREAMING_WORKSPACE_STATE_MAX_ENTRIES = 50_000;
1919
export const SHORT_TERM_LOCK_MAX_ENTRIES = 4_096;
2020
export const SESSION_SEEN_HASHES_PER_CHUNK = 512;
2121

22-
export type MemoryCoreOpenKeyedStore = <T>(
23-
options: OpenKeyedStoreOptions,
24-
) => PluginStateKeyedStore<T>;
22+
type MemoryCoreOpenKeyedStore = <T>(options: OpenKeyedStoreOptions) => PluginStateKeyedStore<T>;
2523

2624
type WorkspaceValue<T> = {
2725
version: 1;
@@ -31,7 +29,7 @@ type WorkspaceValue<T> = {
3129
value: T;
3230
};
3331

34-
export type MemoryCoreWorkspaceEntry<T> = { key: string; value: T };
32+
type MemoryCoreWorkspaceEntry<T> = { key: string; value: T };
3533

3634
type MemoryCoreWorkspaceParams = {
3735
namespace: string;

extensions/memory-core/src/memory/manager-embedding-errors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Memory Core plugin module implements manager embedding errors behavior.
22
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
33

4-
export const MEMORY_EMBEDDING_OPERATION_ERROR_CODE = "MEMORY_EMBEDDING_OPERATION_FAILED";
4+
const MEMORY_EMBEDDING_OPERATION_ERROR_CODE = "MEMORY_EMBEDDING_OPERATION_FAILED";
55

6-
export type MemoryEmbeddingOperationKind = "query" | "batch" | "structured-batch";
6+
type MemoryEmbeddingOperationKind = "query" | "batch" | "structured-batch";
77

8-
export type MemoryEmbeddingOperationError = Error & {
8+
type MemoryEmbeddingOperationError = Error & {
99
code: typeof MEMORY_EMBEDDING_OPERATION_ERROR_CODE;
1010
operation: MemoryEmbeddingOperationKind;
1111
providerId?: string;

extensions/memory-core/src/memory/qmd-runtime-cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type QmdRuntimeMultiCollectionProbeCacheContext = QmdRuntimeCacheContextB
4040
sources: readonly string[];
4141
};
4242

43-
export type QmdRuntimeCacheCollectionValidationEntry = {
43+
type QmdRuntimeCacheCollectionValidationEntry = {
4444
version: 1;
4545
createdAtMs: number;
4646
expiresAtMs: number;
@@ -52,7 +52,7 @@ export type QmdRuntimeCacheCollectionValidationEntry = {
5252
};
5353
};
5454

55-
export type QmdRuntimeCacheMultiCollectionProbeEntry = {
55+
type QmdRuntimeCacheMultiCollectionProbeEntry = {
5656
version: 1;
5757
createdAtMs: number;
5858
expiresAtMs: number;
@@ -62,7 +62,7 @@ export type QmdRuntimeCacheMultiCollectionProbeEntry = {
6262
};
6363
};
6464

65-
export type QmdRuntimeCacheResult<T> =
65+
type QmdRuntimeCacheResult<T> =
6666
| {
6767
state: "hit";
6868
value: T;

extensions/memory-core/src/memory/search-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type MemorySearchManagerCacheState =
5959
| "fallback-builtin"
6060
| "recent-failure-cooldown";
6161

62-
export type MemorySearchManagerDebug = {
62+
type MemorySearchManagerDebug = {
6363
backend?: "builtin" | "qmd";
6464
purpose?: MemorySearchManagerPurpose;
6565
managerMs?: number;

extensions/memory-core/src/qmd-session-artifacts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export type QmdSessionArtifactMapping = {
1818
sessionId: string;
1919
};
2020

21-
export type QmdSessionArtifactLookup = {
21+
type QmdSessionArtifactLookup = {
2222
artifactPath?: string;
2323
collection?: string;
2424
docid?: string;
2525
indexPath: string;
2626
searchPath: string;
2727
};
2828

29-
export type QmdSessionArtifactIdentity = {
29+
type QmdSessionArtifactIdentity = {
3030
agentId: string;
3131
archived: boolean;
3232
memoryKey: string;

extensions/memory-core/src/short-term-promotion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export type ShortTermRecallEntry = {
130130
promotedAt?: string;
131131
};
132132

133-
export type ShortTermRecallStore = {
133+
type ShortTermRecallStore = {
134134
version: 1;
135135
updatedAt: string;
136136
entries: Record<string, ShortTermRecallEntry>;
@@ -145,7 +145,7 @@ type ShortTermPhaseSignalEntry = {
145145
lastRemConsideredAt?: string;
146146
};
147147

148-
export type ShortTermPhaseSignalStore = {
148+
type ShortTermPhaseSignalStore = {
149149
version: 1;
150150
updatedAt: string;
151151
entries: Record<string, ShortTermPhaseSignalEntry>;

0 commit comments

Comments
 (0)