Login
OCX’s tools for protocol v1
Login

Protocol v1 is the standard: its artifacts count however they are written. OCX's tools write them, and perform runs by hand, for people and programs, as a convenience, never a requirement. Anyone may write the same artifacts by other means, such as a verdict with fossil tag add or a run as a forum post, and they count exactly the same. What a run's program writes through a tool, the tool writes in the run's own clone, which reaches the server as the run's user; what a person writes with a tool reaches the server as that person, pushed from that person's clone when the tool runs in one.

The tools

Where they are offered, and what they answer

The command line, the web page and MCP offer every tool, but the web page has no thread, since a person reads in Fossil's own forum and ticket pages (the OCX page, /ext/ocx2-cgi, offers post as a card, and console, a page of its own its header links, whose presses write the viewer's decision with post), no stage, which would run a checkout's own code as the web server's account, and no commit_and_sync, context, find, read, edit, test, save, wiki_read, wiki_edit, unversioned_list, unversioned_get or unversioned_put, which act on the caller's checkout; and run, daemon, watch, register and attach are offered on the command line alone, on their own hosts; MCP has no approve or collect, since approving a login is a person's decision and only its asker collects its password, no secret, which a person sets, and no hook, unhook, export or project, since a run's sandbox has no served repository. Each tool checks its input before anything happens: naming a field it does not know is refused, except the run's own keys given to create, which it writes as they are, and so is any text, a field's name or its value, that is not UTF-8 or holds a NUL; the refusal names the field. create's JSON fields, and a pattern's, holding such text once their escapes are decoded, as \u0000 is a NUL, are refused as a node refuses the run they make (protocol v1, section 11, row 2), naming its field. Every tool takes dry_run, which checks everything and writes nothing, and every tool answers in one shape: {"ok", "tool", "dry_run", "log", "result", "stopped", "next_step", "took_ms"}. result is the tool's output, once it has run to the end:

stopped says why it did not run to the end, naming the field at fault.

Why: Clarity (typed input, one answer shape), Loose Coupling (the same tools from every place, and none required), Demonstrability (the dry run).