@documentation-robotics/cli 0.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/PYTHON_CLI_PARITY.md +265 -0
- package/PYTHON_CLI_STRUCTURE_UPDATE.md +246 -0
- package/README.md +926 -0
- package/biome.json +42 -0
- package/bunfig.toml +3 -0
- package/dist/ai/claude-client.js +71 -0
- package/dist/ai/claude-client.js.map +7 -0
- package/dist/ai/context-provider.js +129 -0
- package/dist/ai/context-provider.js.map +7 -0
- package/dist/ai/tools.js +231 -0
- package/dist/ai/tools.js.map +7 -0
- package/dist/cli.js +224 -0
- package/dist/cli.js.map +7 -0
- package/dist/commands/add.js +51 -0
- package/dist/commands/add.js.map +7 -0
- package/dist/commands/changeset.js +174 -0
- package/dist/commands/changeset.js.map +7 -0
- package/dist/commands/chat.js +111 -0
- package/dist/commands/chat.js.map +7 -0
- package/dist/commands/conformance.js +132 -0
- package/dist/commands/conformance.js.map +7 -0
- package/dist/commands/delete.js +31 -0
- package/dist/commands/delete.js.map +7 -0
- package/dist/commands/element.js +28 -0
- package/dist/commands/element.js.map +7 -0
- package/dist/commands/export.js +65 -0
- package/dist/commands/export.js.map +7 -0
- package/dist/commands/info.js +40 -0
- package/dist/commands/info.js.map +7 -0
- package/dist/commands/init.js +45 -0
- package/dist/commands/init.js.map +7 -0
- package/dist/commands/list.js +32 -0
- package/dist/commands/list.js.map +7 -0
- package/dist/commands/migrate.js +36 -0
- package/dist/commands/migrate.js.map +7 -0
- package/dist/commands/project.js +74 -0
- package/dist/commands/project.js.map +7 -0
- package/dist/commands/relationship.js +118 -0
- package/dist/commands/relationship.js.map +7 -0
- package/dist/commands/search.js +48 -0
- package/dist/commands/search.js.map +7 -0
- package/dist/commands/show.js +38 -0
- package/dist/commands/show.js.map +7 -0
- package/dist/commands/trace.js +60 -0
- package/dist/commands/trace.js.map +7 -0
- package/dist/commands/update.js +37 -0
- package/dist/commands/update.js.map +7 -0
- package/dist/commands/upgrade.js +152 -0
- package/dist/commands/upgrade.js.map +7 -0
- package/dist/commands/validate.js +71 -0
- package/dist/commands/validate.js.map +7 -0
- package/dist/commands/version.js +20 -0
- package/dist/commands/version.js.map +7 -0
- package/dist/commands/visualize.js +51 -0
- package/dist/commands/visualize.js.map +7 -0
- package/dist/core/active-changeset.js +52 -0
- package/dist/core/active-changeset.js.map +7 -0
- package/dist/core/changeset.js +244 -0
- package/dist/core/changeset.js.map +7 -0
- package/dist/core/dependency-tracker.js +322 -0
- package/dist/core/dependency-tracker.js.map +7 -0
- package/dist/core/element.js +65 -0
- package/dist/core/element.js.map +7 -0
- package/dist/core/layer.js +75 -0
- package/dist/core/layer.js.map +7 -0
- package/dist/core/manifest.js +57 -0
- package/dist/core/manifest.js.map +7 -0
- package/dist/core/migration-registry.js +131 -0
- package/dist/core/migration-registry.js.map +7 -0
- package/dist/core/model.js +455 -0
- package/dist/core/model.js.map +7 -0
- package/dist/core/projection-engine.js +288 -0
- package/dist/core/projection-engine.js.map +7 -0
- package/dist/core/reference-registry.js +188 -0
- package/dist/core/reference-registry.js.map +7 -0
- package/dist/core/relationship-registry.js +114 -0
- package/dist/core/relationship-registry.js.map +7 -0
- package/dist/core/relationships.js +78 -0
- package/dist/core/relationships.js.map +7 -0
- package/dist/export/archimate-exporter.js +111 -0
- package/dist/export/archimate-exporter.js.map +7 -0
- package/dist/export/export-manager.js +63 -0
- package/dist/export/export-manager.js.map +7 -0
- package/dist/export/graphml-exporter.js +39 -0
- package/dist/export/graphml-exporter.js.map +7 -0
- package/dist/export/index.js +17 -0
- package/dist/export/index.js.map +7 -0
- package/dist/export/json-schema-exporter.js +60 -0
- package/dist/export/json-schema-exporter.js.map +7 -0
- package/dist/export/markdown-exporter.js +99 -0
- package/dist/export/markdown-exporter.js.map +7 -0
- package/dist/export/openapi-exporter.js +85 -0
- package/dist/export/openapi-exporter.js.map +7 -0
- package/dist/export/plantuml-exporter.js +60 -0
- package/dist/export/plantuml-exporter.js.map +7 -0
- package/dist/export/types.js +36 -0
- package/dist/export/types.js.map +7 -0
- package/dist/schemas/bundled/01-motivation-layer.schema.json +942 -0
- package/dist/schemas/bundled/02-business-layer.schema.json +1293 -0
- package/dist/schemas/bundled/03-security-layer.schema.json +2177 -0
- package/dist/schemas/bundled/04-application-layer.schema.json +1328 -0
- package/dist/schemas/bundled/05-technology-layer.schema.json +1465 -0
- package/dist/schemas/bundled/06-api-layer.schema.json +1743 -0
- package/dist/schemas/bundled/07-data-model-layer.schema.json +1253 -0
- package/dist/schemas/bundled/08-datastore-layer.schema.json +892 -0
- package/dist/schemas/bundled/09-ux-layer.schema.json +1506 -0
- package/dist/schemas/bundled/10-navigation-layer.schema.json +843 -0
- package/dist/schemas/bundled/11-apm-observability-layer.schema.json +1430 -0
- package/dist/schemas/bundled/12-testing-layer.schema.json +1091 -0
- package/dist/schemas/bundled/common/layer-extensions.schema.json +266 -0
- package/dist/schemas/bundled/common/predicates.schema.json +493 -0
- package/dist/schemas/bundled/common/relationships.schema.json +791 -0
- package/dist/schemas/bundled/common/source-references.schema.json +71 -0
- package/dist/schemas/bundled/link-registry.json +1839 -0
- package/dist/schemas/bundled/link-registry.schema.json +339 -0
- package/dist/schemas/bundled/relationship-catalog.json +1302 -0
- package/dist/schemas/bundled/relationship-type.schema.json +221 -0
- package/dist/server/server.js +1207 -0
- package/dist/server/server.js.map +7 -0
- package/dist/server/telemetry-middleware.js +24 -0
- package/dist/server/telemetry-middleware.js.map +7 -0
- package/dist/telemetry/console-interceptor.js +34 -0
- package/dist/telemetry/console-interceptor.js.map +7 -0
- package/dist/telemetry/index.js +54 -0
- package/dist/telemetry/index.js.map +7 -0
- package/dist/telemetry/resilient-exporter.js +41 -0
- package/dist/telemetry/resilient-exporter.js.map +7 -0
- package/dist/telemetry/resilient-log-exporter.js +41 -0
- package/dist/telemetry/resilient-log-exporter.js.map +7 -0
- package/dist/telemetry/test-instrumentation.js +32 -0
- package/dist/telemetry/test-instrumentation.js.map +7 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +7 -0
- package/dist/utils/element-utils.js +11 -0
- package/dist/utils/element-utils.js.map +7 -0
- package/dist/utils/errors.js +105 -0
- package/dist/utils/errors.js.map +7 -0
- package/dist/utils/file-io.js +69 -0
- package/dist/utils/file-io.js.map +7 -0
- package/dist/utils/globals.js +28 -0
- package/dist/utils/globals.js.map +7 -0
- package/dist/utils/model-path.js +22 -0
- package/dist/utils/model-path.js.map +7 -0
- package/dist/utils/project-paths.js +45 -0
- package/dist/utils/project-paths.js.map +7 -0
- package/dist/utils/spec-installer.js +85 -0
- package/dist/utils/spec-installer.js.map +7 -0
- package/dist/utils/spec-version.js +33 -0
- package/dist/utils/spec-version.js.map +7 -0
- package/dist/validators/index.js +15 -0
- package/dist/validators/index.js.map +7 -0
- package/dist/validators/naming-validator.js +82 -0
- package/dist/validators/naming-validator.js.map +7 -0
- package/dist/validators/reference-validator.js +106 -0
- package/dist/validators/reference-validator.js.map +7 -0
- package/dist/validators/schema-validator.js +148 -0
- package/dist/validators/schema-validator.js.map +7 -0
- package/dist/validators/semantic-validator.js +80 -0
- package/dist/validators/semantic-validator.js.map +7 -0
- package/dist/validators/types.js +48 -0
- package/dist/validators/types.js.map +7 -0
- package/dist/validators/validator.js +67 -0
- package/dist/validators/validator.js.map +7 -0
- package/docs/TEST-INSTRUMENTATION.md +405 -0
- package/docs/telemetry.md +427 -0
- package/package.json +70 -0
- package/test-debug.js +33 -0
- package/test-special.mjs +46 -0
- package/test_runner.ts +7 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://documentation-robotics.org/schemas/common/layer-extensions.schema.json",
|
|
4
|
+
"title": "Layer Schema Extensions",
|
|
5
|
+
"description": "Definitions for intraLayerRelationships and crossLayerRelationships sections in layer schemas",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
|
|
8
|
+
"definitions": {
|
|
9
|
+
"layerMetadata": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"description": "Metadata about the layer and its relationship support",
|
|
12
|
+
"properties": {
|
|
13
|
+
"layerId": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^\\d{2}-[a-z-]+$",
|
|
16
|
+
"description": "Layer identifier (e.g., '12-testing')"
|
|
17
|
+
},
|
|
18
|
+
"layerName": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Human-readable layer name"
|
|
21
|
+
},
|
|
22
|
+
"intraLayerRelationshipSupport": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"description": "Whether this layer supports relationships between its own entities"
|
|
25
|
+
},
|
|
26
|
+
"crossLayerRelationshipSupport": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Whether this layer supports relationships to/from other layers"
|
|
29
|
+
},
|
|
30
|
+
"relationshipCatalogVersion": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
33
|
+
"description": "Version of relationship-catalog.json this layer is aligned with"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["layerId", "layerName", "relationshipCatalogVersion"],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
"relationshipExample": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Example of a relationship between two elements",
|
|
43
|
+
"properties": {
|
|
44
|
+
"source": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Source element type or ID"
|
|
47
|
+
},
|
|
48
|
+
"target": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Target element type or ID"
|
|
51
|
+
},
|
|
52
|
+
"description": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Human-readable description of this relationship instance"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": ["source", "target", "description"],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
"intraLayerRelationship": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"description": "Definition of an allowed relationship within this layer",
|
|
64
|
+
"properties": {
|
|
65
|
+
"relationshipTypeId": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
68
|
+
"description": "ID from relationship-catalog.json (e.g., 'composition', 'aggregation')"
|
|
69
|
+
},
|
|
70
|
+
"sourceTypes": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Element type name (e.g., 'TestCoverageModel')"
|
|
75
|
+
},
|
|
76
|
+
"minItems": 1,
|
|
77
|
+
"description": "Element types that can be the source of this relationship"
|
|
78
|
+
},
|
|
79
|
+
"targetTypes": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Element type name (e.g., 'TestCoverageTarget')"
|
|
84
|
+
},
|
|
85
|
+
"minItems": 1,
|
|
86
|
+
"description": "Element types that can be the target of this relationship"
|
|
87
|
+
},
|
|
88
|
+
"examples": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/definitions/relationshipExample"
|
|
92
|
+
},
|
|
93
|
+
"minItems": 1,
|
|
94
|
+
"description": "Example usages of this relationship within the layer"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": ["relationshipTypeId", "sourceTypes", "targetTypes"],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
"crossLayerRelationshipExample": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"description": "Example of a cross-layer relationship",
|
|
104
|
+
"properties": {
|
|
105
|
+
"source": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Source element ID or type"
|
|
108
|
+
},
|
|
109
|
+
"sourceType": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Source element type name"
|
|
112
|
+
},
|
|
113
|
+
"target": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Target element ID or type"
|
|
116
|
+
},
|
|
117
|
+
"targetType": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "Target element type name"
|
|
120
|
+
},
|
|
121
|
+
"description": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "Human-readable description of this relationship"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": ["source", "sourceType", "target", "targetType", "description"],
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
"crossLayerRelationship": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"description": "Definition of a cross-layer relationship",
|
|
133
|
+
"properties": {
|
|
134
|
+
"id": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
137
|
+
"description": "Unique identifier for this relationship type (kebab-case)"
|
|
138
|
+
},
|
|
139
|
+
"predicate": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
142
|
+
"description": "Forward direction predicate (e.g., 'supports-goals', 'realizes')"
|
|
143
|
+
},
|
|
144
|
+
"inversePredicate": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
147
|
+
"description": "Reverse direction predicate (e.g., 'supported-by', 'realized-by')"
|
|
148
|
+
},
|
|
149
|
+
"targetLayer": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"pattern": "^\\d{2}-[a-z-]+$",
|
|
152
|
+
"description": "Target layer ID (e.g., '01-motivation')"
|
|
153
|
+
},
|
|
154
|
+
"targetTypes": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "Element type name in target layer"
|
|
159
|
+
},
|
|
160
|
+
"minItems": 1,
|
|
161
|
+
"description": "Element types in target layer this relationship can point to"
|
|
162
|
+
},
|
|
163
|
+
"sourceTypes": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "Element type name in source layer"
|
|
168
|
+
},
|
|
169
|
+
"description": "Element types in this layer that can have this relationship (optional for incoming)"
|
|
170
|
+
},
|
|
171
|
+
"fieldPath": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^([a-z][a-zA-Z0-9]*\\.[a-z][a-z0-9-]*|x-[a-z][a-z0-9-]*)$",
|
|
174
|
+
"description": "Property path that encodes this relationship (e.g., 'motivation.supports-goals')"
|
|
175
|
+
},
|
|
176
|
+
"cardinality": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": ["single", "array"],
|
|
179
|
+
"description": "Whether this relationship is one-to-one or one-to-many"
|
|
180
|
+
},
|
|
181
|
+
"format": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": ["uuid", "id", "string", "duration", "percentage", "path", "enum"],
|
|
184
|
+
"description": "Expected format of the relationship value"
|
|
185
|
+
},
|
|
186
|
+
"strength": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": ["critical", "high", "medium", "low"],
|
|
189
|
+
"description": "Importance/strength of this relationship"
|
|
190
|
+
},
|
|
191
|
+
"required": {
|
|
192
|
+
"type": "boolean",
|
|
193
|
+
"description": "Whether this relationship is mandatory for the source element"
|
|
194
|
+
},
|
|
195
|
+
"description": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"minLength": 10,
|
|
198
|
+
"description": "Clear description of what this relationship represents"
|
|
199
|
+
},
|
|
200
|
+
"examples": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"$ref": "#/definitions/crossLayerRelationshipExample"
|
|
204
|
+
},
|
|
205
|
+
"description": "Example usages of this cross-layer relationship"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": [
|
|
209
|
+
"id",
|
|
210
|
+
"predicate",
|
|
211
|
+
"inversePredicate",
|
|
212
|
+
"targetLayer",
|
|
213
|
+
"targetTypes",
|
|
214
|
+
"fieldPath",
|
|
215
|
+
"cardinality",
|
|
216
|
+
"format",
|
|
217
|
+
"description"
|
|
218
|
+
],
|
|
219
|
+
"additionalProperties": false
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
"intraLayerRelationships": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"description": "Relationships between entities within this layer",
|
|
225
|
+
"properties": {
|
|
226
|
+
"$comment": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"allowed": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"items": {
|
|
232
|
+
"$ref": "#/definitions/intraLayerRelationship"
|
|
233
|
+
},
|
|
234
|
+
"description": "List of allowed relationship types within this layer"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": ["allowed"],
|
|
238
|
+
"additionalProperties": false
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
"crossLayerRelationships": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"description": "Relationships to/from entities in other layers",
|
|
244
|
+
"properties": {
|
|
245
|
+
"$comment": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"outgoing": {
|
|
249
|
+
"type": "array",
|
|
250
|
+
"items": {
|
|
251
|
+
"$ref": "#/definitions/crossLayerRelationship"
|
|
252
|
+
},
|
|
253
|
+
"description": "Relationships FROM this layer TO other layers"
|
|
254
|
+
},
|
|
255
|
+
"incoming": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"items": {
|
|
258
|
+
"$ref": "#/definitions/crossLayerRelationship"
|
|
259
|
+
},
|
|
260
|
+
"description": "Relationships TO this layer FROM other layers"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"additionalProperties": false
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|