-
-
Notifications
You must be signed in to change notification settings - Fork 0
SkillsSynchronizer
Synchronizes Fast Forward skills into consumer repositories.
This class manages the creation and maintenance of symlinks from a consumer repository to the skills packaged within the fast-forward/dev-tools dependency. It handles initial sync, idempotent re-runs, and cleanup of broken links.
- Full name:
\FastForward\DevTools\Agent\Skills\SkillsSynchronizer - This class is marked as final and can't be subclassed
- This class implements:
LoggerAwareInterface - This class is a Final class
Initializes the synchronizer with a filesystem and finder instance.
public __construct(\Symfony\Component\Filesystem\Filesystem $filesystem, \Symfony\Component\Finder\Finder $finder, \Psr\Log\LoggerInterface $logger): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$filesystem |
\Symfony\Component\Filesystem\Filesystem | Filesystem instance for file operations |
$finder |
\Symfony\Component\Finder\Finder | Finder instance for locating skill directories in the package |
$logger |
\Psr\Log\LoggerInterface | Logger for recording synchronization actions and decisions |
{@inheritDoc}
public setLogger(\Psr\Log\LoggerInterface $logger): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$logger |
\Psr\Log\LoggerInterface |
Synchronizes skills from the package to the consumer repository.
public synchronize(string $skillsDir, string $packageSkillsPath): \FastForward\DevTools\Agent\Skills\SynchronizeResultEnsures the consumer repository contains linked Fast Forward skills by creating symlinks to the packaged skills directory. Creates the target directory if missing, skips existing valid links, and repairs broken ones.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$skillsDir |
string | Absolute path to the consumer's .agents/skills directory |
$packageSkillsPath |
string | Absolute path to the packaged skills in the dependency |
Return Value:
Result containing counts of created, preserved, and removed links