web-applets
typebox
web-applets | typebox | |
---|---|---|
3 | 65 | |
216 | 5,881 | |
1.4% | 1.2% | |
9.0 | 8.5 | |
about 2 months ago | 16 days ago | |
TypeScript | TypeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
web-applets
-
Introduction to Operator and Agents
That's specifically what I'm working on at [Unternet](https://unternet.co/), based on observing the same issue while working at Adept. It seems absurd that in the future we'll have developers building full GUI apps that users never see, because they're being used by GPU-crunching vision models, which then in turn create their own interfaces for end-users.
Instead we need apps that have a human interface for users, and a machine interface for models. I've been building [web applets](https://github.com/unternet-co/web-applets/) as an lightweight protocol on top of the web to achieve this. It's in early stages, but I'm inviting the first projects to start building with it & accepting contributions.
- Web Applets: open spec and SDK for creating apps that agents can use
-
The Model Context Protocol
For those interested, I've been working on something related to this, Web Applets – which is a spec for creating AI-enabled components that can receive actions & respond with state:
https://github.com/unternet-co/web-applets/
typebox
- A parser for TypeScript types, written in TypeScript types
-
Zod 4
I was using TypeBox but switched to Zod. I like TypeBox but I found I don't actually need my schema to be a JSON Schema and the one time I did want a JSON Schema it was hard to get actual JSON back out of TypeBox.
The thing I like about Zod is the "refinements" and "transforms" and the new "overwrite" in Zod 4 was just what I wanted.
TypeBox does have a transform (https://github.com/sinclairzx81/typebox?tab=readme-ov-file#t...) but you can't transform and then apply more validations and then maybe another transform, etc. For example, I like to trim strings before checking length.
-
Zod v4: 17x Slower? (and Why You Should Care) 🚦
My hunch was that Zod v4 started using eval (or, more precisely, JIT compilation via new Function) for validation. This isn’t a bad thing — libraries like TypeBox, ArkType, and even Sury use similar techniques for speed.
-
Welcome Sury - The fastest schema with next-gen DX 🚀
Sury uses new Function under the hood. This approach makes it the fastest schema library available, but also means it cannot be used in environments that don't allow dynamic code evaluation, like CloudFlare Workers. Most users won't be affected, but might be an issue for some. Regarding safety of the approach you shouldn't be worried. Everything embeded to the generated code is escaped and thoroughly tested. Also, other libraries like TypeBox and Zod@4 use new Function under the hood as well.
-
Introducing Hono OpenAPI: Simplifying API Documentation for HonoJS
The original library only supports Zod. While Zod is excellent, many developers use alternatives like Valibot, ArkType, and TypeBox. hono-openapi is validator-agnostic, offering first-class support for multiple libraries.
-
The Model Context Protocol
If you were willing to bring additional zod tooling or move to something like TypeBox (https://github.com/sinclairzx81/typebox), the json schema would be a direct derivation of the tools' input schemas in code.
-
Zod: TypeScript-first schema validation with static type inference
I'd recommend TypeBox[1] as an alternative, which has a runtime “compiler” for generating optimized JS functions from the type objects. It also produces a JSON schema, which can be useful for generating API docs and API clients if needed.
It also has a companion library[2] for generating TypeBox validators from TypeScript definitions, which I'm currently using in an RPC library I'm working on.
[1]: https://github.com/sinclairzx81/typebox
-
Ask HN: What are you working on (September 2024)?
Big fan of your work and impressed by your productivity. Currently reading https://www.oreilly.com/library/view/unifying-business-data/....
Currently experimenting with programmatic generation of json schemas via https://github.com/sinclairzx81/typebox. Trying to maximize reuse of schema components.
Was wondering if JSON BinPack is a good serialization format to sign json documents? Can it be used to somehow canonicalize json?
-
Popular Libraries For Building Type-safe Web Application APIs
The documentation can be found here.
-
I write HTTP services in Go after 13 years (Mat Ryer, 2024)
So far I like the commonly used approach in the Typescript community best:
1. Create your Schema using https://zod.dev or https://github.com/sinclairzx81/typebox
2. Generate your Types from the schema. It's very simple to create partial or composite types, e.g. UpdateModel, InsertModels, Arrays of them, etc.
3. Most modern Frameworks have first class support for validation, like is a great example Fastify (with typebox). Just reuse your schema definition.
That is very easy, obvious and effective.
What are some alternatives?
typescript-sdk - The official TypeScript SDK for Model Context Protocol servers and clients
zod - TypeScript-first schema validation with static type inference
servers - Model Context Protocol Servers
io-ts - Runtime type system for IO decoding/encoding
wcgw - Shell and coding agent on claude desktop app
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)