Agent / foldkit-agent-native
Schema bridge
This section is implementation/compatibility detail; it is not required to use the adapter.
The adapter exposes the capability's encoded input Schema as a Standard
Schema validator and advertises the corresponding JSON Schema to Agent Native.
That preserves the same boundary foldkit-agent uses for transforming schemas
such as NumberFromString: Agent Native validates the encoded input, then the
bound runtime performs the application's single decode before dispatch.
Agent Native's current schema integration needs validation and JSON Schema metadata on the same schema object. With Effect, the two conversion helpers provide different halves:
| Conversion | validate | advertised parameters |
|---|---|---|
toStandardSchemaV1 | yes | empty |
toStandardJSONSchemaV1 | no | full |
| copied into a fresh object | yes | empty |
| both called on the same schema object | yes | full |
The adapter therefore calls both helpers on the same Effect schema object so its identity—and the metadata associated with it—survives.
Extra input fields are rejected. Only object input schemas are supported because that is the shape Agent Native currently includes in its tool list.