Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/schemas-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# this job strict once prod serves GET /schemas/{project,agent}.json.
- name: Check vendored schemas against the platform API
env:
MAJOR_SCHEMAS_BASE_URL: https://api.major.tech
MAJOR_SCHEMAS_BASE_URL: https://api.prod.major.build
run: |
set -e
status=0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ release:
# Override the source with MAJOR_SCHEMAS_BASE_URL, e.g. against a local dev API:
# MAJOR_SCHEMAS_BASE_URL=http://localhost:3301 make sync-schemas
sync-schemas:
@base="$${MAJOR_SCHEMAS_BASE_URL:-https://api.major.tech}"; \
@base="$${MAJOR_SCHEMAS_BASE_URL:-https://api.prod.major.build}"; \
echo "Syncing schemas from $$base..."; \
curl -fsSL "$$base/schemas/project.json" -o projects/schemas/project.schema.json; \
curl -fsSL "$$base/schemas/agent.json" -o projects/schemas/agent.schema.json; \
Expand Down
8 changes: 4 additions & 4 deletions projects/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func ensureSchemas() {
c := jsonschema.NewCompiler()

for name, id := range map[string]string{
"schemas/project.schema.json": "https://schemas.major.tech/project.json",
"schemas/agent.schema.json": "https://schemas.major.tech/agent.json",
"schemas/project.schema.json": "https://schemas.major.build/project.json",
"schemas/agent.schema.json": "https://schemas.major.build/agent.json",
} {
raw, err := SchemaFS.ReadFile(name)
if err != nil {
Expand All @@ -58,12 +58,12 @@ func ensureSchemas() {

var err error

projectSchema, err = c.Compile("https://schemas.major.tech/project.json")
projectSchema, err = c.Compile("https://schemas.major.build/project.json")
if err != nil {
panic("projects: project schema failed to compile: " + err.Error())
}

agentSchema, err = c.Compile("https://schemas.major.tech/agent.json")
agentSchema, err = c.Compile("https://schemas.major.build/agent.json")
if err != nil {
panic("projects: agent schema failed to compile: " + err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions projects/schemas/SCHEMAS.sha256
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source: http://localhost:3301
fetched: 2026-07-24T03:28:48Z
47002e01681b41a1030b88e395897008b370c4a42b465b541e77038f8b2509d1 projects/schemas/project.schema.json
cf84e4941f22d1a759594575154b80c1154e10ac685fa5597ffcc2f53eebe5ed projects/schemas/agent.schema.json
source: https://api.prod.major.build
fetched: 2026-07-24T05:46:31Z
2fdca52b431d214f4e54413d069f6d533e5479b58475c4315df2dc3b8c113c29 projects/schemas/project.schema.json
b198a6c144a32dd01baf7745a4d3cc4a50f2f699d731ba84b7b7b1776e4f6b82 projects/schemas/agent.schema.json
2 changes: 1 addition & 1 deletion projects/schemas/agent.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://schemas.major.tech/agent.json","title":"Major agent definition","type":"object","properties":{"$schema":{"type":"string"},"slug":{"type":"string","maxLength":63,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000},"model":{"type":"string","minLength":1},"systemPrompt":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"file":{"type":"string","minLength":1}},"required":["file"],"additionalProperties":false}]},"env":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"required":["slug","name","systemPrompt"],"additionalProperties":false}
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://schemas.major.build/agent.json","title":"Major agent definition","type":"object","properties":{"$schema":{"type":"string"},"slug":{"type":"string","maxLength":63,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000},"model":{"type":"string","minLength":1},"systemPrompt":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"file":{"type":"string","minLength":1}},"required":["file"],"additionalProperties":false}]},"env":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"required":["slug","name","systemPrompt"],"additionalProperties":false}
2 changes: 1 addition & 1 deletion projects/schemas/project.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://schemas.major.tech/project.json","title":"Major project definition","type":"object","properties":{"$schema":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100},"srcDir":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://schemas.major.build/project.json","title":"Major project definition","type":"object","properties":{"$schema":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100},"srcDir":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}
2 changes: 1 addition & 1 deletion projects/testdata/valid/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://schemas.major.tech/project.json",
"$schema": "https://schemas.major.build/project.json",
"name": "Valid Project",
"srcDir": "src/"
}
2 changes: 1 addition & 1 deletion projects/testdata/valid/src/agents/triage/agent.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://schemas.major.tech/agent.json",
"$schema": "https://schemas.major.build/agent.json",
"slug": "triage",
"name": "Support Triage",
"description": "Triages inbound tickets",
Expand Down
Loading