Capability pages
One page for each capability. A page is the whole vocabulary: the parts it accepts, the parameters it reads, the channels it emits, and the terminal metadata. The core reads none of it.
spec.md section 7 holds the summary table. A page must agree with that table.
If they disagree, the table is right and the page is a bug.
Pages
| page | capability | status |
|---|---|---|
chat.v1.md | chat | written |
embed.v1.md | embed | written |
rerank.v1.md | rerank | written |
tts.v1.md | tts | written |
stt.v1.md | stt | written |
music.v1.md | music | written |
image-gen.v1.md | image-gen | written |
image-edit.v1.md | image-edit | written |
t2v-gen.v1.md | t2v-gen | written |
i2v-gen.v1.md | i2v-gen | written |
decide.v1.md | decide | written |
extract.v1.md | extract | written |
Shared media types
A page names one mime for each channel. These are the only allowed values.
| use | mime |
|---|---|
| text fragment | text/plain; charset=utf-8 |
| structured object | application/json |
| vector, score, token list | application/cbor |
| audio | audio/pcm; enc=<s16le|f32le>; rate=<hz>; channels=<n> |
| one image | image/png, image/jpeg, image/webp |
| one clip | video/mp4 |
A pcm event states its format in its own mime. Every pcm event of one job
uses the same mime.
Shared usage keys
done.usage counts what the job consumed and produced. The keys are integers.
A page lists the keys that its capability reports.
| key | meaning |
|---|---|
tokens_in | prompt tokens |
tokens_out | generated tokens |
audio_ms | audio milliseconds, in or out |
images | images produced |
pixels | pixels produced |
frames | video frames produced |
Shared progress payload
A progress event carries {"stage": string, "pct": number}. pct is between
0 and 1. It never decreases inside one job.
Shape goldens are generated
Do not write a golden by hand. .f0rge/ci/shape_goldens.py reads the tables in
each page and writes goldens/capabilities/<name>.v1.json; 04_shape.sh runs
it with --check. CI fails when the result differs from the committed one. One
source, one artifact, and a page cannot drift from its golden.
A page therefore has no Golden: line. The path is derived from the capability
name.
Page contract
Every page has these sections, in this order:
- title, then the five status lines: Status, Capability key, Route, Crate, Trait
- Parts in
- Parameters
- Channels out
- Terminal metadata
- Request
- Response, no stream
- Stream
- Rules
A capability with no parameters says so. It does not keep an empty table. A parameter with only one legal value is not a parameter; it is a constant, and the page states it in a rule.