npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@comfyorg/ingest-types

v1.7.2

Published

Comfy Cloud Ingest API TypeScript types and Zod schemas

Readme

@comfyorg/ingest-types

TypeScript types and Zod schemas generated from Comfy Cloud's ingest API spec.

In-App Agent doc-frame contract

The CRDT doc-frame wire contract is owned by Comfy Cloud's ingest service. The frontend imports its generated types and schemas. Its production WebSocket boundary remains a handwritten adapter that independently validates raw JSON before exposing frontend domain objects; a compatibility test feeds generated schema output through that adapter to detect disagreement between the two representations.

Contract

cloud services/ingest/openapi.yaml          (authority)
        ├──▶ cloud common/websocket/docframes  (generated Go models)
        └──▶ packages/ingest-types             (generated TS types + Zod schemas)
                 └──▶ docFrameClient.ts       (validation + domain adapter)
  • ServerDocFrame, DocUpdateFrame/DocUpdateData, DocResetFrame/DocResetData, DocOpsResultFrame/DocOpsResultData, and DocOpFailure come from @comfyorg/ingest-types. @comfyorg/ingest-types/zod exposes the matching runtime validators.
  • packages/ingest-types is regenerated from the cloud spec by an automated sync ([chore] Update Ingest API types from cloud@<sha>). That sync is the freshness mechanism; the frontend does not re-derive the schema locally.
  • doc_ops_result.data.failed is the wire spelling. A frontend adapter may expose failure, but that mapping must remain at the adapter boundary.
  • Generated types describe the {type,data} bytes; they do not implement CRDT application, authority, or mutation semantics.
  • parseServerDocFrame does not invoke Zod in production. It independently validates raw WebSocket values, converts the generated schemas' bigint int64 output to safe numeric domain values, and maps snake-case wire fields to frontend names. Its compatibility tests pass representative generated outputs through that adapter and assert their complete mapped payloads; they do not claim that the handwritten parser accepts every value admitted by the generated schema.

Validation the generated schema cannot provide

update_b64 is an unconstrained string in the authoritative OpenAPI contract, so its generated Zod schema also accepts malformed payloads. Cloud validates base64 in code (validateB64 in common/websocket/messages), and the frontend independently validates it in parseServerDocFrame. The adapter can therefore reject schema-conforming input. Conversely, the adapter accepts some raw frames that the generated schema rejects, such as a doc_update without lineage_seq, because the frontend domain object does not use that field. The compatibility test pins representative generated outputs plus these intentional boundary differences rather than treating schema conformance as a prerequisite for adapter acceptance.

References

  • Cloud PR #7730 — generated CRDT doc-frame wire types.
  • docs/guidance/typescript.md — server/API response types come from the generated shared packages.
  • docs/adr/CRDT-FOLLOWER-0025-in-app-agent-crdt-follower-and-distribution-resolved-boundaries.md — frontend follower boundary.

Glossary

  • Doc frame: a CRDT message carried by the WebSocket {type,data} envelope.
  • Wire spelling: the serialized field name shared by all producers and consumers.
  • Adapter boundary: the one place a consumer may map a wire name to an internal name.