docs.phext.io
LATEST REFERENCE
Reference as of head commit 2c3be7e6552a7bfad635001bffd8b3657a2d3358 · 16 commits audited · chain sha256 738f6d6acd790ddb…

phextron — project documentation

Scanned by phdoc 0.1.0 on 2026-11-22 (Exocortical Epoch 95). Project root: /home/wbic16/phdoc-sweep/proj/phextron/. Scanned at commit 2c3be7e6552a7bfad635001bffd8b3657a2d3358. Every fact in this document was read from its own records: its manifests, its git log, and its source text. Nothing here was guessed.

This document holds: what the project depends on, who wrote it, how large and how complex it is, the state of its quality signals, the RFCs it declares, where its upstream repo lives, and a plain English note for every public method and command.


Dependencies

Rust (cargo) — Cargo.toml

Direct dependencies: 0.

Total packages in the lock file, this one included: 75.

Rust (cargo) — crates/gl1-http/Cargo.toml

License stated in the manifest: MIT.

Direct dependencies: 3.

Total packages in the lock file, this one included: 75.

Rust (cargo) — crates/gl2-credman/Cargo.toml

License stated in the manifest: MIT.

Direct dependencies: 0.

Total packages in the lock file, this one included: 75.

Rust (cargo) — crates/phextron-dash/Cargo.toml

License stated in the manifest: MIT.

Direct dependencies: 2.

Total packages in the lock file, this one included: 75.

Rust (cargo) — crates/phextron-web/Cargo.toml

License stated in the manifest: MIT.

Direct dependencies: 0.

Total packages in the lock file, this one included: 75.


Authors

The git log holds 16 commits.

The author of record is Will Bickford — 16 commits folded into his account. Will's ruling (2026-11-22): all Exocortical authors fold into his account — "I speak for the cluster." The fold is presentation only: the git history is unchanged, and the per-persona detail is kept as annotation.

Annotation, by persona (all folded into Will Bickford):


Complexity

The measure is stated plainly, and no single score is made: lines are counted per file as total lines, blank lines, comment lines, and code lines (total minus blank minus comment). Functions are counted where the scanner reads them, and the largest functions are given by their span in lines.

All languages: 35 files, 7094 lines total, 5785 lines of code. Functions read: 270.

Largest files:

Largest functions, by span in lines:


Code quality signals

Each signal is named and shown with its evidence. A signal is a fact the scanner read, not a grade.


Declared RFCs

No rfcs.json was found in this project, so it declares no RFCs. This is a finding, not an error: the project has not made an RFC declaration.


Upstream git repo


Public methods and commands

Every public method and command the scanner found, each with a plain English note. A note says where its words came from: the code's own doc comment, the item's signature, the user's agent, or it is marked awaiting a summary.


function — join_url

Found in crates/gl1-http/src/lib.rs at line 13.

