Skip to main content

Module boot

Module boot 

Source
Expand description

The boot the server runs: the config dir, the workspace, the subsystem wave, the socket, and the boot spawn.

Moved here from the view’s main.rs so the core comes up under one function for a view and for no view alike, and so no view’s removal can take the boot with it.

Re-exports§

use std::path::Path; 🔒
use std::path::PathBuf; 🔒
use std::sync::Arc; 🔒
use forge_workspace::Workspace; 🔒

Structs§

PanicRecord 🔒
One panic, as the hook records it.

Enums§

SocketServing
What serve_socket did.

Constants§

BOOT_WAVE_WAIT
How long the boot wave holds for the accounts and the listener before it fires anyway.

Functions§

install_browser 🔒
A platform with no CEF host: the browser tools answer the no-host refusal rather than a server that pretends to have a fleet.
install_crypto_provider 🔒
Install the process-level rustls crypto provider, before anything can build a TLS client.
install_line 🔒
The line an install gets, or None when it changed nothing.
install_panic_hook
Install the process-wide panic hook, once.
install_shipped_skills 🔒
Install the skills forge ships into the config dir.
panic_record 🔒
The record one panic writes: the thread, the payload as a string, the file and line, and the backtrace when RUST_BACKTRACE is set.
resolve_config_dir
Resolve the Claude config directory at the boot boundary: honour $CLAUDE_CONFIG_DIR (ignoring empty values), else fall back to $HOME/.claude. After this point, the resolved path is threaded as a typed PathBuf (via Workspace::new, which in turn binds each Agent::spawn(config_dir) to its account’s path).
serve_socket
Serve the socket on the address [server] names, registering the serve task with the workspace’s supervisor and returning whether one is serving.
skill_failure_consequence 🔒
What a failed install leaves behind, per skill.
skill_install_failed_event 🔒
skill_installed_event 🔒
The log event names stay per-skill: handoff’s pair is the one existing traces and greps know, and a new skill gets its own rather than being folded into handoff’s line.
start_boot_wave
The boot spawn, for a process with no view: hold until the accounts settle, then dispatch the wave a view’s connect path dispatches - the named project’s lead, or every project whose lead row was left open, in forge.toml order. A seat whose last turn was cut off carries the restart note; a parked one is resumed with nothing.
start_config_watch 🔒
Watch forge.toml for the process’s life and apply each valid edit.
start_core
Build the workspace and start the whole subsystem wave, in the order the boot has always started it.
start_subsystems 🔒
The subsystem wave the boot starts, in the order it has always started it.
stop_result
The stop’s exit: a teardown that did not finish every session leaves a process tree behind, and a supervisor must be able to tell that from a clean stop.
wait_for_accounts 🔒
Hold until the accounts and the listener are ready, or timeout passes.