mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 18:10:39 +09:00
Add adapter skill sync for codex and claude
This commit is contained in:
parent
271c2b9018
commit
56a34a8f8a
22 changed files with 907 additions and 26 deletions
41
packages/shared/src/validators/adapter-skills.ts
Normal file
41
packages/shared/src/validators/adapter-skills.ts
Normal 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>;
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue