feat(skill-catalog-subscription): synced catalog + HTTP sync + MCP tools
Consumes the external Subscription Platform as source of truth for skill content; reuses skills_learning domain models (extended with KnowledgeSkill) and workflow.skill_exec resolver. HTTP/MCP deps land in api/ per CONSTITUTION.md; synced skills use a physically separate SQLite file (tasks/skills.sqlite3) to preserve the skill-authoring capability boundary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,27 @@ class FlowTemplateSkill(Skill):
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class KnowledgeSkill(Skill):
|
||||
content: str = ""
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
return {
|
||||
**self.metadata.to_dict(),
|
||||
"content": self.content,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: dict[str, Any]) -> "KnowledgeSkill":
|
||||
return cls(
|
||||
metadata=SkillMetadata.from_dict(data),
|
||||
content=str(data.get("content") or ""),
|
||||
)
|
||||
|
||||
def with_metadata(self, **changes: Any) -> "KnowledgeSkill":
|
||||
return replace(self, metadata=replace(self.metadata, **changes))
|
||||
|
||||
|
||||
def skill_embedding_text(skill: FlowTemplateSkill) -> str:
|
||||
goal = skill.originating_goal or ""
|
||||
return f"{skill.name}: {skill.description}\nOriginal goal: {goal}"
|
||||
|
||||
Reference in New Issue
Block a user