Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ for _, tt := range tests {
- Add configuration support if needed
- Consider both CLI and TUI interface impacts, along with API server impacts
- Add tests alongside implementation (`*_test.go`)
- Update `cagent-schema.json` if adding new config fields
- Update `agent-schema.json` if adding new config fields

### Code Style and Conventions

Expand Down Expand Up @@ -730,7 +730,7 @@ animation.Unregister()
- `examples/eval/` - Evaluation configurations
- Root directory - Main project configurations (`Taskfile.yml`, `go.mod`, `.golangci.yml`)
- `.github/workflows/ci.yml` - CI/CD pipeline
- `cagent-schema.json` - JSON schema for agent configuration validation
- `agent-schema.json` - JSON schema for agent configuration validation
- `golang_developer.yaml` - Dogfooding agent for Docker `cagent` development

### Environment Variables
Expand Down Expand Up @@ -1041,4 +1041,4 @@ task push-image # Build and push multi-platform
| `pkg/tui/` | Terminal UI (Bubble Tea) |
| `Taskfile.yml` | Build automation tasks |
| `.golangci.yml` | Linter configuration |
| `cagent-schema.json` | JSON schema for config validation |
| `agent-schema.json` | JSON schema for config validation |
2 changes: 1 addition & 1 deletion cagent-schema.json → agent-schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/cagent/cagent/blob/main/cagent-schema.json",
"$id": "https://github.com/cagent/cagent/blob/main/agent-schema.json",
"title": "Cagent Configuration",
"description": "Configuration schema for Cagent v5",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/community/troubleshooting.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3>Toolset validation</h3>

<div class="callout callout-info">
<div class="callout-title">ℹ️ Schema Validation</div>
<p>Use the <a href="https://github.com/docker/cagent/blob/main/cagent-schema.json" target="_blank" rel="noopener noreferrer">JSON schema</a> in your editor for real-time config validation and autocompletion.</p>
<p>Use the <a href="https://github.com/docker/cagent/blob/main/agent-schema.json" target="_blank" rel="noopener noreferrer">JSON schema</a> in your editor for real-time config validation and autocompletion.</p>
</div>

<h2>Session &amp; Connectivity Issues</h2>
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/configuration/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ <h2>Validation</h2>

<h2>JSON Schema</h2>

<p>For editor autocompletion and validation, use the <a href="https://github.com/docker/cagent/blob/main/cagent-schema.json" target="_blank" rel="noopener noreferrer">cagent JSON Schema</a>. Add this to the top of your YAML file:</p>
<p>For editor autocompletion and validation, use the <a href="https://github.com/docker/cagent/blob/main/agent-schema.json" target="_blank" rel="noopener noreferrer">cagent JSON Schema</a>. Add this to the top of your YAML file:</p>

<pre><code class="language-bash"># yaml-language-server: $schema=https://raw.githubusercontent.com/docker/cagent/main/cagent-schema.json</code></pre>
<pre><code class="language-bash"># yaml-language-server: $schema=https://raw.githubusercontent.com/docker/cagent/main/agent-schema.json</code></pre>

<h2>Config Versioning</h2>

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestParseExamples(t *testing.T) {

func TestJsonSchemaWorksForExamples(t *testing.T) {
// Read json schema.
schemaFile, err := os.ReadFile(filepath.Join("..", "..", "cagent-schema.json"))
schemaFile, err := os.ReadFile(filepath.Join("..", "..", "agent-schema.json"))
require.NoError(t, err)

schema, err := gojsonschema.NewSchema(gojsonschema.NewBytesLoader(schemaFile))
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/latest/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// schemaFile is the path to the JSON schema file relative to the repo root.
const schemaFile = "../../../cagent-schema.json"
const schemaFile = "../../../agent-schema.json"

// jsonSchema mirrors the subset of JSON Schema we need for comparison.
type jsonSchema struct {
Expand Down Expand Up @@ -91,7 +91,7 @@ func sortedKeys(m map[string]bool) []string {
}

// TestSchemaMatchesGoTypes verifies that every JSON-tagged field in the Go
// config structs has a corresponding property in cagent-schema.json (and
// config structs has a corresponding property in agent-schema.json (and
// vice-versa). This prevents the schema from silently drifting out of sync
// with the Go types.
func TestSchemaMatchesGoTypes(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/v4/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// schemaFile is the path to the JSON schema file relative to the repo root.
const schemaFile = "../../../cagent-schema.json"
const schemaFile = "../../../agent-schema.json"

// jsonSchema mirrors the subset of JSON Schema we need for comparison.
type jsonSchema struct {
Expand Down Expand Up @@ -91,7 +91,7 @@ func sortedKeys(m map[string]bool) []string {
}

// TestSchemaMatchesGoTypes verifies that every JSON-tagged field in the Go
// config structs has a corresponding property in cagent-schema.json (and
// config structs has a corresponding property in agent-schema.json (and
// vice-versa). This prevents the schema from silently drifting out of sync
// with the Go types.
func TestSchemaMatchesGoTypes(t *testing.T) {
Expand Down