Skip to content

Commit 81d0f3f

Browse files
authored
refactor(memory-wiki): localize internal helper types (#101931)
1 parent 1aee742 commit 81d0f3f

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

extensions/memory-wiki/src/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import path from "node:path";
44
import { mapPluginConfigIssues } from "openclaw/plugin-sdk/extension-shared";
55
import { buildPluginConfigSchema, z, type OpenClawPluginConfigSchema } from "../api.js";
66

7-
export const WIKI_VAULT_MODES = ["isolated", "bridge", "unsafe-local"] as const;
8-
export const WIKI_RENDER_MODES = ["native", "obsidian"] as const;
7+
const WIKI_VAULT_MODES = ["isolated", "bridge", "unsafe-local"] as const;
8+
const WIKI_RENDER_MODES = ["native", "obsidian"] as const;
99
export const WIKI_SEARCH_BACKENDS = ["shared", "local"] as const;
1010
export const WIKI_SEARCH_CORPORA = ["wiki", "memory", "all"] as const;
1111

12-
export type WikiVaultMode = (typeof WIKI_VAULT_MODES)[number];
13-
export type WikiRenderMode = (typeof WIKI_RENDER_MODES)[number];
12+
type WikiVaultMode = (typeof WIKI_VAULT_MODES)[number];
13+
type WikiRenderMode = (typeof WIKI_RENDER_MODES)[number];
1414
export type WikiSearchBackend = (typeof WIKI_SEARCH_BACKENDS)[number];
1515
export type WikiSearchCorpus = (typeof WIKI_SEARCH_CORPORA)[number];
1616

extensions/memory-wiki/src/import-runs-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
PluginStateKeyedStore,
88
} from "openclaw/plugin-sdk/plugin-state-runtime";
99

10-
export type ChatGptImportRunEntry = {
10+
type ChatGptImportRunEntry = {
1111
path: string;
1212
snapshotPath?: string;
1313
};

extensions/memory-wiki/src/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export type WikiPageSummary = {
115115
updatedAt?: string;
116116
};
117117

118-
export type WikiPageSummaryScanResult =
118+
type WikiPageSummaryScanResult =
119119
| { status: "valid"; page: WikiPageSummary }
120120
| { status: "invalid-frontmatter"; error: WikiPageFrontmatterError }
121121
| { status: "ignored" };

extensions/memory-wiki/src/okf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ type OkfImportedPage = {
5656
created: boolean;
5757
};
5858

59-
export type ImportMemoryWikiOkfWarning = {
59+
type ImportMemoryWikiOkfWarning = {
6060
code: "invalid-concept" | "missing-type" | "unreadable-entry";
6161
path: string;
6262
message: string;
6363
};
6464

65-
export type ImportMemoryWikiOkfResult = {
65+
type ImportMemoryWikiOkfResult = {
6666
bundlePath: string;
6767
bundleName: string;
6868
okfVersion?: string;

extensions/memory-wiki/src/source-sync-state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010

1111
export type MemoryWikiImportedSourceGroup = "bridge" | "unsafe-local";
1212

13-
export type MemoryWikiImportedSourceStateEntry = {
13+
type MemoryWikiImportedSourceStateEntry = {
1414
group: MemoryWikiImportedSourceGroup;
1515
pagePath: string;
1616
sourcePath: string;
@@ -19,7 +19,7 @@ export type MemoryWikiImportedSourceStateEntry = {
1919
renderFingerprint: string;
2020
};
2121

22-
export type MemoryWikiImportedSourceState = {
22+
type MemoryWikiImportedSourceState = {
2323
version: 1;
2424
entries: Record<string, MemoryWikiImportedSourceStateEntry>;
2525
};

extensions/memory-wiki/src/vault-page-write.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FsSafeError, root as fsRoot } from "openclaw/plugin-sdk/security-runtim
44

55
type VaultRoot = Awaited<ReturnType<typeof fsRoot>>;
66

7-
export type FileStatLike = {
7+
type FileStatLike = {
88
isFile?: unknown;
99
nlink?: unknown;
1010
};

0 commit comments

Comments
 (0)