PromptRunner.PathRewriter (PromptRunnerSDK v0.11.0)

Copy Markdown View Source

Rebinds source-checkout paths in packet text to logical workspace paths.

Packet prose is durable input and often contains absolute paths copied from the author's machine. A workspace must never pass those paths through to a provider: doing so can send an operator session back into another user's checkout. Replacements are longest-first so nested repository roots remain deterministic.

Summary

Functions

deep(value, rewrites)

@spec deep(term(), %{optional(String.t()) => String.t()}) :: term()

text(value, rewrites)

@spec text(term(), %{optional(String.t()) => String.t()}) :: term()