Function: validateSkillScope()
Makaio Framework / contracts / validateSkillScope
Function: validateSkillScope()
Section titled “Function: validateSkillScope()”validateSkillScope(
skill):void
Defined in: ../../../packages/contracts/src/skill/storage-namespace.ts:49
Validate scope invariants for a database-backed skill.
Invariants:
global: noprojectId, nosessionIdproject: requiresprojectId, nosessionIdsession: requiressessionId,projectIdoptional for context
Parameters
Section titled “Parameters”Skill input about to be persisted
activationMode
Section titled “activationMode”"manual" | "auto" = ...
adapters?
Section titled “adapters?”string[] | null = ...
allowedTools?
Section titled “allowedTools?”string = ...
category?
Section titled “category?”string = ...
compatibility?
Section titled “compatibility?”string = ...
content
Section titled “content”string = ...
description
Section titled “description”string = ...
enabled
Section titled “enabled”boolean = ...
string = ...
license?
Section titled “license?”string = ...
metadata?
Section titled “metadata?”Record<string, string> = ...
string = ...
projectId?
Section titled “projectId?”string = ...
reinjection?
Section titled “reinjection?”{ maxTurns?: number; } = ...
reinjection.maxTurns?
Section titled “reinjection.maxTurns?”number = ...
"session" | "global" | "project" = SkillScopeSchema
sessionId?
Section titled “sessionId?”string = ...
source
Section titled “source”"database" = ...
string[] = ...
Returns
Section titled “Returns”void
Throws
Section titled “Throws”Error when the scope fields do not match the declared scope