Summary
The reusable GenPage CLI wrapper was fixed in #565 to pass prompt and agent-message text through --prompt-file / --agent-message-file, but the user-facing /genpage create and edit workflows still instruct the orchestrator to invoke raw pac model genpage upload with inline --prompt and --agent-message.
This leaves the main skill path exposed to the command-line quoting failures that the wrapper was created to avoid.
Live reproduction
An isolated live page deployment used the approved prompt containing an ASCII-quoted multiword page name:
Create and LIVE DEPLOY one isolated generative page named "Facilities Inspection Live CK1 Overview" ...
The direct upload command failed before mutation:
Error: Not a valid command.
Parse failed on: Inspection
Current command: upload
Was it quote wrapped? No, be sure to wrap values that contain spaces.
The failure reproduced through normal PowerShell invocation and through .NET ProcessStartInfo.ArgumentList; the PAC development shim reparsed its raw command line and split the embedded ASCII-quoted text.
The same prompt parsed and deployed only after replacing the two ASCII quote characters with typographic quotes:
named “Facilities Inspection Live CK1 Overview”
The page then created, published, attached to the sitemap, packaged into the solution, downloaded, and ran successfully.
Root cause
plugins/model-apps/scripts/lib/genpage-cli.js already has the safe implementation:
- writes prompt/agent message to unique UTF-8 temp files;
- passes
--prompt-file and --agent-message-file;
- cleans the temp directory on every exit path.
However, plugins/model-apps/skills/genpage/SKILL.md Phase 6 and edit-flow.md still:
- require logging raw
pac model genpage upload;
- require inline
--prompt "<full prompt>";
- show direct PowerShell upload commands;
- bypass
makeGenpageCli().upload().
So /app-builder pages use the safe wrapper, while the standalone /genpage skill still uses the unsafe path.
Impact
- Valid prompts with quotes or other shell-sensitive content can fail deployment.
- Multi-line edit transcripts remain vulnerable to flattening/mangling on the standalone skill path.
- Agents may mutate the approved prompt to work around quoting, weakening prompt provenance.
- Behavior differs between
/app-builder and /genpage despite sharing the same upload contract.
Expected
Route standalone create/edit deployment through one script/API backed by makeGenpageCli().upload() instead of constructing raw PAC commands in Markdown.
Logging should preserve the approved prompt semantically without requiring the full sensitive/arbitrary text to be embedded as an executable shell command. Add a live-shaped Windows regression test containing:
- a multi-line prompt;
- an ASCII-quoted multiword name;
- Unicode;
- shell metacharacters;
- an update with a downloaded conversation transcript.
Related
Summary
The reusable GenPage CLI wrapper was fixed in #565 to pass prompt and agent-message text through
--prompt-file/--agent-message-file, but the user-facing/genpagecreate and edit workflows still instruct the orchestrator to invoke rawpac model genpage uploadwith inline--promptand--agent-message.This leaves the main skill path exposed to the command-line quoting failures that the wrapper was created to avoid.
Live reproduction
An isolated live page deployment used the approved prompt containing an ASCII-quoted multiword page name:
The direct upload command failed before mutation:
The failure reproduced through normal PowerShell invocation and through
.NET ProcessStartInfo.ArgumentList; the PAC development shim reparsed its raw command line and split the embedded ASCII-quoted text.The same prompt parsed and deployed only after replacing the two ASCII quote characters with typographic quotes:
The page then created, published, attached to the sitemap, packaged into the solution, downloaded, and ran successfully.
Root cause
plugins/model-apps/scripts/lib/genpage-cli.jsalready has the safe implementation:--prompt-fileand--agent-message-file;However,
plugins/model-apps/skills/genpage/SKILL.mdPhase 6 andedit-flow.mdstill:pac model genpage upload;--prompt "<full prompt>";makeGenpageCli().upload().So
/app-builderpages use the safe wrapper, while the standalone/genpageskill still uses the unsafe path.Impact
/app-builderand/genpagedespite sharing the same upload contract.Expected
Route standalone create/edit deployment through one script/API backed by
makeGenpageCli().upload()instead of constructing raw PAC commands in Markdown.Logging should preserve the approved prompt semantically without requiring the full sensitive/arbitrary text to be embedded as an executable shell command. Add a live-shaped Windows regression test containing:
Related