skillsync

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, run RunContext) error

Process publishes created/updated Skills and restores deleted Skills locally.

type Publisher

type Publisher interface {
	Publish(context.Context, string, any) error
}

Publisher is the narrow message capability required by Skill synchronization.

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

func (r *Repository) Changes(ctx context.Context) ([]Change, []string, error)

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) Ensure

func (r *Repository) Ensure(ctx context.Context) error

Ensure initializes the dedicated repository and commits existing content as a baseline.

func (*Repository) Restore

func (r *Repository) Restore(ctx context.Context, code string) error

Restore precisely returns one Skill to the committed baseline.

func (*Repository) Root

func (r *Repository) Root() string

Root returns the managed Skill repository root.

type RunContext

type RunContext struct {
	RunID     string
	ProjectID uint
	ActorUIN  uint
}

RunContext carries only the business identifiers needed for Skill publication.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL