@capyclaw/suite-kit 0.0.0-stage → 0.2.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.
@@ -0,0 +1,112 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dsh.local/schemas/suite.schema.json",
4
+ "title": "DSH Suite Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["name", "version", "packages", "rows"],
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
11
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$" },
12
+ "title": { "type": "string" },
13
+ "description": { "type": "string" },
14
+ "components": {
15
+ "type": "array",
16
+ "items": { "type": "string", "minLength": 1 },
17
+ "description": "引用其他 suite 目录(相对本 suite 目录);加载时展开其 packages/rows/checks。"
18
+ },
19
+ "packages": {
20
+ "type": "object",
21
+ "minProperties": 1,
22
+ "additionalProperties": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["role", "version"],
26
+ "properties": {
27
+ "role": {
28
+ "type": "string",
29
+ "enum": ["runtime", "skills", "provider", "ui", "bridge", "support"]
30
+ },
31
+ "version": { "type": "string", "minLength": 1 },
32
+ "path": { "type": "string", "minLength": 1 },
33
+ "required": { "type": "boolean" },
34
+ "requires": {
35
+ "type": "object",
36
+ "properties": {
37
+ "capabilities": {
38
+ "type": "object",
39
+ "additionalProperties": { "type": "string", "minLength": 1 }
40
+ }
41
+ },
42
+ "additionalProperties": { "type": "string", "minLength": 1 }
43
+ },
44
+ "provides": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "tools": { "type": "array", "items": { "type": "string" } },
49
+ "skills": { "type": "array", "items": { "type": "string" } },
50
+ "services": { "type": "array", "items": { "type": "string" } },
51
+ "ports": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 65535 } },
52
+ "capabilities": {
53
+ "type": "object",
54
+ "additionalProperties": { "type": "string", "minLength": 1 }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "rows": {
62
+ "type": "array",
63
+ "minItems": 1,
64
+ "items": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": ["id", "name"],
68
+ "properties": {
69
+ "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
70
+ "name": { "type": "string", "minLength": 1 },
71
+ "disabled": { "type": "boolean" },
72
+ "config": { "type": "object" }
73
+ }
74
+ }
75
+ },
76
+ "checks": {
77
+ "type": "array",
78
+ "items": {
79
+ "oneOf": [
80
+ {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["id", "type", "url"],
84
+ "properties": {
85
+ "id": { "type": "string" },
86
+ "type": { "const": "http" },
87
+ "url": { "type": "string", "format": "uri" },
88
+ "method": { "type": "string" },
89
+ "expectStatus": { "type": "integer" },
90
+ "expectBody": { "type": "object" },
91
+ "timeoutMs": { "type": "integer", "minimum": 100 }
92
+ }
93
+ },
94
+ {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": ["id", "type", "url", "tool", "major"],
98
+ "properties": {
99
+ "id": { "type": "string" },
100
+ "type": { "const": "contract" },
101
+ "url": { "type": "string", "format": "uri" },
102
+ "tool": { "type": "string" },
103
+ "major": { "type": "integer", "minimum": 0 },
104
+ "timeoutMs": { "type": "integer", "minimum": 100 }
105
+ }
106
+ }
107
+ ]
108
+ }
109
+ },
110
+ "tags": { "type": "array", "items": { "type": "string" } }
111
+ }
112
+ }