Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
44 lines
1.1 KiB
Go
44 lines
1.1 KiB
Go
package workspace
|
|
|
|
import (
|
|
"embed"
|
|
"fmt"
|
|
"io/fs"
|
|
"path/filepath"
|
|
|
|
agentservice "github.com/tutti-os/tutti/services/tuttid/service/agent"
|
|
)
|
|
|
|
//go:embed app_factory_reference/*
|
|
var appFactoryReferenceFiles embed.FS
|
|
|
|
const appFactoryReferenceRoot = "app_factory_reference"
|
|
|
|
func appFactoryReferenceSkillBundle() (agentservice.SessionSkillBundle, error) {
|
|
files := make(map[string]string)
|
|
if err := fs.WalkDir(appFactoryReferenceFiles, appFactoryReferenceRoot, func(path string, entry fs.DirEntry, err error) error {
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if entry.IsDir() {
|
|
return nil
|
|
}
|
|
relativePath, err := filepath.Rel(appFactoryReferenceRoot, path)
|
|
if err != nil {
|
|
return fmt.Errorf("resolve app factory skill path: %w", err)
|
|
}
|
|
data, err := appFactoryReferenceFiles.ReadFile(path)
|
|
if err != nil {
|
|
return fmt.Errorf("read app factory skill file: %w", err)
|
|
}
|
|
files[filepath.ToSlash(relativePath)] = string(data)
|
|
return nil
|
|
}); err != nil {
|
|
return agentservice.SessionSkillBundle{}, err
|
|
}
|
|
return agentservice.SessionSkillBundle{
|
|
Name: "app-factory",
|
|
Files: files,
|
|
}, nil
|
|
}
|