From ee819069135ab9d7a6c691c1f40003f04b3f2630 Mon Sep 17 00:00:00 2001 From: Selim Ataballyev Date: Tue, 17 Mar 2026 22:24:40 +0500 Subject: [PATCH] fix: prefix part IDs with 'prt_' to satisfy OpenCode validation OpenCode v1.2.27+ validates that all part IDs must start with 'prt' (enforced via Zod schema in the TUI worker). The supermemory plugin was injecting parts with IDs like 'supermemory-context-' and 'supermemory-nudge-', causing a crash on every first message in a session. Prefix both IDs with 'prt_' to comply with the expected format. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7a5a441..fecd624 100644 --- a/src/index.ts +++ b/src/index.ts @@ -112,7 +112,7 @@ export const SupermemoryPlugin: Plugin = async (ctx: PluginInput) => { if (detectMemoryKeyword(userMessage)) { log("chat.message: memory keyword detected"); const nudgePart: Part = { - id: `supermemory-nudge-${Date.now()}`, + id: `prt_supermemory-nudge-${Date.now()}`, sessionID: input.sessionID, messageID: output.message.id, type: "text", @@ -157,7 +157,7 @@ export const SupermemoryPlugin: Plugin = async (ctx: PluginInput) => { if (memoryContext) { const contextPart: Part = { - id: `supermemory-context-${Date.now()}`, + id: `prt_supermemory-context-${Date.now()}`, sessionID: input.sessionID, messageID: output.message.id, type: "text",