Expand description
Template rendering for one server and client with secret delivery (SPEC
11.2, 11.4): path variables become paths, and each value holding
references is written in the mode Policy::choose picks:
env: the client’s own variable syntax (${NAME},${env:NAME}), or a forwarded variable name (Codex);launch: the key leaves the entry’senv, and the entry startssurject exec --ref KEY=REF ... -- <command> <args>instead;command: omp and Pi get!<surjection> secret get --ref REF, Claude Code gets oneheadersHelperrunning<surjection> secret-header;inline: the resolved value, kept for masking in diffs.
Command templates mark a value with {secret:KEY}, bound by --ref KEY=REF: no $, % or !, so neither a client nor a shell expands it.
Structs§
- Render
Env - What rendering reads: Surjection’s environment (paths, inline
env:values), the catalog and this machine’s providers. - Renderer
- Renders the values of one server for one client.
Enums§
- EnvValue
- A stdio
envvalue as written. - Header
Value - A header value as written.
- Spell
- One part of a value spelled in a client’s own variable syntax
(
spell).
Constants§
- PLACEHOLDER
- The placeholder opening of a bound value in command templates.
Functions§
- fill_
template - Renders a command template: each
{secret:KEY}becomesvalues[KEY]. Fails on a placeholder with no value or an unterminated one. - parse_
binding KEY=REFas given tosurject exec,secret getandsecret-header: the key is a variable name, the reference a provider reference.- shell_
quote - One argument of a command line run through the client’s shell: single
quotes on Unix; double quotes on Windows. Which shell a Windows client
uses (
cmd.exe, or a POSIX shell such as Git Bash) is not settled (scripts/verify-clients.mdDX-6, DX-7), so only text both read the same inside double quotes passes:",%,$, a backtick, a line break and a trailing backslash are refused. - spell
piecesasclientwrites them infield(SPEC 11.4envdelivery): each variable in the client’s syntax, literal text escaped where the client has an escape (Pi) and refused where the client would expand part of it.delivery_unavailablewhen the client does not expand variables infield.