Add embedded weather profile catalog

This commit is contained in:
2026-08-01 14:13:11 +00:00
parent cc97ae186c
commit acbe22dcad
7 changed files with 364 additions and 816 deletions

View File

@@ -7,7 +7,7 @@ import (
"io/fs"
)
//go:embed assets/prompts assets/schemas
//go:embed assets/prompts assets/profiles assets/schemas
var assets embed.FS
var schemaPaths = map[string]string{
@@ -35,6 +35,15 @@ func SchemaFS() fs.FS {
return fsys
}
// ProfileFS returns the embedded Weatherreporter Promptkit profile definitions.
func ProfileFS() fs.FS {
fsys, err := fs.Sub(assets, "assets/profiles")
if err != nil {
panic(fmt.Sprintf("embedded profile assets: %v", err))
}
return fsys
}
// Schema returns an independent copy of the canonical schema for id.
func Schema(id string) ([]byte, error) {
path, ok := schemaPaths[id]