From a9a47e5a28c527850e884a63dfc0f85d2e1fc89c Mon Sep 17 00:00:00 2001 From: Gagan Date: Tue, 7 Jul 2026 13:42:29 +0530 Subject: [PATCH] fix(apps): make agent bundling mandatory in the copilot apps skill The skill treated mirroring the bg-task into agents/.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. --- .../src/application/assistant/skills/apps/skill.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/x/packages/core/src/application/assistant/skills/apps/skill.ts b/apps/x/packages/core/src/application/assistant/skills/apps/skill.ts index 593bf88f..11b75583 100644 --- a/apps/x/packages/core/src/application/assistant/skills/apps/skill.ts +++ b/apps/x/packages/core/src/application/assistant/skills/apps/skill.ts @@ -143,9 +143,16 @@ shell**; never generate a refresh script) and store it via the **\`app-set-data\`** builtin: \`{ appFolder, file: "data.json", data: }\` — 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/.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/.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