Documentation
¶
Index ¶
- func SkillRepositoryLock(root string) *sync.Mutex
- type Change
- type Processor
- type Publisher
- type Repository
- func (r *Repository) Changes(ctx context.Context) ([]Change, []string, error)
- func (r *Repository) CommitInstalled(ctx context.Context, codes []string) error
- func (r *Repository) CommitInstalledLocked(ctx context.Context, codes []string) error
- func (r *Repository) CommittedInstallManifest(ctx context.Context) (*skillstate.Manifest, error)
- func (r *Repository) Ensure(ctx context.Context) error
- func (r *Repository) ImportTaskSkillDirs(ctx context.Context, sourceRoot string)
- func (r *Repository) Restore(ctx context.Context, code string) error
- func (r *Repository) RestoreAll(ctx context.Context) error
- func (r *Repository) RestoreLocked(ctx context.Context, code string) error
- func (r *Repository) Root() string
- type RunContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SkillRepositoryLock ¶ added in v0.4.1
SkillRepositoryLock returns the process-wide lock for one Skill root. Prepare and post-run synchronization share it so a reset cannot race with a project Skill installation.
Types ¶
type Change ¶
type Change struct {
Code string
Type messaging.SkillChangeType
}
Change is one top-level organization Skill changed from the committed baseline.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor publishes successful-run Skill changes without affecting Run status.
func NewProcessor ¶
func NewProcessor( orgID, workerID uint, serverAddr, authToken string, repository *Repository, publisher Publisher, ) (*Processor, error)
NewProcessor creates a worker Skill post-run processor.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository manages the dedicated Git baseline for worker organization Skills.
func NewRepository ¶
func NewRepository(root string) (*Repository, error)
NewRepository creates a repository manager for one explicit Skill root.
func (*Repository) Changes ¶
Changes returns publishable changes and separately reports local deletions.
func (*Repository) CommitInstalled ¶
func (r *Repository) CommitInstalled(ctx context.Context, codes []string) error
CommitInstalled commits server-installed Skills and the install manifest as baseline.
func (*Repository) CommitInstalledLocked ¶ added in v0.4.1
func (r *Repository) CommitInstalledLocked(ctx context.Context, codes []string) error
CommitInstalledLocked commits a baseline while the caller holds SkillRepositoryLock(r.Root()). It exists for the prepare phase, which keeps the shared lock while replacing the installed Skill and its manifest.
func (*Repository) CommittedInstallManifest ¶ added in v0.4.0
func (r *Repository) CommittedInstallManifest(ctx context.Context) (*skillstate.Manifest, error)
CommittedInstallManifest reads sync policy only from the trusted Git baseline.
func (*Repository) Ensure ¶
func (r *Repository) Ensure(ctx context.Context) error
Ensure initializes the dedicated repository and commits existing content as a baseline.
func (*Repository) ImportTaskSkillDirs ¶ added in v0.4.1
func (r *Repository) ImportTaskSkillDirs(ctx context.Context, sourceRoot string)
ImportTaskSkillDirs moves run-created directories into the persistent Skill repository. It deliberately does not validate Skill contents; validation and publication belong to Processor. Non-directory entries are left for the task-view cleanup so one unexpected entry cannot block post-run processing.
func (*Repository) Restore ¶
func (r *Repository) Restore(ctx context.Context, code string) error
Restore precisely returns one Skill to the committed baseline.
func (*Repository) RestoreAll ¶ added in v0.4.1
func (r *Repository) RestoreAll(ctx context.Context) error
RestoreAll discards Run-owned changes under the managed Skill root while preserving the Worker-synchronized .system cache. The repository lock must cover the full post-run sync so another Run cannot recreate files between restore and clean.
func (*Repository) RestoreLocked ¶ added in v0.4.1
func (r *Repository) RestoreLocked(ctx context.Context, code string) error
RestoreLocked restores one Skill while the caller holds SkillRepositoryLock(r.Root()).
func (*Repository) Root ¶
func (r *Repository) Root() string
Root returns the managed Skill repository root.