Skip to content

fix: part ID must start with 'prt' for OpenCode v1.2.25+#36

Open
czw333221 wants to merge 1 commit intosupermemoryai:mainfrom
czw333221:fix/part-id-prefix
Open

fix: part ID must start with 'prt' for OpenCode v1.2.25+#36
czw333221 wants to merge 1 commit intosupermemoryai:mainfrom
czw333221:fix/part-id-prefix

Conversation

@czw333221
Copy link

Problem

OpenCode v1.2.25+ validates that part IDs must start with prt prefix. This plugin was generating IDs like supermemory-nudge-* and supermemory-context-*, causing:

ZodError: [
  {
    "code": "custom",
    "message": "id field must start with 'prt'",
    "path": ["parts", 0, "id"]
  }
]

Solution

Changed part ID prefixes to comply with OpenCode's validation:

  • supermemory-nudge-*prt_smnudge_*
  • supermemory-context-*prt_smcontext_*

Related

Testing

Verified working after patching the installed plugin in ~/.cache/opencode/node_modules/opencode-supermemory/dist/index.js.

OpenCode v1.2.25+ validates that part IDs must start with 'prt' prefix.
This fixes ZodError: "id field must start with 'prt'" when sending messages.

Changes:
- `supermemory-nudge-*` → `prt_smnudge_*`
- `supermemory-context-*` → `prt_smcontext_*`

Fixes: anomalyco/opencode#18205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant