@north-light/crouter 0.3.343 → 0.3.345

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -306,6 +306,10 @@ An exec leaf direct-spawns its executable (no shell) only on explicit invocation
306
306
 
307
307
  An HTTP leaf is **definition plus HTTP only**: crtr fetches its manifest, renders native help from it, and executes the declared REST mapping. There is no local binary to spawn or sandbox. It carries no exec envelope: a non-streaming 2xx body is the bare result object checked against the declared `output`; a non-2xx body uses `{"error":{"code","message","field?","next?"}}`; an invalid 2xx body or an ill-formed or HTTP-reserved non-2xx error code becomes `cli_protocol_error`, while a missing or malformed non-2xx envelope becomes `cli_http_error`. Declared timeouts, bearer-token handling, and NDJSON stream relay apply.
308
308
 
309
+ ### Context for displayed files
310
+
311
+ When a local command displays file contents, call `crtr sys context expose -h`, then invoke that leaf with `--json` for the displayed files. Accept `content` only when the subprocess exits 0 and stdout parses as an object; otherwise discard its stdout and write the structured error to stderr. Put a returned block in the same prose output as the displayed files. An envelope-producing plugin captures it in a declared prose output field, never ahead of its JSON envelope. HTTP-only services do not gain local file or node access through this feature.
312
+
309
313
  ### Exec protocol
310
314
 
311
315
  For an exec leaf, crtr writes exactly one JSON request to the executable's stdin: