@oaslananka/kicad-protocol-schemas 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/index.d.ts +272 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +185 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
- package/schemas/bom-netlist-summary.schema.json +148 -0
- package/schemas/compatibility-manifest.schema.json +88 -0
- package/schemas/extension-active-context.schema.json +113 -0
- package/schemas/kicad-mcp-server-info.schema.json +385 -0
- package/schemas/mcp-server-health.schema.json +90 -0
- package/schemas/mcp-tool-capability.schema.json +81 -0
- package/schemas/mcp-tool-discovery.schema.json +102 -0
- package/schemas/normalized-diagnostic.schema.json +69 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oaslananka.github.io/kicad-mcp/schemas/bom-netlist-summary.schema.json",
|
|
4
|
+
"title": "BOM and netlist summary contract",
|
|
5
|
+
"description": "Product-neutral summary of BOM rows and netlist nodes exchanged between KiCad Studio and kicad-mcp-pro.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "project", "bom", "netlist"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"$ref": "#/$defs/semver"
|
|
12
|
+
},
|
|
13
|
+
"project": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["name"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"rootPath": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"projectFile": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"bom": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["totalComponents", "uniqueValues", "entries"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"totalComponents": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"uniqueValues": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": 0
|
|
42
|
+
},
|
|
43
|
+
"entries": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"$ref": "#/$defs/bomEntry"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"netlist": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["netCount", "nodes"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"netCount": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"minimum": 0
|
|
59
|
+
},
|
|
60
|
+
"nodes": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"$ref": "#/$defs/netNode"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"$defs": {
|
|
70
|
+
"semver": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
73
|
+
},
|
|
74
|
+
"bomEntry": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": ["references", "value", "footprint", "quantity"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"references": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"value": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"footprint": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"quantity": {
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"minimum": 0
|
|
95
|
+
},
|
|
96
|
+
"mpn": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"manufacturer": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"lcsc": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"description": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"dnp": {
|
|
109
|
+
"type": "boolean"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"netNode": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["netName", "pins"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"netName": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"pins": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["reference", "pin"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"reference": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
},
|
|
131
|
+
"pin": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"x-kicad-studio-kit": {
|
|
141
|
+
"trackingIssue": "OASLANA-52",
|
|
142
|
+
"schemaVersion": "1.0.0"
|
|
143
|
+
},
|
|
144
|
+
"x-kicad-mcp": {
|
|
145
|
+
"trackingIssue": "OASLANA-52",
|
|
146
|
+
"schemaType": "protocol-contract"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oaslananka.github.io/kicad-mcp/schemas/compatibility-manifest.schema.json",
|
|
4
|
+
"title": "Protocol compatibility manifest",
|
|
5
|
+
"description": "Cross-product manifest describing supported schema majors and migration policy.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "products", "schemas", "policy"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"$ref": "#/$defs/semver"
|
|
12
|
+
},
|
|
13
|
+
"products": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"minProperties": 1,
|
|
16
|
+
"additionalProperties": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["version", "supportedSchemaMajors"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"version": {
|
|
22
|
+
"$ref": "#/$defs/semver"
|
|
23
|
+
},
|
|
24
|
+
"supportedSchemaMajors": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"minItems": 1,
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 1
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"schemas": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"minProperties": 1,
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["current", "compatibility"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"current": {
|
|
44
|
+
"$ref": "#/$defs/semver"
|
|
45
|
+
},
|
|
46
|
+
"compatibility": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"policy": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": [
|
|
57
|
+
"breakingChanges",
|
|
58
|
+
"additiveChanges",
|
|
59
|
+
"documentationChanges"
|
|
60
|
+
],
|
|
61
|
+
"properties": {
|
|
62
|
+
"breakingChanges": {
|
|
63
|
+
"const": "major"
|
|
64
|
+
},
|
|
65
|
+
"additiveChanges": {
|
|
66
|
+
"const": "minor"
|
|
67
|
+
},
|
|
68
|
+
"documentationChanges": {
|
|
69
|
+
"const": "patch"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"$defs": {
|
|
75
|
+
"semver": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"x-kicad-studio-kit": {
|
|
81
|
+
"trackingIssue": "OASLANA-52",
|
|
82
|
+
"schemaVersion": "1.0.0"
|
|
83
|
+
},
|
|
84
|
+
"x-kicad-mcp": {
|
|
85
|
+
"trackingIssue": "OASLANA-52",
|
|
86
|
+
"schemaType": "protocol-contract"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oaslananka.github.io/kicad-mcp/schemas/extension-active-context.schema.json",
|
|
4
|
+
"title": "KiCad Studio active context payload",
|
|
5
|
+
"description": "Product-neutral IDE context payload pushed from the extension to MCP tools.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["fileType", "drcErrors"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"$ref": "#/$defs/semver"
|
|
12
|
+
},
|
|
13
|
+
"activeFile": {
|
|
14
|
+
"type": ["string", "null"]
|
|
15
|
+
},
|
|
16
|
+
"fileType": {
|
|
17
|
+
"enum": ["schematic", "pcb", "other"]
|
|
18
|
+
},
|
|
19
|
+
"drcErrors": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"projectId": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"projectName": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"projectRoot": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"projectFile": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"selectedNet": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"selectedReference": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"activeVariant": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"activeSheetPath": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"visibleLayers": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"kicadVersion": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"designBlocks": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"cursorPosition": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["line", "character"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"line": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"minimum": 0
|
|
72
|
+
},
|
|
73
|
+
"character": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 0
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"selectedArea": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["x1", "y1", "x2", "y2"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"x1": {
|
|
85
|
+
"type": "number"
|
|
86
|
+
},
|
|
87
|
+
"y1": {
|
|
88
|
+
"type": "number"
|
|
89
|
+
},
|
|
90
|
+
"x2": {
|
|
91
|
+
"type": "number"
|
|
92
|
+
},
|
|
93
|
+
"y2": {
|
|
94
|
+
"type": "number"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"$defs": {
|
|
100
|
+
"semver": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"x-kicad-studio-kit": {
|
|
106
|
+
"trackingIssue": "OASLANA-52",
|
|
107
|
+
"schemaVersion": "1.0.0"
|
|
108
|
+
},
|
|
109
|
+
"x-kicad-mcp": {
|
|
110
|
+
"trackingIssue": "OASLANA-52",
|
|
111
|
+
"schemaType": "protocol-contract"
|
|
112
|
+
}
|
|
113
|
+
}
|