Add unmanaged skill provenance to agent skills

Expose adapter-discovered user-installed skills with provenance metadata, share persistent skill snapshot classification across local adapters, and render unmanaged skills as a read-only section in the agent skills UI.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-18 14:21:50 -05:00
parent 58d7f59477
commit cfc53bf96b
19 changed files with 497 additions and 501 deletions
+11
View File
@@ -1,3 +1,5 @@
import type { AgentSkillEntry } from "@paperclipai/shared";
export interface AgentSkillDraftState {
draft: string[];
lastSaved: string[];
@@ -27,3 +29,12 @@ export function applyAgentSkillSnapshot(
shouldSkipAutosave: shouldReplaceDraft,
};
}
export function isReadOnlyUnmanagedSkillEntry(
entry: AgentSkillEntry,
companySkillKeys: Set<string>,
): boolean {
if (companySkillKeys.has(entry.key)) return false;
if (entry.origin === "user_installed" || entry.origin === "external_unknown") return true;
return entry.managed === false && entry.state === "external";
}