Expand description
daemon spawn — launcher + resident foreground daemon.
Launcher (foreground unset/false): the exact lock flow api spawn
/ viewer spawn use — try_read the lock, re-exec this cli as the
foreground daemon if it isn’t held, re-check on child exit.
Foreground (foreground:true): the resident daemon. Under a blocking
init gate it binds the broadcast WebSocket listener and acquires the
singleton lock (publishing the client-connect ws:// URL as the lock
content, like objectiveai-api publishes its http:// URL), brings
up the [crate::websockets::daemon_stream] hub (/listen broadcast +
/execute in-process runner + fixed-name producer socket), then launches
every daemon: true plugin via the SHARED plugin executor
(plugins::run::execute) as <exec> daemon begin — so each resident
plugin gets the full bidirectional protocol (it can execute nested
commands, exactly like plugins run and the conduit’s mcp begin).
The plugins are leashed to this process; if any exits, the whole
daemon exits (and the OS releases the lock).
Modules§
Functions§
- execute
- spawn
- Ensure the resident daemon is up, returning its published lock
content. Mirrors
crate::command::viewer::spawn::spawn: re-execs THIS cli as the foreground daemon via the sharedspawn_until_lock_publishedhelper.