GizStack
View .mdOpen in ChatGPTOpen in Claude

gizweb/protocol

the words a GizWeb page and its client share, the one copy of them. The kernel (kernel.giz) speaks them in a browser; GizBrowser speaks them natively (browser/client.giz, the same kernel: client/kernel.giz), with no script.

gizlang
import * as Protocol from "gizweb/protocol";

Constants

ACTIONS

gizlang
const ACTIONS = "/_a/"

Where actions are served: the form of action NAME posts to ACTIONS + NAME.

SUBSCRIPTIONS

gizlang
const SUBSCRIPTIONS = "/_s"

The page's live channel: the WebSocket that carries every subscribed element's changes (data-sub, App.channel).

EVENTS

gizlang
const EVENTS = "/_giz/e"

Where pages send their events (App.Event, the kernel batches them).

DEV

gizlang
const DEV = "giz:dev"

The topic of a page's channel (SUBSCRIPTIONS) on which a live host on this machine says which generation serves and why the newest edit did not start: the hot update of a page (web/app.giz development).

STALE

gizlang
const STALE = "x-giz-stale"

The header that marks a 409 for a page of another version: the kernel takes the new page and sends the action again. A write of a page of an older revision (Pages) has it too: the new page comes in place, and the person sends it again. An action's own 409 has no such header and shows its message.

GO

gizlang
const GO = "application/x-giz-go"

The media type of an answer that sends the browser to another address (an action's redirect, Model.redirecting): its body is the address, which the kernel opens; a form without script gets a 303 instead.

VERSION

gizlang
const VERSION = "x-giz"

The request header that names the code version a page was rendered by (its html data-v).

KERNEL

gizlang
const KERNEL = "data-kernel"

The attribute of the kernel's script element: a client that speaks the protocol itself (GizBrowser) runs no script for it.