anomalyco / anomalyco/opencode
v2 SDK message builder assigns the placeholder id "asdasd"
@kitlangton is already working on this.
Since Aug 7, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
packages/sdk/js/src/v2/data.ts assigns the literal string "asdasd" as the id for the message and for every part it builds:
const info: UserMessage = {
...rest,
id: "asdasd",
...
}
return {
info,
parts: input.parts.map((part) => ({
...part,
id: "asdasd",
...
}) as Part),
}
data is exported from src/v2/index.ts (export * as data from "./data.js") and ./v2 is in the package exports, so this is public API. Every message and every part built through it comes out with the same id.
grep -rn "asdasd" packages/ only finds these two lines, so it doesn't look like a sentinel value anyone checks for.
I have a patch that generates msg_/prt_ ids in the same monotonic format the server uses. Can open a PR if that's the direction you want.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.