structured-context 0.16.0 → 0.17.1
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 +15 -15
- package/dist/api.d.ts +4 -2
- package/dist/api.js +2 -0
- package/dist/browser.d.ts +14 -0
- package/dist/browser.js +13 -0
- package/dist/commands/dump.d.ts +2 -0
- package/dist/commands/dump.js +3 -1
- package/dist/commands/schemas.js +3 -2
- package/dist/commands/spaces.js +4 -6
- package/dist/commands/validate.js +20 -19
- package/dist/config/health.d.ts +10 -6
- package/dist/config/health.js +11 -44
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.js +15 -6
- package/dist/filter/augment-nodes.d.ts +2 -2
- package/dist/filter/augment-nodes.js +2 -2
- package/dist/filter/expand-include.js +2 -2
- package/dist/index.js +9 -1
- package/dist/judge/context.js +1 -1
- package/dist/load-space-graph.js +1 -13
- package/dist/plugins/markdown/parse-embedded.js +4 -4
- package/dist/plugins/miro/cache.js +1 -1
- package/dist/plugins/miro/sync.js +2 -2
- package/dist/read/resolve-graph-edges.js +3 -3
- package/dist/schema/list-schemas.js +2 -2
- package/dist/schema/metadata-contract.d.ts +34 -0
- package/dist/schema/metadata-contract.js +2 -2
- package/dist/schema/validate-graph.d.ts +2 -2
- package/dist/schema/validate-graph.js +4 -4
- package/dist/schemas/generated/space-graph/1.json +216 -0
- package/dist/schemas/generated/space-graph/latest.json +216 -0
- package/dist/space-context.js +11 -1
- package/dist/space-graph-data.d.ts +237 -0
- package/dist/space-graph-data.js +129 -0
- package/dist/space-graph.d.ts +12 -1
- package/dist/space-graph.js +25 -1
- package/dist/testing.js +3 -3
- package/dist/types.d.ts +2 -2
- package/docs/concepts.md +8 -4
- package/package.json +6 -2
- package/schemas/generated/space-graph/1.json +216 -0
- package/schemas/generated/space-graph/latest.json +216 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/space-graph/1.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "structured-context space graph",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"formatVersion": {
|
|
8
|
+
"const": 1
|
|
9
|
+
},
|
|
10
|
+
"hierarchies": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"levels": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"field": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"fieldOn": {
|
|
31
|
+
"enum": ["child", "parent"]
|
|
32
|
+
},
|
|
33
|
+
"multiple": {
|
|
34
|
+
"type": "boolean"
|
|
35
|
+
},
|
|
36
|
+
"templateFormat": {
|
|
37
|
+
"enum": ["heading", "list", "table", "page"]
|
|
38
|
+
},
|
|
39
|
+
"matchers": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"minItems": 1
|
|
46
|
+
},
|
|
47
|
+
"embeddedTemplateFields": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"selfRef": {
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"selfRefField": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": ["type", "field", "fieldOn", "multiple", "selfRef"],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"allowSkipLevels": {
|
|
66
|
+
"type": "boolean"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["name", "levels"],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"mainHierarchy": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"nodes": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"id": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"title": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"schemaData": {
|
|
88
|
+
"type": "object"
|
|
89
|
+
},
|
|
90
|
+
"linkTargets": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"type": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"content": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"contentLinks": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"text": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"target": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"action": {
|
|
114
|
+
"enum": ["link", "embed"]
|
|
115
|
+
},
|
|
116
|
+
"anchor": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"linkSyntax": {
|
|
120
|
+
"enum": ["wikilink", "markdown"]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": ["text", "target", "action", "linkSyntax"],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"source": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"file": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"line": {
|
|
134
|
+
"type": "integer"
|
|
135
|
+
},
|
|
136
|
+
"column": {
|
|
137
|
+
"type": "integer"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["file"],
|
|
141
|
+
"additionalProperties": false
|
|
142
|
+
},
|
|
143
|
+
"resolvedType": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"resolvedParents": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"id": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"field": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"kind": {
|
|
158
|
+
"enum": ["hierarchy", "relationship"]
|
|
159
|
+
},
|
|
160
|
+
"hierarchy": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
"selfRef": {
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"fieldOn": {
|
|
167
|
+
"enum": ["child", "parent"]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": ["id", "field", "kind", "selfRef", "fieldOn"],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"resolvedLinks": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"text": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"target": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"action": {
|
|
186
|
+
"enum": ["link", "embed"]
|
|
187
|
+
},
|
|
188
|
+
"anchor": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"location": {
|
|
192
|
+
"enum": ["node", "internal", "external", "system", "protocol"]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": ["text", "target", "action", "location"],
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"id",
|
|
202
|
+
"title",
|
|
203
|
+
"schemaData",
|
|
204
|
+
"linkTargets",
|
|
205
|
+
"type",
|
|
206
|
+
"resolvedType",
|
|
207
|
+
"resolvedParents",
|
|
208
|
+
"resolvedLinks"
|
|
209
|
+
],
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"required": ["formatVersion", "hierarchies", "nodes"],
|
|
215
|
+
"additionalProperties": false
|
|
216
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/space-graph/1.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "structured-context space graph",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"formatVersion": {
|
|
8
|
+
"const": 1
|
|
9
|
+
},
|
|
10
|
+
"hierarchies": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"levels": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"field": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"fieldOn": {
|
|
31
|
+
"enum": ["child", "parent"]
|
|
32
|
+
},
|
|
33
|
+
"multiple": {
|
|
34
|
+
"type": "boolean"
|
|
35
|
+
},
|
|
36
|
+
"templateFormat": {
|
|
37
|
+
"enum": ["heading", "list", "table", "page"]
|
|
38
|
+
},
|
|
39
|
+
"matchers": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"minItems": 1
|
|
46
|
+
},
|
|
47
|
+
"embeddedTemplateFields": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"selfRef": {
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"selfRefField": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": ["type", "field", "fieldOn", "multiple", "selfRef"],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"allowSkipLevels": {
|
|
66
|
+
"type": "boolean"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["name", "levels"],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"mainHierarchy": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"nodes": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"id": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"title": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"schemaData": {
|
|
88
|
+
"type": "object"
|
|
89
|
+
},
|
|
90
|
+
"linkTargets": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"type": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"content": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"contentLinks": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"text": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"target": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"action": {
|
|
114
|
+
"enum": ["link", "embed"]
|
|
115
|
+
},
|
|
116
|
+
"anchor": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"linkSyntax": {
|
|
120
|
+
"enum": ["wikilink", "markdown"]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": ["text", "target", "action", "linkSyntax"],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"source": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"file": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"line": {
|
|
134
|
+
"type": "integer"
|
|
135
|
+
},
|
|
136
|
+
"column": {
|
|
137
|
+
"type": "integer"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["file"],
|
|
141
|
+
"additionalProperties": false
|
|
142
|
+
},
|
|
143
|
+
"resolvedType": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"resolvedParents": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"id": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"field": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"kind": {
|
|
158
|
+
"enum": ["hierarchy", "relationship"]
|
|
159
|
+
},
|
|
160
|
+
"hierarchy": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
"selfRef": {
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"fieldOn": {
|
|
167
|
+
"enum": ["child", "parent"]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": ["id", "field", "kind", "selfRef", "fieldOn"],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"resolvedLinks": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"text": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"target": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"action": {
|
|
186
|
+
"enum": ["link", "embed"]
|
|
187
|
+
},
|
|
188
|
+
"anchor": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"location": {
|
|
192
|
+
"enum": ["node", "internal", "external", "system", "protocol"]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": ["text", "target", "action", "location"],
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"id",
|
|
202
|
+
"title",
|
|
203
|
+
"schemaData",
|
|
204
|
+
"linkTargets",
|
|
205
|
+
"type",
|
|
206
|
+
"resolvedType",
|
|
207
|
+
"resolvedParents",
|
|
208
|
+
"resolvedLinks"
|
|
209
|
+
],
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"required": ["formatVersion", "hierarchies", "nodes"],
|
|
215
|
+
"additionalProperties": false
|
|
216
|
+
}
|