gen

command
v1.0.0-rc.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command gen writes internal/protocol/protocol_gen.go from the JSON Schema spec in the upstream ngchat checkout, invoked by the //go:generate directive in internal/protocol/doc.go (ADR 0010). Like internal/complete/gen it never talks to the network and never guesses a checkout path: NGCHAT_UPSTREAM must point at one.

It is a purpose-built walker, not a general JSON Schema generator. The spec uses a small subset (objects, arrays, scalars, const, oneOf by a name discriminator), and any keyword outside that subset fails the run, so a spec that grows a feature this walker cannot express is caught here instead of being half-translated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL