forked from farhoodlabs/paperclip
feat(skills): add dryRun flag for scan prune path
Add a `dryRun` option to the scan-projects endpoint. When true, the scan identifies which skills would be pruned and which agents would be affected, but does not delete anything or modify agent configs. The response now includes: - `pruned[]`: list of skills that would be (or were) removed, with affected agent names - `dryRun`: boolean echoed back so callers can distinguish preview results from live mutations This lets callers preview destructive prune operations before committing to them, addressing the review concern about silent deletion of production data. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -78,7 +78,9 @@ describe("company skill mutation permissions", () => {
|
||||
updated: [],
|
||||
skipped: [],
|
||||
conflicts: [],
|
||||
pruned: [],
|
||||
warnings: [],
|
||||
dryRun: false,
|
||||
});
|
||||
mockLogActivity.mockResolvedValue(undefined);
|
||||
mockAccessService.canUser.mockResolvedValue(true);
|
||||
@@ -293,9 +295,13 @@ describe("company skill mutation permissions", () => {
|
||||
updated: [],
|
||||
skipped: [],
|
||||
conflicts: [],
|
||||
pruned: [
|
||||
{ skillId: "skill-1", slug: "ghost-skill", key: "vercel-labs/agent-browser/ghost-skill", sourceLocator: "https://github.com/vercel-labs/agent-browser", affectedAgents: ["Builder"] },
|
||||
],
|
||||
warnings: [
|
||||
'Skill "ghost-skill" was removed from https://github.com/vercel-labs/agent-browser and detached from Builder.',
|
||||
],
|
||||
dryRun: false,
|
||||
});
|
||||
|
||||
const res = await request(await createApp({
|
||||
|
||||
Reference in New Issue
Block a user