fix(apps): make agent bundling mandatory in the copilot apps skill

The skill treated mirroring the bg-task into agents/<slug>.yaml as
optional ('if the app should ship the agent'), so the copilot built
agent-backed apps (e.g. pr-dashboard) with the refresher as a loose
personal bg-task only. Publishing such an app ships a dead UI: data/
is user state and never packaged, and installers get no agent.

Bundling is now a required step with the failure mode spelled out.
This commit is contained in:
Gagan 2026-07-07 13:42:29 +05:30
parent 2435e9ab22
commit a9a47e5a28

View file

@ -143,9 +143,16 @@ shell**; never generate a refresh script) and store it via the
**\`app-set-data\`** builtin: \`{ appFolder, file: "data.json", data: <object> }\`
pass the object directly, never \`JSON.stringify\` it. The write is atomic and
contract-checked; on a failed fetch keep the last good data (never overwrite
good series with empties). If the app should ship the agent, mirror the
definition into \`agents/<slug>.yaml\` with ONLY \`name\`, \`instructions\`,
\`triggers\`, and list the filename in \`manifest.agents\`.
good series with empties).
**ALWAYS bundle the agent into the app as well** (required, not optional):
mirror the definition into \`agents/<slug>.yaml\` with ONLY \`name\`,
\`instructions\`, \`triggers\` (no \`active\`, no \`model\` — the schema rejects
them) and list the filename in \`manifest.agents\`. The app package ships only
what's inside the app folder: without this mirror, a published copy of the app
is dead on arrival installers get a UI whose data never refreshes. The
bundled copy materializes as a disabled bg-task for installers (they opt in);
the \`create-background-task\` task you made stays the author's live agent.
## 6. Prohibitions