Add adapter skill sync for codex and claude

This commit is contained in:
Dotta
2026-03-13 22:49:42 -05:00
parent 271c2b9018
commit 56a34a8f8a
22 changed files with 907 additions and 26 deletions

View File

@@ -65,6 +65,11 @@ export {
export type {
Company,
AgentSkillSyncMode,
AgentSkillState,
AgentSkillEntry,
AgentSkillSnapshot,
AgentSkillSyncRequest,
Agent,
AgentPermissions,
AgentKeyCreated,
@@ -136,6 +141,12 @@ export {
updateCompanySchema,
type CreateCompany,
type UpdateCompany,
agentSkillStateSchema,
agentSkillSyncModeSchema,
agentSkillEntrySchema,
agentSkillSnapshotSchema,
agentSkillSyncSchema,
type AgentSkillSync,
createAgentSchema,
createAgentHireSchema,
updateAgentSchema,

View File

@@ -0,0 +1,32 @@
export type AgentSkillSyncMode = "unsupported" | "persistent" | "ephemeral";
export type AgentSkillState =
| "available"
| "configured"
| "installed"
| "missing"
| "stale"
| "external";
export interface AgentSkillEntry {
name: string;
desired: boolean;
managed: boolean;
state: AgentSkillState;
sourcePath?: string | null;
targetPath?: string | null;
detail?: string | null;
}
export interface AgentSkillSnapshot {
adapterType: string;
supported: boolean;
mode: AgentSkillSyncMode;
desiredSkills: string[];
entries: AgentSkillEntry[];
warnings: string[];
}
export interface AgentSkillSyncRequest {
desiredSkills: string[];
}

View File

@@ -1,4 +1,11 @@
export type { Company } from "./company.js";
export type {
AgentSkillSyncMode,
AgentSkillState,
AgentSkillEntry,
AgentSkillSnapshot,
AgentSkillSyncRequest,
} from "./adapter-skills.js";
export type {
Agent,
AgentPermissions,

View File

@@ -0,0 +1,41 @@
import { z } from "zod";
export const agentSkillStateSchema = z.enum([
"available",
"configured",
"installed",
"missing",
"stale",
"external",
]);
export const agentSkillSyncModeSchema = z.enum([
"unsupported",
"persistent",
"ephemeral",
]);
export const agentSkillEntrySchema = z.object({
name: z.string().min(1),
desired: z.boolean(),
managed: z.boolean(),
state: agentSkillStateSchema,
sourcePath: z.string().nullable().optional(),
targetPath: z.string().nullable().optional(),
detail: z.string().nullable().optional(),
});
export const agentSkillSnapshotSchema = z.object({
adapterType: z.string().min(1),
supported: z.boolean(),
mode: agentSkillSyncModeSchema,
desiredSkills: z.array(z.string().min(1)),
entries: z.array(agentSkillEntrySchema),
warnings: z.array(z.string()),
});
export const agentSkillSyncSchema = z.object({
desiredSkills: z.array(z.string().min(1)),
});
export type AgentSkillSync = z.infer<typeof agentSkillSyncSchema>;

View File

@@ -4,6 +4,14 @@ export {
type CreateCompany,
type UpdateCompany,
} from "./company.js";
export {
agentSkillStateSchema,
agentSkillSyncModeSchema,
agentSkillEntrySchema,
agentSkillSnapshotSchema,
agentSkillSyncSchema,
type AgentSkillSync,
} from "./adapter-skills.js";
export {
portabilityIncludeSchema,
portabilitySecretRequirementSchema,