Relationships
#4649 Let a type mark a method argument as data, and read an input file's content as data
Opened by skunk-ape · 11/11/2026· Shipped 11/11/2026
Summary
Let a type mark a method argument as data, so --input values for it are never evaluated as expressions.
Problem
swamp behavior run --input values are operator-written and evaluated (design/primitives/behaviors.md, "Inputs are operator-written"); --literal-inputs makes them data, but only when every caller remembers to pass it.
Some types take text an agent wrote, not operator configuration. @swamp/stagecraft's record_artifact / record_evidence / record_checkpoint take a payload that is a plan, review or result written by an agent. When that text mentions a resolvable ${{ vault.get(...) }}:
- swamp resolves it and hands the method the secret value;
- the method hashes the payload it received (stagecraft records that digest in its run record);
- swamp's data writer redacts the secret to
***on persist (redactOutsideVaultReferences, src/domain/models/data_writer.ts); - the stored bytes no longer match the method's view, and stagecraft reports the artifact as changed outside the runtime (swamp-club#4596).
The secret is never persisted or printed, but the method holds it in memory and the text the author wrote is lost.
Proposal
- A method-argument schema marker, e.g.
.meta({ data: true }), that makes a value supplied for that argument data in every route (--input,--input-file,--stdin, serve, workflow step inputs), exactly as under--literal-inputs. Expression text in such a field would be passed to the method verbatim. - A way to read one input from a file as data. Today
--input key=@pathreads the file but evaluates its content, and--literal-inputsstops evaluation but also stops@being read, so there is no single-input "this file's content is data" route. File content is never something the operator typed, so it arguably should not be evaluated at all. Options: let@pathkeep reading the file under--literal-inputs(content as data), make@pathcontent data by default, or add an explicit form such as--input-data key=<path>. It must work overswamp serve, where the CLI reads the file on the client.
Stagecraft's case: a subagent writes its product to a result file, and the driver records it with --input payload=@<result-path>. Under the current rules that content is evaluated, so stagecraft is switching to having the subagent write a whole input file ({"name":...,"payload":{...}}) recorded with --literal-inputs --input-file. Item 2 would let it go back to recording the bare result file.
Why not only --literal-inputs (item 1)
It is per-invocation: every agent skill, driver and script must pass it, and forgetting it fails quietly until a reference happens to resolve. A type knows which of its arguments are data; it should be able to say so once.
Context
Found triaging swamp-club#4596 (stagecraft). Stagecraft is fixing its own side (skill passes --literal-inputs; subagents write input files; engine refuses a payload swamp redacted on write).
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.