Q35: retired built-in skills come back when the bundle ships them again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
da072f9a9b
commit
bbc60cd56a
4 files changed
+47
-9
No files matched your search
@@ -83,6 +83,24 @@ export class SkillService {
|
||||
return retired;
|
||||
}
|
||||
|
||||
/** Reactivates a retired skill; returns whether it was retired. */
|
||||
restoreIfRetired(orgId: string, slug: string): boolean {
|
||||
const skill = this.db.prepare("select id from skill_definitions where org_id = ? and slug = ? and status = 'retired'")
|
||||
.get(orgId, slug) as { id: string } | undefined;
|
||||
if (!skill) return false;
|
||||
this.db.prepare("update skill_definitions set status = 'active' where id = ?").run(skill.id);
|
||||
this.audit.record({
|
||||
orgId,
|
||||
entityType: "skill_definition",
|
||||
entityId: skill.id,
|
||||
actorType: "system",
|
||||
actorId: null,
|
||||
action: "restored",
|
||||
payload: { slug, reason: "back_in_builtin_bundle" },
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Publishes a new revision when the files changed and moves bindings on the latest revision onto it. */
|
||||
upgradeIfChanged(orgId: string, directoryPath: string, manifest: SkillManifest, slug: string): boolean {
|
||||
const latest = this.db.prepare(`
|
||||
|
||||
Reference in new issue
Block a user