(s: {
id: string
name: string
description: string
content: string
createdAt: Date
})
| 692 | * Serialize a skill for VFS agent/skills/{name}.json |
| 693 | */ |
| 694 | export function serializeSkill(s: { |
| 695 | id: string |
| 696 | name: string |
| 697 | description: string |
| 698 | content: string |
| 699 | createdAt: Date |
| 700 | }): string { |
| 701 | return JSON.stringify( |
| 702 | { |
| 703 | id: s.id, |
| 704 | name: s.name, |
| 705 | description: s.description, |
| 706 | contentPreview: truncate(s.content, 500), |
| 707 | createdAt: s.createdAt.toISOString(), |
| 708 | }, |
| 709 | null, |
| 710 | 2 |
| 711 | ) |
| 712 | } |
| 713 | |
| 714 | /** |
| 715 | * Serialize an integration/tool schema for VFS components/integrations/{service}/{operation}.json |
no test coverage detected