diff --git a/tools/store.ts b/tools/store.ts index 0d1b93b..62776ab 100644 --- a/tools/store.ts +++ b/tools/store.ts @@ -1,6 +1,5 @@ import { Type } from "@sinclair/typebox" import type { OpenClawPluginApi } from "openclaw/plugin-sdk" -import { stringEnum } from "openclaw/plugin-sdk" import type { SupermemoryClient } from "../client.ts" import type { SupermemoryConfig } from "../config.ts" import { log } from "../logger.ts" @@ -10,6 +9,12 @@ import { MEMORY_CATEGORIES, } from "../memory.ts" +// stringEnum is declared in plugin-sdk types but not exported at runtime, +// so we inline the equivalent using Type.Union + Type.Literal. +function stringEnum(values: readonly T[]) { + return Type.Union(values.map((v) => Type.Literal(v))) +} + export function registerStoreTool( api: OpenClawPluginApi, client: SupermemoryClient,