Repository navigation
Expand file tree
/
Copy pathstack.schema.json
More file actions
97 lines (97 loc) · 3.5 KB
/
Copy pathstack.schema.json
File metadata and controls
97 lines (97 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/FlashyLabs/stack.json/stack.schema.json",
"title": "web4/1 — the Web 4 stack index",
"description": "One document describing every layer of the agentic-internet stack the Flashy / Gord estate builds, and the repository that carries each part. Served at /.well-known/stack.json. Keys prefixed x- are extensions and are allowed anywhere; every other key is closed.",
"type": "object",
"required": ["contract", "generated", "hub", "wellKnown", "principle", "layers", "tooling", "teaching"],
"properties": {
"contract": { "const": "web4/1" },
"generated": {
"type": "string",
"description": "The date the statuses and visibilities were measured, YYYY-MM-DD.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"hub": { "$ref": "#/$defs/httpsUrl", "description": "The human hub this index is the twin of." },
"wellKnown": { "$ref": "#/$defs/wellKnownPath" },
"principle": { "type": "string", "minLength": 1 },
"layers": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/layer" }
},
"tooling": {
"type": "array",
"items": { "$ref": "#/$defs/repo" }
},
"teaching": {
"type": "array",
"items": { "$ref": "#/$defs/repo" }
}
},
"patternProperties": { "^x-": {} },
"additionalProperties": false,
"$defs": {
"httpsUrl": {
"type": "string",
"pattern": "^https://[^\\s]+$"
},
"wellKnownPath": {
"type": "string",
"pattern": "^/\\.well-known/[^\\s]+$"
},
"contractId": {
"type": "string",
"description": "A contract identifier: a lower-case slug, a slash, a dotted version.",
"pattern": "^[a-z0-9-]+/[0-9.]+$"
},
"layer": {
"type": "object",
"required": ["name", "question", "repos"],
"properties": {
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
"question": { "type": "string", "minLength": 1 },
"repos": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/repo" }
}
},
"patternProperties": { "^x-": {} },
"additionalProperties": false
},
"repo": {
"type": "object",
"required": ["name", "kind", "status", "visibility"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"url": {
"description": "The repository URL. Required unless status is planned; a planned repository has no URL yet and says null.",
"oneOf": [
{ "$ref": "#/$defs/httpsUrl" },
{ "type": "null" }
]
},
"kind": { "enum": ["spec", "impl", "spec+impl", "product", "tooling", "docs", "hub", "index"] },
"contract": { "$ref": "#/$defs/contractId" },
"status": { "enum": ["planned", "draft", "exists", "private-intended"] },
"visibility": {
"description": "The repository's GitHub visibility as measured on the generated date — never what was intended. null when there is no repository.",
"enum": ["public", "private", null]
},
"wellKnown": { "$ref": "#/$defs/wellKnownPath" }
},
"patternProperties": { "^x-": {} },
"additionalProperties": false,
"if": {
"properties": { "status": { "const": "planned" } },
"required": ["status"]
},
"then": {},
"else": {
"required": ["url"],
"properties": { "url": { "$ref": "#/$defs/httpsUrl" } }
}
}
}
}