Skip to main content

create_global_skills

Function create_global_skills 

Source
fn create_global_skills(
    state: &AppState,
    parsed: &ParsedBundleImport,
    warnings: &mut Vec<String>,
    now: i64,
) -> Result<(Vec<String>, Vec<String>), String>
Expand description

Skills — global, not bound to any agent (mirrors skill.catalog.upsert’s own is_global: true convention for a shared-resource creation path). A genuine name conflict (the ONLY intentional business error skill_upsert_unique_global returns — StoreError::Other containing “already exists”) is a per-skill warning, not an aborted import. Codex P2, PR #2379: any OTHER error (locked/corrupt store, I/O failure) previously hit this same arm and was silently treated as a skip too — turning an infrastructure failure into an apparently-successful lossy import. Only the confirmed-conflict shape is swallowed; anything else aborts the whole RPC.

Returns (imported_skill_ids, skipped_skills).