forked from farhoodlabs/paperclip
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:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user