Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Avoid any repetition of serde logic in client-generation and other parts of the code (details in description) #190

@afsalthaj

Description

@afsalthaj

Serialization typically refers to converting a TypeScript value into a DataValue. However, in the context of RPC calls, the conversion is not to a DataValue but rather to a WitValue.

Similarly, during deserialization, we normally convert from a DataValue to a TypeScript value.
But in RPC calls, the conversion starts from a WitValue instead.

A direct invocation always uses the shape of a DataValue. Therefore, the main deserialization function does not expect inputs like unstructured-text, unstructured-binary, or multimodal.

However, when everything is represented as a WitValue, we had to manually add some extra logic in the client generation process using WIT, and then pass the rest to the deserialization function.

These areas can be refactored and cleaned up to make the implementation more consistent and maintainable.

Recently, this ended up being not part of the tests and resulted in bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions