trigrams-toolkit 0.1.0__py3-none-any.whl
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.
- trigrams_toolkit/__init__.py +1 -0
- trigrams_toolkit/handbook/__init__.py +6 -0
- trigrams_toolkit/handbook/cli.py +122 -0
- trigrams_toolkit/handbook/guide_headers.py +43 -0
- trigrams_toolkit/handbook/guides.py +141 -0
- trigrams_toolkit/handbook/location.py +79 -0
- trigrams_toolkit/handbook/model.py +4 -0
- trigrams_toolkit/handbook/package.py +165 -0
- trigrams_toolkit/handbook/principle_import.py +101 -0
- trigrams_toolkit/handbook/project_resources.py +80 -0
- trigrams_toolkit/handbook/skill_sources.py +59 -0
- trigrams_toolkit/handbook/source_catalog.py +55 -0
- trigrams_toolkit/handbook/sources.py +16 -0
- trigrams_toolkit/installation/__init__.py +0 -0
- trigrams_toolkit/installation/archive_project.py +50 -0
- trigrams_toolkit/installation/global_skills.py +45 -0
- trigrams_toolkit/installation/harness_install.py +89 -0
- trigrams_toolkit/installation/installation_candidate.py +135 -0
- trigrams_toolkit/installation/installation_help.py +49 -0
- trigrams_toolkit/installation/installation_materials.py +73 -0
- trigrams_toolkit/installation/installation_service.py +14 -0
- trigrams_toolkit/installation/installation_sources.py +34 -0
- trigrams_toolkit/installation/operation_files.py +94 -0
- trigrams_toolkit/installation/operation_runtime.py +144 -0
- trigrams_toolkit/installation/package_metadata.py +48 -0
- trigrams_toolkit/plan/__init__.py +5 -0
- trigrams_toolkit/plan/cli.py +136 -0
- trigrams_toolkit/plan/definitions.py +131 -0
- trigrams_toolkit/plan/model.py +61 -0
- trigrams_toolkit/plan/scheduling.py +126 -0
- trigrams_toolkit/plan/service.py +139 -0
- trigrams_toolkit/plan/state.py +146 -0
- trigrams_toolkit/project_context/__init__.py +16 -0
- trigrams_toolkit/project_context/paths.py +36 -0
- trigrams_toolkit/py.typed +0 -0
- trigrams_toolkit/resources/__init__.py +35 -0
- trigrams_toolkit/resources/adapters/claude/README.md +7 -0
- trigrams_toolkit/resources/adapters/claude/evaluator.md +7 -0
- trigrams_toolkit/resources/adapters/claude/task_developer.md +7 -0
- trigrams_toolkit/resources/adapters/codex/README.md +9 -0
- trigrams_toolkit/resources/adapters/codex/evaluator.toml +6 -0
- trigrams_toolkit/resources/adapters/codex/task_developer.toml +6 -0
- trigrams_toolkit/resources/adapters/pi-web/evaluator.md +7 -0
- trigrams_toolkit/resources/adapters/pi-web/task_developer.md +7 -0
- trigrams_toolkit/resources/handbook/PROTOCOL.md +82 -0
- trigrams_toolkit/resources/handbook/README.md +45 -0
- trigrams_toolkit/resources/handbook/commands.json +31 -0
- trigrams_toolkit/resources/handbook/guides.schema.json +253 -0
- trigrams_toolkit/resources/installation/PROTOCOL.md +35 -0
- trigrams_toolkit/resources/installation/cli.schema.json +89 -0
- trigrams_toolkit/resources/installation/commands.json +23 -0
- trigrams_toolkit/resources/installation/examples/install-apply-input.json +48 -0
- trigrams_toolkit/resources/installation/examples/install-preview-input.json +7 -0
- trigrams_toolkit/resources/installation/examples/installation.json +20 -0
- trigrams_toolkit/resources/installation/global-skills.json +6 -0
- trigrams_toolkit/resources/installation/installation.schema.json +295 -0
- trigrams_toolkit/resources/plan/PROTOCOL.md +89 -0
- trigrams_toolkit/resources/plan/README.md +61 -0
- trigrams_toolkit/resources/plan/commands.json +36 -0
- trigrams_toolkit/resources/plan/plan.schema.json +192 -0
- trigrams_toolkit/resources/shared/GLOBAL-TOOLS.md +31 -0
- trigrams_toolkit/resources/shared/common.schema.json +234 -0
- trigrams_toolkit/resources/state/PROTOCOL.md +85 -0
- trigrams_toolkit/resources/state/README.md +88 -0
- trigrams_toolkit/resources/state/cli.schema.json +326 -0
- trigrams_toolkit/resources/state/commands.json +55 -0
- trigrams_toolkit/resources/state/core-types.json +5 -0
- trigrams_toolkit/resources/state/help.json +86 -0
- trigrams_toolkit/resources/state/sources.schema.json +89 -0
- trigrams_toolkit/resources/state/state.schema.json +200 -0
- trigrams_toolkit/shared/__init__.py +1 -0
- trigrams_toolkit/shared/cli_help.py +195 -0
- trigrams_toolkit/shared/errors.py +29 -0
- trigrams_toolkit/shared/files.py +66 -0
- trigrams_toolkit/shared/locking.py +49 -0
- trigrams_toolkit/shared/paths.py +89 -0
- trigrams_toolkit/shared/process_lock.py +77 -0
- trigrams_toolkit/shared/schema.py +60 -0
- trigrams_toolkit/shared/serialization.py +84 -0
- trigrams_toolkit/shared/skill_installations.py +66 -0
- trigrams_toolkit/shared/state_json.py +45 -0
- trigrams_toolkit/state/__init__.py +4 -0
- trigrams_toolkit/state/arguments.py +68 -0
- trigrams_toolkit/state/cli.py +37 -0
- trigrams_toolkit/state/frontmatter.py +176 -0
- trigrams_toolkit/state/help.py +25 -0
- trigrams_toolkit/state/identity.py +123 -0
- trigrams_toolkit/state/location.py +59 -0
- trigrams_toolkit/state/model.py +76 -0
- trigrams_toolkit/state/providers.py +77 -0
- trigrams_toolkit/state/registration.py +82 -0
- trigrams_toolkit/state/relations.py +105 -0
- trigrams_toolkit/state/service.py +90 -0
- trigrams_toolkit/state/store.py +33 -0
- trigrams_toolkit/state/views.py +64 -0
- trigrams_toolkit/version.py +6 -0
- trigrams_toolkit-0.1.0.dist-info/METADATA +69 -0
- trigrams_toolkit-0.1.0.dist-info/RECORD +103 -0
- trigrams_toolkit-0.1.0.dist-info/WHEEL +5 -0
- trigrams_toolkit-0.1.0.dist-info/entry_points.txt +5 -0
- trigrams_toolkit-0.1.0.dist-info/licenses/LICENSE +21 -0
- trigrams_toolkit-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +18 -0
- trigrams_toolkit-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:harness:state-cli",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"absolutePath": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1,
|
|
8
|
+
"pattern": "^(?!.*\\u0000)(?:/|[A-Za-z]:[\\\\/]|[\\\\/]{2}[^\\\\/]+[\\\\/][^\\\\/]+)"
|
|
9
|
+
},
|
|
10
|
+
"failure": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["ok", "error"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"ok": { "const": false },
|
|
16
|
+
"error": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["code", "message"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"code": { "type": "string", "minLength": 1 },
|
|
22
|
+
"message": { "type": "string", "minLength": 1 },
|
|
23
|
+
"details": {}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"moduleView": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["id", "kind", "name"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "$ref": "urn:harness:state#/$defs/module/properties/id" },
|
|
34
|
+
"kind": { "const": "core:module" },
|
|
35
|
+
"name": { "$ref": "urn:harness:state#/$defs/module/properties/name" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"featureView": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["id", "kind", "name", "moduleId"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"id": { "$ref": "urn:harness:state#/$defs/feature/properties/id" },
|
|
44
|
+
"kind": { "const": "core:feature" },
|
|
45
|
+
"name": { "$ref": "urn:harness:state#/$defs/feature/properties/name" },
|
|
46
|
+
"moduleId": { "$ref": "urn:harness:state#/$defs/feature/properties/moduleId" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"artifactView": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["id", "kind", "title", "featureIds"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"id": { "$ref": "urn:harness:state#/$defs/artifact/properties/id" },
|
|
55
|
+
"kind": { "$ref": "urn:harness:state#/$defs/artifact/properties/kind" },
|
|
56
|
+
"title": { "$ref": "urn:harness:state#/$defs/artifact/properties/title" },
|
|
57
|
+
"moduleId": { "$ref": "urn:harness:state#/$defs/artifact/properties/moduleId" },
|
|
58
|
+
"featureIds": { "$ref": "urn:harness:state#/$defs/artifact/properties/featureIds" }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"entityView": {
|
|
62
|
+
"oneOf": [
|
|
63
|
+
{ "$ref": "#/$defs/moduleView" },
|
|
64
|
+
{ "$ref": "#/$defs/featureView" },
|
|
65
|
+
{ "$ref": "#/$defs/artifactView" }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"locatedArtifactView": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["id", "kind", "title", "featureIds", "path"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": { "$ref": "#/$defs/artifactView/properties/id" },
|
|
74
|
+
"kind": { "$ref": "#/$defs/artifactView/properties/kind" },
|
|
75
|
+
"title": { "$ref": "#/$defs/artifactView/properties/title" },
|
|
76
|
+
"moduleId": { "$ref": "#/$defs/artifactView/properties/moduleId" },
|
|
77
|
+
"featureIds": { "$ref": "#/$defs/artifactView/properties/featureIds" },
|
|
78
|
+
"path": { "$ref": "#/$defs/absolutePath" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"locateResult": {
|
|
82
|
+
"oneOf": [
|
|
83
|
+
{ "$ref": "#/$defs/moduleView" },
|
|
84
|
+
{ "$ref": "#/$defs/featureView" },
|
|
85
|
+
{ "$ref": "#/$defs/locatedArtifactView" }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"listResult": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["items"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"items": { "type": "array", "items": { "$ref": "#/$defs/entityView" } }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"queryRelation": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["kind", "from", "to", "source"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"kind": { "$ref": "urn:harness:state#/$defs/relation/properties/kind" },
|
|
102
|
+
"from": { "$ref": "urn:harness:state#/$defs/relation/properties/from" },
|
|
103
|
+
"to": { "$ref": "urn:harness:state#/$defs/relation/properties/to" },
|
|
104
|
+
"source": { "enum": ["feature", "document", "relation"] }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"relatedResult": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": ["items", "relations"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"items": { "type": "array", "items": { "$ref": "#/$defs/locateResult" } },
|
|
113
|
+
"relations": { "type": "array", "items": { "$ref": "#/$defs/queryRelation" } }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"locateResponse": {
|
|
117
|
+
"oneOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "object", "additionalProperties": false, "required": ["ok", "data"],
|
|
120
|
+
"properties": { "ok": { "const": true }, "data": { "$ref": "#/$defs/locateResult" } }
|
|
121
|
+
},
|
|
122
|
+
{ "$ref": "#/$defs/failure" }
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"listResponse": {
|
|
126
|
+
"oneOf": [
|
|
127
|
+
{
|
|
128
|
+
"type": "object", "additionalProperties": false, "required": ["ok", "data"],
|
|
129
|
+
"properties": { "ok": { "const": true }, "data": { "$ref": "#/$defs/listResult" } }
|
|
130
|
+
},
|
|
131
|
+
{ "$ref": "#/$defs/failure" }
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"relatedResponse": {
|
|
135
|
+
"oneOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "object", "additionalProperties": false, "required": ["ok", "data"],
|
|
138
|
+
"properties": { "ok": { "const": true }, "data": { "$ref": "#/$defs/relatedResult" } }
|
|
139
|
+
},
|
|
140
|
+
{ "$ref": "#/$defs/failure" }
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"response": {
|
|
144
|
+
"oneOf": [
|
|
145
|
+
{
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": [
|
|
149
|
+
"ok",
|
|
150
|
+
"data"
|
|
151
|
+
],
|
|
152
|
+
"properties": {
|
|
153
|
+
"ok": {
|
|
154
|
+
"const": true
|
|
155
|
+
},
|
|
156
|
+
"data": {
|
|
157
|
+
"type": "object"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"$ref": "#/$defs/failure"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"emptyInput": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false
|
|
169
|
+
},
|
|
170
|
+
"moduleInput": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"required": [
|
|
174
|
+
"name"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"name": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1
|
|
180
|
+
},
|
|
181
|
+
"id": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"featureInput": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"required": [
|
|
191
|
+
"name"
|
|
192
|
+
],
|
|
193
|
+
"properties": {
|
|
194
|
+
"name": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"minLength": 1
|
|
197
|
+
},
|
|
198
|
+
"id": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1
|
|
201
|
+
},
|
|
202
|
+
"module": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"artifactInput": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"dependentRequired": { "feature": ["module"] },
|
|
212
|
+
"required": [
|
|
213
|
+
"path"
|
|
214
|
+
],
|
|
215
|
+
"properties": {
|
|
216
|
+
"path": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 1
|
|
219
|
+
},
|
|
220
|
+
"kind": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1
|
|
223
|
+
},
|
|
224
|
+
"module": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"pattern": "^module_[A-Za-z0-9_-]+$",
|
|
227
|
+
"description": "Replace ownership with this Module and the supplied feature list; omitted ownership retains registered values."
|
|
228
|
+
},
|
|
229
|
+
"feature": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"minItems": 1,
|
|
232
|
+
"uniqueItems": true,
|
|
233
|
+
"items": { "type": "string", "pattern": "^feature_[A-Za-z0-9_-]+$" },
|
|
234
|
+
"description": "Values of repeated --feature options; requires module in the same command."
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"idInput": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": [
|
|
242
|
+
"id"
|
|
243
|
+
],
|
|
244
|
+
"properties": {
|
|
245
|
+
"id": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"minLength": 1
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"listInput": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"required": [],
|
|
255
|
+
"properties": {
|
|
256
|
+
"kind": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"minLength": 1
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"relatedInput": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"additionalProperties": false,
|
|
265
|
+
"required": [
|
|
266
|
+
"id"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"id": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"minLength": 1
|
|
272
|
+
},
|
|
273
|
+
"direction": {
|
|
274
|
+
"enum": [
|
|
275
|
+
"both",
|
|
276
|
+
"incoming",
|
|
277
|
+
"outgoing"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"relateInput": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"additionalProperties": false,
|
|
285
|
+
"required": [
|
|
286
|
+
"from",
|
|
287
|
+
"kind",
|
|
288
|
+
"to"
|
|
289
|
+
],
|
|
290
|
+
"properties": {
|
|
291
|
+
"from": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"minLength": 1
|
|
294
|
+
},
|
|
295
|
+
"kind": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"minLength": 1,
|
|
298
|
+
"description": "Relation type supplied as the RELATION positional argument."
|
|
299
|
+
},
|
|
300
|
+
"to": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"minLength": 1
|
|
303
|
+
},
|
|
304
|
+
"remove": {
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"registerResult": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"additionalProperties": false,
|
|
312
|
+
"required": [
|
|
313
|
+
"entity",
|
|
314
|
+
"changed"
|
|
315
|
+
],
|
|
316
|
+
"properties": {
|
|
317
|
+
"entity": {
|
|
318
|
+
"$ref": "urn:harness:state#/$defs/entity"
|
|
319
|
+
},
|
|
320
|
+
"changed": {
|
|
321
|
+
"type": "boolean"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"tool": "project-state",
|
|
4
|
+
"protocolVersion": 1,
|
|
5
|
+
"commands": [
|
|
6
|
+
{
|
|
7
|
+
"name": "register module",
|
|
8
|
+
"mutation": true,
|
|
9
|
+
"input": "urn:harness:state-cli#/$defs/moduleInput",
|
|
10
|
+
"output": "urn:harness:state-cli#/$defs/response"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "register feature",
|
|
14
|
+
"mutation": true,
|
|
15
|
+
"input": "urn:harness:state-cli#/$defs/featureInput",
|
|
16
|
+
"output": "urn:harness:state-cli#/$defs/response"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "register artifact",
|
|
20
|
+
"mutation": true,
|
|
21
|
+
"input": "urn:harness:state-cli#/$defs/artifactInput",
|
|
22
|
+
"output": "urn:harness:state-cli#/$defs/response"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "locate",
|
|
26
|
+
"mutation": false,
|
|
27
|
+
"input": "urn:harness:state-cli#/$defs/idInput",
|
|
28
|
+
"output": "urn:harness:state-cli#/$defs/locateResponse"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "list",
|
|
32
|
+
"mutation": false,
|
|
33
|
+
"input": "urn:harness:state-cli#/$defs/listInput",
|
|
34
|
+
"output": "urn:harness:state-cli#/$defs/listResponse"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "related",
|
|
38
|
+
"mutation": false,
|
|
39
|
+
"input": "urn:harness:state-cli#/$defs/relatedInput",
|
|
40
|
+
"output": "urn:harness:state-cli#/$defs/relatedResponse"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "relate",
|
|
44
|
+
"mutation": true,
|
|
45
|
+
"input": "urn:harness:state-cli#/$defs/relateInput",
|
|
46
|
+
"output": "urn:harness:state-cli#/$defs/response"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "validate",
|
|
50
|
+
"mutation": false,
|
|
51
|
+
"input": "urn:harness:state-cli#/$defs/emptyInput",
|
|
52
|
+
"output": "urn:harness:state-cli#/$defs/response"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"register module": {
|
|
3
|
+
"usage": "register module NAME [--id ID]",
|
|
4
|
+
"summary": "Create a Module, or update its name with an existing ID.",
|
|
5
|
+
"options": [
|
|
6
|
+
[
|
|
7
|
+
"--id ID",
|
|
8
|
+
"Stable Module ID to create or update; omitted generates a new ID."
|
|
9
|
+
]
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"register feature": {
|
|
13
|
+
"usage": "register feature NAME [--module MODULE_ID] [--id ID]",
|
|
14
|
+
"summary": "Create or update a Feature and its Module ownership.",
|
|
15
|
+
"options": [
|
|
16
|
+
[
|
|
17
|
+
"--module MODULE_ID",
|
|
18
|
+
"Required for new Features; omitted on update retains ownership."
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"--id ID",
|
|
22
|
+
"Stable Feature ID to create or update; omitted generates a new ID."
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"register artifact": {
|
|
27
|
+
"usage": "register artifact PATH [--kind TYPE] [--module MODULE_ID] [--feature FEATURE_ID]...",
|
|
28
|
+
"summary": "Register identity and write ownership to the document at PATH and the Registry.",
|
|
29
|
+
"details": "Specify a project path. Relative paths start at the project root.",
|
|
30
|
+
"options": [
|
|
31
|
+
[
|
|
32
|
+
"--kind TYPE",
|
|
33
|
+
"Artifact kind; defaults to the existing kind, otherwise core:document."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"--module MODULE_ID",
|
|
37
|
+
"Replace ownership with this Module and supplied Features; omit to retain ownership."
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"--feature FEATURE_ID",
|
|
41
|
+
"Repeat for each Feature; requires --module in the same command."
|
|
42
|
+
]
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"locate": {
|
|
46
|
+
"usage": "locate ID",
|
|
47
|
+
"summary": "Return only the target public view; only Artifacts have a path.",
|
|
48
|
+
"details": "data: Module id/kind/name; Feature also moduleId; Artifact id/kind/title/moduleId?/featureIds/path. No related documents are expanded. Unregistered ID or missing body: invalid_reference; duplicate body: identity_conflict."
|
|
49
|
+
},
|
|
50
|
+
"list": {
|
|
51
|
+
"usage": "list [--kind TYPE]",
|
|
52
|
+
"summary": "List public entity views without resolving document paths.",
|
|
53
|
+
"details": "data.items contains id/kind and name or title with ownership fields. No path or internal locator fields are returned; missing bodies do not block listing.",
|
|
54
|
+
"options": [
|
|
55
|
+
[
|
|
56
|
+
"--kind TYPE",
|
|
57
|
+
"Filter by module, feature, artifact or an Artifact kind."
|
|
58
|
+
]
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"related": {
|
|
62
|
+
"usage": "related ID [--direction DIRECTION]",
|
|
63
|
+
"summary": "Return one-hop neighbors in items and matched edges in relations.",
|
|
64
|
+
"details": "data contains only items and relations. Items use the locate view, including Artifact paths; relations contain kind/from/to/source. Module documents require related MODULE_ID; Feature queries do not expand them. Only selected neighbors are located. Unregistered ID or missing body: invalid_reference; duplicate body: identity_conflict.",
|
|
65
|
+
"options": [
|
|
66
|
+
[
|
|
67
|
+
"--direction DIRECTION",
|
|
68
|
+
"both (default), incoming or outgoing."
|
|
69
|
+
]
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"relate": {
|
|
73
|
+
"usage": "relate FROM RELATION TO [--remove]",
|
|
74
|
+
"summary": "Add an extra relation between IDs, such as core:supersedes. Ownership uses register feature/artifact.",
|
|
75
|
+
"options": [
|
|
76
|
+
[
|
|
77
|
+
"--remove",
|
|
78
|
+
"Remove the declared relation instead of adding it."
|
|
79
|
+
]
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"validate": {
|
|
83
|
+
"usage": "validate",
|
|
84
|
+
"summary": "Check identities, ownership, document references and extra relations. Missing Registry is valid."
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:trigrams:legacy-state-sources",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"strings": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"relation": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": [
|
|
14
|
+
"kind",
|
|
15
|
+
"fromKinds",
|
|
16
|
+
"toKinds"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"kind": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"fromKinds": {
|
|
23
|
+
"$ref": "#/$defs/strings"
|
|
24
|
+
},
|
|
25
|
+
"toKinds": {
|
|
26
|
+
"$ref": "#/$defs/strings"
|
|
27
|
+
},
|
|
28
|
+
"maxOutgoing": {
|
|
29
|
+
"type": [
|
|
30
|
+
"integer",
|
|
31
|
+
"null"
|
|
32
|
+
],
|
|
33
|
+
"minimum": 0
|
|
34
|
+
},
|
|
35
|
+
"maxIncoming": {
|
|
36
|
+
"type": [
|
|
37
|
+
"integer",
|
|
38
|
+
"null"
|
|
39
|
+
],
|
|
40
|
+
"minimum": 0
|
|
41
|
+
},
|
|
42
|
+
"acyclic": {
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"package": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": [
|
|
50
|
+
"schemaVersion"
|
|
51
|
+
],
|
|
52
|
+
"anyOf": [
|
|
53
|
+
{
|
|
54
|
+
"required": [
|
|
55
|
+
"source"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"required": [
|
|
60
|
+
"extension"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"schemaVersion": {
|
|
66
|
+
"const": 1
|
|
67
|
+
},
|
|
68
|
+
"source": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"extension": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"version": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"artifactTypes": {
|
|
78
|
+
"$ref": "#/$defs/strings"
|
|
79
|
+
},
|
|
80
|
+
"relationTypes": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"$ref": "#/$defs/relation"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|