Documentation
¶
Index ¶
- func AtomicReplaceDir(src, dest string) error
- func AtomicWriteFile(path string, data []byte, perm os.FileMode) error
- func Download(ctx context.Context, client *http.Client, url, destPath string) error
- func ExtractTarGz(archivePath, destDir string) error
- func ExtractZip(archivePath, destDir string) error
- func GenerateLarkSkill(sourceSkillsDir, destDir, sourceRef string) error
- func GitHubReleaseAssetURL(repo, tag, file string) string
- func SyncEmbeddedTools(ctx context.Context, cfg Config) error
- func SyncSystemSkills(ctx context.Context, cfg Config) error
- type Config
- type SkillSyncFunc
- type Syncer
- type ToolSyncFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicReplaceDir ¶
AtomicReplaceDir swaps dest with src by renaming src into place. If dest already exists, it is first moved aside and restored if the final rename fails. src must already exist on the same filesystem as dest.
func AtomicWriteFile ¶
AtomicWriteFile writes content to path via a temp file in the same directory.
func ExtractTarGz ¶
ExtractTarGz extracts a .tar.gz archive into destDir.
func ExtractZip ¶
ExtractZip extracts a .zip archive into destDir.
func GenerateLarkSkill ¶
func GitHubReleaseAssetURL ¶
GitHubReleaseAssetURL builds the direct release asset URL for repo/tag/file.
func SyncEmbeddedTools ¶
SyncEmbeddedTools downloads and stores the embedded third-party binaries for the target platform. Downloads are integrity-checked only by HTTPS + GitHub's own release infrastructure; no additional SHA256 manifest is verified. This is acceptable for a dev-time build tool but should be revisited if this path ever runs with write access to a production artifact store.
Types ¶
type Config ¶
type Config struct {
WorkDir string
SyncSkills bool
SyncTools bool
GOOS string
GOARCH string
LarkRef string
}
Config describes one pre-build third-party dependency sync run.
func (Config) Normalized ¶
Normalized returns a copy with runtime defaults filled in.
type SkillSyncFunc ¶
SkillSyncFunc performs host-side skill synchronization.
type Syncer ¶
type Syncer struct {
SyncSkills SkillSyncFunc
SyncTools ToolSyncFunc
}
Syncer orchestrates pre-build dependency sync phases.