feat(02-03): add 7 skill IPC channels with Zod schemas and register handlers

- Add importSkill, listSkills, getSkillDetail, deleteSkill, assignSkillToAgent, removeSkillFromAgent, checkSkillUpdate IPC channels
- Add Zod validation schemas for all skill payloads in contracts.ts
- Create ipc-skill-handlers.ts with company existence checks and domain-changed events on mutations
- Add SkillRecord, SkillImportResult, SkillUpdateStatus types to shared/types.ts
- Wire registerSkillHandlers into ipc-domain-handlers.ts
- Add skillService to RegisterDomainHandlersDependencies interface
This commit is contained in:
ZacharyZhang-NY committed 2026-03-26 00:45:03 -04:00
1 parent c9111d2f6d
commit b5ad164338
5 files changed
+225 -1

No files matched your search

+46
View File
@@ -453,6 +453,52 @@ export interface OnboardingBootstrapResult {
runId: string | null;
}
// ---------------------------------------------------------------------------
// Skill system types (mirrored from main/skill-types.ts for IPC boundary)
// ---------------------------------------------------------------------------
export type SkillSourceType = "github" | "local_path" | "url" | "skills_sh" | "managed";
export type TrustLevel = "markdown_only" | "assets" | "scripts_executables";
export interface FileInventoryEntry {
path: string;
kind: "skill" | "reference" | "script" | "asset" | "markdown" | "other";
}
export interface SkillRecord {
id: string;
companyId: string;
key: string;
slug: string;
name: string;
description: string | null;
markdown: string;
sourceType: SkillSourceType;
sourceLocator: string | null;
sourceRef: string | null;
trustLevel: TrustLevel;
compatibility: string;
fileInventory: FileInventoryEntry[];
metadata: Record<string, unknown> | null;
createdAt: string;
updatedAt: string;
}
export interface SkillImportResult {
skillId: string;
key: string;
name: string;
isUpdate: boolean;
}
export interface SkillUpdateStatus {
skillId: string;
key: string;
currentRef: string | null;
latestRef: string | null;
hasUpdate: boolean;
}
export type SocialPlatform = "twitter" | "linkedin" | "instagram" | "facebook" | "reddit" | "youtube" | "tiktok" | "bluesky" | "other";
export type SocialAccountStatus = "active" | "logged_in" | "login_required" | "suspended" | "paused";
export type BrowserActionType = "post" | "reply" | "like" | "follow" | "browse_feed" | "screenshot" | "navigate" | "search";