@@ -28,19 +28,30 @@ const (
2828// This could be used in various contexts such as API specifications,
2929// software design documents, etc.
3030type Spec struct {
31- Version int `json:"version" yaml:"version"`
32- Name string `json:"name,omitempty" yaml:"name"`
33- Description string `json:"description,omitempty" yaml:"description,omitempty"`
34- Rules Rules `json:"rules" yaml:"rules"`
35- Constitution string `json:"constitution" yaml:"constitution"`
36- Models []Model `json:"models,omitempty" yaml:"models,omitempty"`
37- Deploy * Deploy `json:"domain,omitempty" yaml:"domain,omitempty"`
38- Tasks Tasks `json:"tasks" yaml:"tasks"`
39- Root string `json:"root,omitempty" yaml:"root,omitempty"`
31+ // Version is the version of the spec.
32+ Version int `json:"version" yaml:"version"`
33+ // Name is the name of the spec.
34+ Name string `json:"name,omitempty" yaml:"name"`
35+ // Root is the root directory of the spec.
36+ Root string `json:"root,omitempty" yaml:"root,omitempty"`
37+ // Description is the description of the spec.
38+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
39+ // Rules define the rules for the spec.
40+ Rules Rules `json:"rules" yaml:"rules"`
41+ // Constitution is the constitution of the spec.
42+ Constitution string `json:"constitution" yaml:"constitution"`
43+ // Models define the models for the spec.
44+ Models []Model `json:"models,omitempty" yaml:"models,omitempty"`
45+ // Sites defines the deployment configuration for the specification.
46+ Sites * Sites `json:"sites,omitempty" yaml:"sites,omitempty"`
47+ // Tasks define the tasks for the spec.
48+ Tasks Tasks `json:"tasks" yaml:"tasks"`
4049}
4150
42- // Deploy defines the deployment configuration for the specification.
43- type Deploy struct {
51+ // Sites defines the deployment configuration for the specification.
52+ type Sites struct {
53+ // Name is the name of the site.
54+ Name string `json:"name" yaml:"name"`
4455 // Path is the path to the deployment configuration file.
4556 Path string `json:"path" yaml:"path"`
4657 // Site is the name of the site to deploy to.
@@ -51,12 +62,18 @@ type Deploy struct {
5162
5263// Model specifies a model.
5364type Model struct {
65+ // RequestOptions are the request options for the model.
5466 RequestOptions map [string ]any `json:"requestOptions,omitempty" yaml:"requestOptions,omitempty"`
55- ID string `json:"id" yaml:"id"`
56- Name string `json:"name" yaml:"name"`
57- URL string `json:"url" yaml:"url"`
58- Provider Provider `json:"provider" yaml:"provider"`
59- Roles []string `json:"roles" yaml:"roles"`
67+ // ID is the unique identifier for the model.
68+ ID string `json:"id" yaml:"id"`
69+ // Name is the name of the model.
70+ Name string `json:"name" yaml:"name"`
71+ // URL is the URL of the model.
72+ URL string `json:"url" yaml:"url"`
73+ // Provider is the provider of the model.
74+ Provider Provider `json:"provider" yaml:"provider"`
75+ // Roles are the roles of the model.
76+ Roles []string `json:"roles" yaml:"roles"`
6077}
6178
6279// Provider is a string that specifies the provider for a model.
@@ -151,7 +168,7 @@ func (s *Spec) UnmarshalYAML(data []byte) error {
151168 Name string `yaml:"name"`
152169 Models []Model `yaml:"models"`
153170 Version int `yaml:"version"`
154- Deploy * Deploy `yaml:"deploy"`
171+ Sites * Sites `yaml:"deploy"`
155172 Root string `yaml:"root"`
156173 }{
157174 Version : DefaultVersion ,
@@ -172,7 +189,7 @@ func (s *Spec) UnmarshalYAML(data []byte) error {
172189 s .Constitution = spec .Constitution
173190 s .Description = spec .Description
174191 s .Tasks = spec .Tasks
175- s .Deploy = spec .Deploy
192+ s .Sites = spec .Sites
176193 s .Root = spec .Root
177194
178195 return nil
0 commit comments