Signature: pub fn join_url(base: &str, path: &str) -> String {

What it does: Join a base URL and a path with exactly one separating slash.

(Where these words came from: doc comment.)


function — cookie_header

Found in crates/gl1-http/src/lib.rs at line 24.

Signature: pub fn cookie_header(session: Option<&str>) -> Option<String> {

What it does: Value of the Cookie header presenting the session, if any.

(Where these words came from: doc comment.)


struct — ExchangeResult

Found in crates/gl1-http/src/lib.rs at line 30.

Signature: pub struct ExchangeResult {

What it does: The {session, csrf} pair returned by the desktop exchange.

(Where these words came from: doc comment.)


struct — LatticeClient

Found in crates/gl1-http/src/lib.rs at line 38.

Signature: pub struct LatticeClient {

What it does: Typed client for one lattice base URL.

(Where these words came from: doc comment.)


function — LatticeClient::new

Found in crates/gl1-http/src/lib.rs at line 46.

Signature: pub fn new(base_url: impl Into<String>) -> Self {

What it does: Function LatticeClient::new takes base_url: impl Into<String> and gives back Self.

(Where these words came from: signature.)


function — with_credentials

Found in crates/gl1-http/src/lib.rs at line 55.

Signature: pub fn with_credentials( base_url: impl Into<String>, session: Option<String>, csrf: Option<String>, ) -> Self {

What it does: Function with_credentials takes base_url: impl Into<String>, session: Option<String>, csrf: Option<String>, and gives back Self.

(Where these words came from: signature.)


function — set_session

Found in crates/gl1-http/src/lib.rs at line 66.

Signature: pub fn set_session(&mut self, session: Option<String>) {

What it does: Function set_session takes &mut self, session: Option<String> and gives back nothing; it does its work on what it is given.

(Where these words came from: signature.)


function — set_csrf

Found in crates/gl1-http/src/lib.rs at line 69.

Signature: pub fn set_csrf(&mut self, csrf: Option<String>) {

What it does: Function set_csrf takes &mut self, csrf: Option<String> and gives back nothing; it does its work on what it is given.

(Where these words came from: signature.)


function — session_value

Found in crates/gl1-http/src/lib.rs at line 72.

Signature: pub fn session_value(&self) -> Option<&str> {

What it does: Function session_value takes no inputs beyond the value it is called on, and gives back Option<&str>.

(Where these words came from: signature.)


function — csrf_value

Found in crates/gl1-http/src/lib.rs at line 75.

Signature: pub fn csrf_value(&self) -> Option<&str> {

What it does: Function csrf_value takes no inputs beyond the value it is called on, and gives back Option<&str>.

(Where these words came from: signature.)


function — url

Found in crates/gl1-http/src/lib.rs at line 78.

Signature: pub fn url(&self, path: &str) -> String {

What it does: Function url takes &self, path: &str and gives back String.

(Where these words came from: signature.)


function — get

Found in crates/gl1-http/src/lib.rs at line 100.

Signature: pub fn get(&self, path: &str) -> Result<(u16, String), ureq::Error> {

What it does: Generic GET. Returns (status, body). HTTP error statuses are returned, not raised, so callers see lattice's status directly.

(Where these words came from: doc comment.)


function — post

Found in crates/gl1-http/src/lib.rs at line 115.

Signature: pub fn post(&self, path: &str, body: &str) -> Result<(u16, String), ureq::Error> {

What it does: Generic POST with a string body. Sends the CSRF token.

(Where these words came from: doc comment.)


function — exchange

Found in crates/gl1-http/src/lib.rs at line 133.

Signature: pub fn exchange( &mut self, assertion: &str, state: &str, ) -> Result<(u16, ExchangeResult), Box<dyn std::error::Error>> {

What it does: POST /api/auth/desktop/exchange with the assertion/state headers. On success stores the returned session + CSRF on this client.

(Where these words came from: doc comment.)


function — session

Found in crates/gl1-http/src/lib.rs at line 163.

Signature: pub fn session(&self) -> Result<(u16, String), ureq::Error> {

What it does: GET /api/session. Returns (status, body).

(Where these words came from: doc comment.)


entry point — main

Found in crates/gl2-credman/src/bin/credman-roundtrip.rs at line 5.

Signature: fn main() {

What it does: The entry point: the program starts here. It reads the command line and runs the command the user named.

(Where these words came from: signature.)


const — MAX_BLOB_BYTES

Found in crates/gl2-credman/src/lib.rs at line 14.

Signature: pub const MAX_BLOB_BYTES: usize = 2560; // CRED_MAX_CREDENTIAL_BLOB_SIZE (5 * 512)

What it does: Generic-credential blob limit enforced by Windows Credential Manager.

(Where these words came from: doc comment.)


enum — Error

Found in crates/gl2-credman/src/lib.rs at line 17.

Signature: pub enum Error {

What it does: A named choice named Error. It is one of: BlobTooLarge; InvalidTarget; Unsupported; Os.

(Where these words came from: signature.)


type — Result

Found in crates/gl2-credman/src/lib.rs at line 42.

Signature: pub type Result<T> = std::result::Result<T, Error>;

What it does: A type name, Result, that stands for another type.

(Where these words came from: signature.)


function — Error::validate_target

Found in crates/gl2-credman/src/lib.rs at line 44.

Signature: pub fn validate_target(target: &str) -> Result<()> {

What it does: Function Error::validate_target takes target: &str and gives back Result<()>.

(Where these words came from: signature.)


function — validate_blob

Found in crates/gl2-credman/src/lib.rs at line 51.

Signature: pub fn validate_blob(blob: &[u8]) -> Result<()> {

What it does: Function validate_blob takes blob: &[u8] and gives back Result<()>.

(Where these words came from: signature.)


const — CRED_TYPE_GENERIC

Found in crates/gl2-credman/src/lib.rs at line 65.

Signature: pub const CRED_TYPE_GENERIC: u32 = 1;

What it does: A fixed value named CRED_TYPE_GENERIC, set to 1.

(Where these words came from: signature.)


const — CRED_PERSIST_LOCAL_MACHINE

Found in crates/gl2-credman/src/lib.rs at line 66.

Signature: pub const CRED_PERSIST_LOCAL_MACHINE: u32 = 2;

What it does: A fixed value named CRED_PERSIST_LOCAL_MACHINE, set to 2.

(Where these words came from: signature.)


const — ERROR_NOT_FOUND

Found in crates/gl2-credman/src/lib.rs at line 67.

Signature: pub const ERROR_NOT_FOUND: u32 = 1168;

What it does: A fixed value named ERROR_NOT_FOUND, set to 1168.

(Where these words came from: signature.)


struct — CredentialW

Found in crates/gl2-credman/src/lib.rs at line 70.

Signature: pub struct CredentialW {

What it does: A data shape named CredentialW. Its fields are: pub flags: u32; pub cred_type: u32; pub target_name: *mut u16; pub comment: *mut u16; pub last_written: u64, // FILETIME; pub credential_blob_size: u32; pub credential_blob: *mut u8; pub persist: u32; pub attribute_count: u32; pub attributes: *mut core::ffi::c_void; pub target_alias: *mut u16; pub user_name: *mut u16.

(Where these words came from: signature.)


function — store

Found in crates/gl2-credman/src/lib.rs at line 106.

Signature: pub fn store(target: &str, blob: &[u8]) -> Result<()> {

What it does: Function store takes target: &str, blob: &[u8] and gives back Result<()>.

(Where these words came from: signature.)


function — read

Found in crates/gl2-credman/src/lib.rs at line 129.

Signature: pub fn read(target: &str) -> Result<Option<Vec<u8>>> {

What it does: Function read takes target: &str and gives back Result<Option<Vec<u8>>>.

(Where these words came from: signature.)


function — delete

Found in crates/gl2-credman/src/lib.rs at line 149.

Signature: pub fn delete(target: &str) -> Result<()> {

What it does: Function delete takes target: &str and gives back Result<()>.

(Where these words came from: signature.)


function — open_url

Found in crates/gl2-credman/src/lib.rs at line 161.

Signature: pub fn open_url(url: &str) -> Result<()> {

What it does: Function open_url takes url: &str and gives back Result<()>.

(Where these words came from: signature.)


function — store

Found in crates/gl2-credman/src/lib.rs at line 172.

Signature: pub fn store(target: &str, blob: &[u8]) -> Result<()> {

What it does: Function store takes target: &str, blob: &[u8] and gives back Result<()>.

(Where these words came from: signature.)


function — read

Found in crates/gl2-credman/src/lib.rs at line 177.

Signature: pub fn read(target: &str) -> Result<Option<Vec<u8>>> {

What it does: Function read takes target: &str and gives back Result<Option<Vec<u8>>>.

(Where these words came from: signature.)


function — delete

Found in crates/gl2-credman/src/lib.rs at line 181.

Signature: pub fn delete(target: &str) -> Result<()> {

What it does: Function delete takes target: &str and gives back Result<()>.

(Where these words came from: signature.)


function — open_url

Found in crates/gl2-credman/src/lib.rs at line 185.

Signature: pub fn open_url(_url: &str) -> Result<()> {

What it does: Function open_url takes _url: &str and gives back Result<()>.

(Where these words came from: signature.)


function — store

Found in crates/gl2-credman/src/lib.rs at line 190.

Signature: pub fn store(target: &str, blob: &[u8]) -> Result<()> { win::store(target, blob) }

What it does: Function store takes target: &str, blob: &[u8] and gives back Result<()>.

(Where these words came from: signature.)


function — read

Found in crates/gl2-credman/src/lib.rs at line 191.

Signature: pub fn read(target: &str) -> Result<Option<Vec<u8>>> { win::read(target) }

What it does: Function read takes target: &str and gives back Result<Option<Vec<u8>>>.

(Where these words came from: signature.)


function — delete

Found in crates/gl2-credman/src/lib.rs at line 192.

Signature: pub fn delete(target: &str) -> Result<()> { win::delete(target) }

What it does: Function delete takes target: &str and gives back Result<()>.

(Where these words came from: signature.)


function — open_url

Found in crates/gl2-credman/src/lib.rs at line 193.

Signature: pub fn open_url(url: &str) -> Result<()> { win::open_url(url) }

What it does: Function open_url takes url: &str and gives back Result<()>.

(Where these words came from: signature.)


struct — DataPanel

Found in crates/phextron-dash/src/data.rs at line 525.

Signature: pub struct DataPanel;

What it does: A data shape named DataPanel. The scanner did not read its fields.

(Where these words came from: signature.)


struct — JenkinsPanel

Found in crates/phextron-dash/src/jenkins.rs at line 350.

Signature: pub struct JenkinsPanel;

What it does: A data shape named JenkinsPanel. The scanner did not read its fields.

(Where these words came from: signature.)


entry point — main

Found in crates/phextron-dash/src/main.rs at line 140.

Signature: fn main() {

What it does: The entry point: the program starts here. It reads the command line and runs the command the user named.

(Where these words came from: signature.)


struct — NodesPanel

Found in crates/phextron-dash/src/nodes.rs at line 85.

Signature: pub struct NodesPanel;

What it does: A data shape named NodesPanel. The scanner did not read its fields.

(Where these words came from: signature.)


enum — PanelState

Found in crates/phextron-dash/src/panels.rs at line 14.

Signature: pub enum PanelState {

What it does: A named choice named PanelState. It is one of: Live; Recon; Degraded.

(Where these words came from: signature.)


function — PanelState::as_str

Found in crates/phextron-dash/src/panels.rs at line 21.

Signature: pub fn as_str(&self) -> &'static str {

What it does: Function PanelState::as_str takes no inputs beyond the value it is called on, and gives back &'static str.

(Where these words came from: signature.)


struct — SourceInfo

Found in crates/phextron-dash/src/panels.rs at line 33.

Signature: pub struct SourceInfo {

What it does: Where a panel's data comes from, stated on the panel itself. freshness is a human line computed by the reader at request time (e.g. "pull file updated 42s ago"), never a copied timestamp alone.

(Where these words came from: doc comment.)


struct — PanelData

Found in crates/phextron-dash/src/panels.rs at line 39.

Signature: pub struct PanelData {

What it does: A data shape named PanelData. Its fields are: pub id: &'static str; pub title: &'static str; pub state: PanelState; pub source: SourceInfo; pub body: Value.

(Where these words came from: signature.)


function — PanelData::to_json

Found in crates/phextron-dash/src/panels.rs at line 48.

Signature: pub fn to_json(&self) -> Value {

What it does: Function PanelData::to_json takes no inputs beyond the value it is called on, and gives back Value.

(Where these words came from: signature.)


trait — Panel

Found in crates/phextron-dash/src/panels.rs at line 63.

Signature: pub trait Panel: Send + Sync {

What it does: A trait named Panel: a set of methods that a type can promise to give.

(Where these words came from: signature.)


function — registry

Found in crates/phextron-dash/src/panels.rs at line 75.

Signature: pub fn registry() -> Vec<Box<dyn Panel>> {

What it does: The five domains of Will's 2026-11-21 directive, in shell order, plus the Data panel (stash task 25.7.9/8.7.10/7.7.10): Phextron's visibility into everywhere Will has stashed data, read from the stash.phext census register — and the Substrates panel (W4 plan §1.10, task 31.8.11/9.7.13/8.7.10): per-substrate dispatched-work and budget-check coverage against the reset-window clock.

(Where these words came from: doc comment.)


struct — PendingPanel

Found in crates/phextron-dash/src/pending.rs at line 12.

Signature: pub struct PendingPanel {

What it does: A data shape named PendingPanel. The scanner did not read its fields.

(Where these words came from: signature.)


function — PendingPanel::cloud

Found in crates/phextron-dash/src/pending.rs at line 23.

Signature: pub fn cloud() -> Self {

What it does: Function PendingPanel::cloud takes no inputs beyond the value it is called on, and gives back Self.

(Where these words came from: signature.)


struct — PhextsPanel

Found in crates/phextron-dash/src/phexts.rs at line 275.

Signature: pub struct PhextsPanel;

What it does: A data shape named PhextsPanel. The scanner did not read its fields.

(Where these words came from: signature.)


struct — SubstratesPanel

Found in crates/phextron-dash/src/substrates.rs at line 693.

Signature: pub struct SubstratesPanel;

What it does: A data shape named SubstratesPanel. The scanner did not read its fields.

(Where these words came from: signature.)


struct — VideoPanel

Found in crates/phextron-dash/src/video.rs at line 427.

Signature: pub struct VideoPanel;

What it does: A data shape named VideoPanel. The scanner did not read its fields.

(Where these words came from: signature.)


function — append_scroll

Found in crates/phextron-dash/tools/mark-substrate-check.py at line 84.

Signature: def append_scroll(path: Path, scroll: str) -> int:

What it does: Append one scroll; returns its 1-based scroll index (so the

(Where these words came from: doc comment.)


function — init_register

Found in crates/phextron-dash/tools/mark-substrate-check.py at line 99.

Signature: def init_register(path: Path) -> None:

What it does: Function init_register takes path: Path and gives back None:.

(Where these words came from: signature.)


function — main

Found in crates/phextron-dash/tools/mark-substrate-check.py at line 108.

Signature: def main() -> int:

What it does: Function main takes no inputs beyond the value it is called on, and gives back int:.

(Where these words came from: signature.)


enum — Json

Found in crates/phextron-web/src/json.rs at line 18.

Signature: pub enum Json {

What it does: A parsed JSON value. Objects keep insertion order (the console's renderers iterate fixed key lists, so order is cosmetic, but fidelity costs nothing). Numbers keep their raw lexeme for storage; display renders them the way the desktop shell's JS does — through the numeric value, JS-style (8.0 shows as 8) — and arithmetic parses on demand.

(Where these words came from: doc comment.)


function — Json::get

Found in crates/phextron-web/src/json.rs at line 28.

Signature: pub fn get(&self, key: &str) -> Option<&Json> {

What it does: Function Json::get takes &self, key: &str and gives back Option<&Json>.

(Where these words came from: signature.)


function — as_str

Found in crates/phextron-web/src/json.rs at line 35.

Signature: pub fn as_str(&self) -> Option<&str> {

What it does: Function as_str takes no inputs beyond the value it is called on, and gives back Option<&str>.

(Where these words came from: signature.)


function — as_bool

Found in crates/phextron-web/src/json.rs at line 42.

Signature: pub fn as_bool(&self) -> Option<bool> {

What it does: Function as_bool takes no inputs beyond the value it is called on, and gives back Option<bool>.

(Where these words came from: signature.)


function — as_f64

Found in crates/phextron-web/src/json.rs at line 49.

Signature: pub fn as_f64(&self) -> Option<f64> {

What it does: Function as_f64 takes no inputs beyond the value it is called on, and gives back Option<f64>.

(Where these words came from: signature.)


function — as_arr

Found in crates/phextron-web/src/json.rs at line 56.

Signature: pub fn as_arr(&self) -> Option<&[Json]> {

What it does: Function as_arr takes no inputs beyond the value it is called on, and gives back Option<&[Json]>.

(Where these words came from: signature.)


function — is_null

Found in crates/phextron-web/src/json.rs at line 63.

Signature: pub fn is_null(&self) -> bool {

What it does: Function is_null takes no inputs beyond the value it is called on, and gives back bool.

(Where these words came from: signature.)


function — missing_or_null

Found in crates/phextron-web/src/json.rs at line 69.

Signature: pub fn missing_or_null(&self, key: &str) -> bool {

What it does: True when the key is absent or explicitly null — the renderers treat both as "no value" (the JS shell's v === null || v === undefined).

(Where these words came from: doc comment.)


function — display

Found in crates/phextron-web/src/json.rs at line 84.

Signature: pub fn display(&self) -> String {

What it does: Display form, mirroring what the desktop shell's JS produces when it stringifies a JSON value into HTML: strings as themselves, booleans as true/false, null as empty (callers substitute the em dash where the JS does). Numbers go through their f64 value, because the JS shell stringifies the parsed number, not the wire lexeme: the server emits 8.0, JSON.parse makes it 8, and the shell shows 8 — so the WASM renderer shows 8 too. (Rust's {} for f64 is the same shortest-round-trip form JS uses at panel magnitudes.)

(Where these words came from: doc comment.)


function — parse

Found in crates/phextron-web/src/json.rs at line 315.

Signature: pub fn parse(input: &str) -> Result<Json, String> {

What it does: Parse a complete JSON document; trailing non-whitespace is an error.

(Where these words came from: doc comment.)


function — render_panel_json

Found in crates/phextron-web/src/lib.rs at line 29.

Signature: pub fn render_panel_json(input: &str) -> String {

What it does: Render one panel JSON document (the exact bytes /api/panels/<id> serves) to HTML. Parse failures render an error card — the web UI names its failures on its face, like every other Phextron surface.

(Where these words came from: doc comment.)


function — esc

Found in crates/phextron-web/src/render.rs at line 17.

Signature: pub fn esc(s: &str) -> String {

What it does: The shell's esc(): HTML-escape a display string.

(Where these words came from: doc comment.)


function — render_panel

Found in crates/phextron-web/src/render.rs at line 218.

Signature: pub fn render_panel(d: &Json) -> String {

What it does: Render one panel's JSON (the exact document /api/panels/<id> serves) to the HTML the shell places in its panel element.

(Where these words came from: doc comment.)


Provenance

This documentation is produced for the export repo wbic16/phdoc (its chain of record lives at docs/phextron/chain.phext) and for the doc site https://docs.phext.io. Both targets are the project's own configuration, held in its .phdoc.json as "export-repo" and "doc-site"; when a project does not name them, the defaults are wbic16/phdoc and https://docs.phext.io.

Historical reference · chain.phext · latest.md