Expand description
What a pasted or typed server is (#47, the Add dialog and surject server add <URL> / -- <COMMAND...>): an address, a config snippet, a
command line, a repository or a folder; the transport an address
suggests; the clients a new server is enabled for by default; and the
entries client files already hold for the same address or command (the
dialog offers Import instead).
Analysis reads no network and runs nothing; the folder check only asks whether the path is a directory.
Modules§
- suggest
- Server id suggestions (#47): one slug rule for the app’s Add dialog,
surject server add <URL>andsurject server add -- <COMMAND...>, so both suggest the same id for the same input.
Structs§
- Analysis
- The result of
analyze. - Existing
Entry - A client entry Surjection does not manage that runs the same server.
Enums§
Functions§
- analyze
- Reads
text(see the module docs). The order: an address (a repository when it names one), a folder, a snippet, a command line. - default_
clients - The clients a new server with
transportis enabled for by default: the onesall-detectedselects here (detected or forced on inclients.toml, with an MCP config Surjection writes on this OS, able to run the transport), minus clients this machine excludes. In table order. Read-only; no store is fine. - default_
clients_ in default_clientsfor a desired state already loaded.- existing_
entries - The entries not managed by Surjection (the import scan of user files
and known projects) that run
launch: the same address (scheme and host case, a trailing/ignored), or the same program (its name, sonpxandC:\...\npx.cmdmatch;cmd /cunwrapped) with the same arguments. Read-only. - looks_
like_ command - Whether
argvstarts a local server: its program is a known runner ([RUNNERS]) or a path to a program. - repository_
url textas a repository address:git@host:owner/repo,ssh://andgit://addresses, an address ending in.git, orhttps://<forge>/<owner>/<repo>[/tree/...]on a known forge.- split_
command - A one-line command as words: whitespace separates,
"..."and'...'group (quotes removed). A backslash is an ordinary character, so Windows paths stay whole. A leading$or>prompt is dropped.Nonefor empty text or an unclosed quote. - transport_
from_ url - The transport an address suggests:
ssewhen its path ends in/sse, else Streamable HTTP.