@openship/protocol 0.0.3 → 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/README.md +2 -0
- package/dist/package-meta.json +2 -2
- package/dist/skill/SKILL.md +1 -1
- package/dist/skill/references/examples/invalid/systems-ownership.json +29 -7
- package/dist/skill/references/examples/invalid/systems.json +63 -12
- package/dist/skill/references/examples/valid/systems-layered.json +332 -0
- package/dist/skill/references/examples/valid/systems.json +140 -25
- package/dist/skill/references/openship-systems.md +70 -69
- package/dist/skill/references/openship.md +1 -1
- package/dist/skill/references/schemas/systems.schema.json +519 -57
- package/package.json +1 -1
- package/src/index.d.ts +11 -4
- package/src/index.js +120 -39
package/README.md
CHANGED
|
@@ -13,3 +13,5 @@ if (imported.snapshot.kind === "systems") validateSystems(imported.snapshot.docu
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
The package contains the exact canonical `skills/openship` schemas, examples, and references. See the repository root README for the generated-skill workflow.
|
|
16
|
+
|
|
17
|
+
Version 0.1.0 replaces legacy Systems with `systemsVersion: "2.0"`: `system.layers`, `system.refinements`, and optional `system.instances`. Sources and Changes retain their 1.0 formats. Consumers must migrate; `validateSystems` explicitly rejects the legacy graph. Each layer is independently renderable, while node IDs and shared context span the entire system.
|
package/dist/package-meta.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openship": "1.0",
|
|
3
3
|
"package": "@openship/protocol",
|
|
4
|
-
"packageVersion": "0.0
|
|
4
|
+
"packageVersion": "0.1.0",
|
|
5
5
|
"source": "https://github.com/openshipdev/openship/tree/main/skills/openship",
|
|
6
|
-
"sourceCommit": "
|
|
6
|
+
"sourceCommit": "f1338ebcb6a49927383b5b7d55be70a3d966d8d2"
|
|
7
7
|
}
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Work with OpenShip v1 discovery, public source snapshots, candidate
|
|
|
5
5
|
|
|
6
6
|
# OpenShip
|
|
7
7
|
|
|
8
|
-
OpenShip lets a running project publish the source that produced it, optionally accept changes as isolated candidate versions, and optionally describe the complete software system around that source.
|
|
8
|
+
OpenShip lets a running project publish the source that produced it, optionally accept changes as isolated candidate versions, and optionally describe the complete software system around that source through ordered design layers and separate instance bindings. Systems 2.0 replaces the legacy single graph; Sources and Changes retain their 1.0 formats.
|
|
9
9
|
|
|
10
10
|
Read only the references needed for the task:
|
|
11
11
|
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
"openship": "1.0",
|
|
7
7
|
"capability": "sources",
|
|
8
8
|
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
9
|
-
"project": {
|
|
10
|
-
|
|
9
|
+
"project": {
|
|
10
|
+
"name": "Broken ownership",
|
|
11
|
+
"description": "A Systems node with non-conformant ownership."
|
|
12
|
+
},
|
|
13
|
+
"totals": {
|
|
14
|
+
"files": 0,
|
|
15
|
+
"bytes": 0
|
|
16
|
+
},
|
|
11
17
|
"files": []
|
|
12
18
|
},
|
|
13
19
|
"bundle": {
|
|
@@ -20,10 +26,26 @@
|
|
|
20
26
|
"system": {
|
|
21
27
|
"id": "broken-ownership",
|
|
22
28
|
"name": "Broken ownership",
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
"layers": [
|
|
30
|
+
{
|
|
31
|
+
"rootNodeId": "s.root",
|
|
32
|
+
"nodes": [
|
|
33
|
+
{
|
|
34
|
+
"id": "s.root",
|
|
35
|
+
"kind": "Root",
|
|
36
|
+
"name": "Broken ownership",
|
|
37
|
+
"metadata": {
|
|
38
|
+
"ownership": "partner"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"edges": [],
|
|
43
|
+
"id": "technical",
|
|
44
|
+
"name": "Technical",
|
|
45
|
+
"role": "technical"
|
|
46
|
+
}
|
|
26
47
|
],
|
|
27
|
-
"
|
|
28
|
-
}
|
|
48
|
+
"refinements": []
|
|
49
|
+
},
|
|
50
|
+
"systemsVersion": "2.0"
|
|
29
51
|
}
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
"openship": "1.0",
|
|
7
7
|
"capability": "sources",
|
|
8
8
|
"digest": "sha256:1d322539e651a3c2d7c51eb8b33160627395b9601bff909e599771b806d9e565",
|
|
9
|
-
"project": {
|
|
10
|
-
|
|
9
|
+
"project": {
|
|
10
|
+
"name": "Broken",
|
|
11
|
+
"description": "The runtime edge targets a Library."
|
|
12
|
+
},
|
|
13
|
+
"totals": {
|
|
14
|
+
"files": 0,
|
|
15
|
+
"bytes": 0
|
|
16
|
+
},
|
|
11
17
|
"files": []
|
|
12
18
|
},
|
|
13
19
|
"bundle": {
|
|
@@ -20,15 +26,60 @@
|
|
|
20
26
|
"system": {
|
|
21
27
|
"id": "broken",
|
|
22
28
|
"name": "Broken",
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
"layers": [
|
|
30
|
+
{
|
|
31
|
+
"rootNodeId": "s.root",
|
|
32
|
+
"nodes": [
|
|
33
|
+
{
|
|
34
|
+
"id": "s.root",
|
|
35
|
+
"kind": "Root",
|
|
36
|
+
"name": "Broken",
|
|
37
|
+
"metadata": {
|
|
38
|
+
"ownership": "first_party"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "h.runtime",
|
|
43
|
+
"kind": "Host",
|
|
44
|
+
"name": "Runtime",
|
|
45
|
+
"parentId": "s.root",
|
|
46
|
+
"metadata": {
|
|
47
|
+
"ownership": "first_party"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "p.web",
|
|
52
|
+
"kind": "Process",
|
|
53
|
+
"name": "Web",
|
|
54
|
+
"parentId": "h.runtime",
|
|
55
|
+
"metadata": {
|
|
56
|
+
"ownership": "first_party"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "l.config",
|
|
61
|
+
"kind": "Library",
|
|
62
|
+
"name": "Config",
|
|
63
|
+
"metadata": {
|
|
64
|
+
"ownership": "third_party"
|
|
65
|
+
},
|
|
66
|
+
"parentId": "s.root"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"edges": [
|
|
70
|
+
{
|
|
71
|
+
"id": "e.invalid",
|
|
72
|
+
"type": "Runtime",
|
|
73
|
+
"fromNodeId": "p.web",
|
|
74
|
+
"toNodeId": "l.config"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"id": "technical",
|
|
78
|
+
"name": "Technical",
|
|
79
|
+
"role": "technical"
|
|
80
|
+
}
|
|
29
81
|
],
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
82
|
+
"refinements": []
|
|
83
|
+
},
|
|
84
|
+
"systemsVersion": "2.0"
|
|
34
85
|
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openship": "1.0",
|
|
3
|
+
"capability": "systems",
|
|
4
|
+
"source": {
|
|
5
|
+
"manifest": {
|
|
6
|
+
"openship": "1.0",
|
|
7
|
+
"capability": "sources",
|
|
8
|
+
"digest": "sha256:1d322539e651a3c2d7c51eb8b33160627395b9601bff909e599771b806d9e565",
|
|
9
|
+
"project": {
|
|
10
|
+
"name": "Example",
|
|
11
|
+
"description": "An example OpenShip project."
|
|
12
|
+
},
|
|
13
|
+
"totals": {
|
|
14
|
+
"files": 2,
|
|
15
|
+
"bytes": 53
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"path": "app/page.js",
|
|
20
|
+
"size": 34,
|
|
21
|
+
"sha256": "6ce070542590adb63fd9621ff65be91446f8bd9b65465cda5e4ec43e5d86dc5e",
|
|
22
|
+
"encoding": "utf-8",
|
|
23
|
+
"mediaType": "text/plain; charset=utf-8",
|
|
24
|
+
"type": "file"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "package.json",
|
|
28
|
+
"size": 19,
|
|
29
|
+
"sha256": "9579cf52285b23b618b615d704b19d04ff591ae513f6ae34ef37e2b9a067cb12",
|
|
30
|
+
"encoding": "utf-8",
|
|
31
|
+
"mediaType": "application/json; charset=utf-8",
|
|
32
|
+
"type": "file"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"bundle": {
|
|
37
|
+
"openship": "1.0",
|
|
38
|
+
"capability": "sources",
|
|
39
|
+
"digest": "sha256:1d322539e651a3c2d7c51eb8b33160627395b9601bff909e599771b806d9e565",
|
|
40
|
+
"files": {
|
|
41
|
+
"app/page.js": {
|
|
42
|
+
"encoding": "utf-8",
|
|
43
|
+
"content": "export default function Page() {}\n"
|
|
44
|
+
},
|
|
45
|
+
"package.json": {
|
|
46
|
+
"encoding": "utf-8",
|
|
47
|
+
"content": "{\"name\":\"example\"}\n"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"system": {
|
|
53
|
+
"id": "example-system",
|
|
54
|
+
"name": "Example system",
|
|
55
|
+
"context": {
|
|
56
|
+
"concerns": [
|
|
57
|
+
"Interfaces",
|
|
58
|
+
"Implementation"
|
|
59
|
+
],
|
|
60
|
+
"documents": [
|
|
61
|
+
{
|
|
62
|
+
"kind": "Document",
|
|
63
|
+
"hash": "sha256:77760f8cb9fdaaadd3c22612d97fba630f78730c8d750c6cce02754b689b11da",
|
|
64
|
+
"title": "API contract",
|
|
65
|
+
"language": "en",
|
|
66
|
+
"text": "The API returns JSON."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "Skill",
|
|
70
|
+
"hash": "sha256:bae5f866c2994c1cec740965e45935920376a2df1fb933e798c3e2c3b8c0e391",
|
|
71
|
+
"title": "Node implementation",
|
|
72
|
+
"language": "en",
|
|
73
|
+
"text": "Use Node.js."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"kind": "Prompt",
|
|
77
|
+
"hash": "sha256:416a3efe045d89a00fa0cca4516b8bdd442a8f65a42e35a5c102067f3ecb429d",
|
|
78
|
+
"title": "System prompt",
|
|
79
|
+
"language": "en",
|
|
80
|
+
"text": "Keep changes minimal."
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"matrix": [
|
|
84
|
+
{
|
|
85
|
+
"nodeId": "p.web",
|
|
86
|
+
"concern": "Interfaces",
|
|
87
|
+
"documentRefs": [
|
|
88
|
+
"sha256:77760f8cb9fdaaadd3c22612d97fba630f78730c8d750c6cce02754b689b11da"
|
|
89
|
+
],
|
|
90
|
+
"skillRefs": []
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"systemPromptRefs": [
|
|
94
|
+
"sha256:416a3efe045d89a00fa0cca4516b8bdd442a8f65a42e35a5c102067f3ecb429d"
|
|
95
|
+
],
|
|
96
|
+
"artifacts": [
|
|
97
|
+
{
|
|
98
|
+
"id": "a.web.code",
|
|
99
|
+
"nodeId": "p.web",
|
|
100
|
+
"concern": "Implementation",
|
|
101
|
+
"type": "Code",
|
|
102
|
+
"sourcePaths": [
|
|
103
|
+
"app/page.js"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"layers": [
|
|
109
|
+
{
|
|
110
|
+
"id": "logical",
|
|
111
|
+
"name": "Logical",
|
|
112
|
+
"role": "logical",
|
|
113
|
+
"rootNodeId": "logical.root",
|
|
114
|
+
"nodes": [
|
|
115
|
+
{
|
|
116
|
+
"id": "logical.root",
|
|
117
|
+
"name": "logical.root",
|
|
118
|
+
"kind": "Root",
|
|
119
|
+
"metadata": {
|
|
120
|
+
"ownership": "first_party"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "logical.web",
|
|
125
|
+
"name": "logical.web",
|
|
126
|
+
"kind": "Block",
|
|
127
|
+
"parentId": "logical.root",
|
|
128
|
+
"metadata": {
|
|
129
|
+
"ownership": "first_party"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "logical.data",
|
|
134
|
+
"name": "logical.data",
|
|
135
|
+
"kind": "Store",
|
|
136
|
+
"parentId": "logical.root",
|
|
137
|
+
"metadata": {
|
|
138
|
+
"ownership": "first_party"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"edges": [
|
|
143
|
+
{
|
|
144
|
+
"id": "uses",
|
|
145
|
+
"type": "Runtime",
|
|
146
|
+
"fromNodeId": "logical.web",
|
|
147
|
+
"toNodeId": "logical.data"
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"rootNodeId": "s.root",
|
|
153
|
+
"nodes": [
|
|
154
|
+
{
|
|
155
|
+
"id": "s.root",
|
|
156
|
+
"kind": "Root",
|
|
157
|
+
"name": "Example",
|
|
158
|
+
"metadata": {
|
|
159
|
+
"ownership": "first_party"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "h.runtime",
|
|
164
|
+
"kind": "Host",
|
|
165
|
+
"name": "Application runtime",
|
|
166
|
+
"parentId": "s.root",
|
|
167
|
+
"metadata": {
|
|
168
|
+
"ownership": "first_party"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "p.web",
|
|
173
|
+
"kind": "Process",
|
|
174
|
+
"name": "Web process",
|
|
175
|
+
"parentId": "h.runtime",
|
|
176
|
+
"sourceSelectors": [
|
|
177
|
+
"app/**"
|
|
178
|
+
],
|
|
179
|
+
"metadata": {
|
|
180
|
+
"ownership": "first_party"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "l.config",
|
|
185
|
+
"kind": "Library",
|
|
186
|
+
"name": "Project configuration",
|
|
187
|
+
"sourceSelectors": [
|
|
188
|
+
"package.json"
|
|
189
|
+
],
|
|
190
|
+
"metadata": {
|
|
191
|
+
"ownership": "third_party"
|
|
192
|
+
},
|
|
193
|
+
"parentId": "s.root"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "technical.data",
|
|
197
|
+
"name": "technical.data",
|
|
198
|
+
"kind": "Store",
|
|
199
|
+
"parentId": "s.root",
|
|
200
|
+
"metadata": {
|
|
201
|
+
"ownership": "first_party"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"edges": [
|
|
206
|
+
{
|
|
207
|
+
"id": "e.web.config",
|
|
208
|
+
"type": "Dependency",
|
|
209
|
+
"fromNodeId": "p.web",
|
|
210
|
+
"toNodeId": "l.config"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"id": "technical",
|
|
214
|
+
"name": "Technical",
|
|
215
|
+
"role": "technical"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"id": "provider",
|
|
219
|
+
"name": "Provider",
|
|
220
|
+
"role": "provider",
|
|
221
|
+
"rootNodeId": "provider.root",
|
|
222
|
+
"nodes": [
|
|
223
|
+
{
|
|
224
|
+
"id": "provider.root",
|
|
225
|
+
"name": "provider.root",
|
|
226
|
+
"kind": "Root",
|
|
227
|
+
"metadata": {
|
|
228
|
+
"ownership": "first_party"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "provider.web",
|
|
233
|
+
"name": "provider.web",
|
|
234
|
+
"kind": "Process",
|
|
235
|
+
"parentId": "provider.root",
|
|
236
|
+
"metadata": {
|
|
237
|
+
"ownership": "first_party"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "provider.data",
|
|
242
|
+
"name": "provider.data",
|
|
243
|
+
"kind": "Store",
|
|
244
|
+
"parentId": "provider.root",
|
|
245
|
+
"metadata": {
|
|
246
|
+
"ownership": "first_party"
|
|
247
|
+
},
|
|
248
|
+
"configuration": [
|
|
249
|
+
{
|
|
250
|
+
"name": "region",
|
|
251
|
+
"description": "Intended region",
|
|
252
|
+
"required": true
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "provider",
|
|
256
|
+
"description": "Database provider",
|
|
257
|
+
"required": true,
|
|
258
|
+
"value": "Neon"
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"edges": [
|
|
264
|
+
{
|
|
265
|
+
"id": "uses",
|
|
266
|
+
"type": "Runtime",
|
|
267
|
+
"fromNodeId": "provider.web",
|
|
268
|
+
"toNodeId": "provider.data"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"refinements": [
|
|
274
|
+
{
|
|
275
|
+
"id": "web",
|
|
276
|
+
"fromNodeId": "p.web",
|
|
277
|
+
"toNodeId": "logical.web"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"id": "data",
|
|
281
|
+
"fromNodeId": "technical.data",
|
|
282
|
+
"toNodeId": "logical.data"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"id": "host.web",
|
|
286
|
+
"fromNodeId": "provider.web",
|
|
287
|
+
"toNodeId": "p.web"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "host.data",
|
|
291
|
+
"fromNodeId": "provider.data",
|
|
292
|
+
"toNodeId": "technical.data"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"instances": [
|
|
296
|
+
{
|
|
297
|
+
"id": "production",
|
|
298
|
+
"name": "Production target",
|
|
299
|
+
"environment": "production",
|
|
300
|
+
"layerId": "provider",
|
|
301
|
+
"bindings": [
|
|
302
|
+
{
|
|
303
|
+
"nodeId": "provider.web"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"nodeId": "provider.data",
|
|
307
|
+
"configuration": [
|
|
308
|
+
{
|
|
309
|
+
"name": "DATABASE_URL",
|
|
310
|
+
"description": "Database connection",
|
|
311
|
+
"required": true,
|
|
312
|
+
"sensitive": true,
|
|
313
|
+
"secretRef": {
|
|
314
|
+
"nodeId": "provider.web",
|
|
315
|
+
"key": "DATABASE_URL"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"state": {
|
|
320
|
+
"appliedMigration": "001.sql",
|
|
321
|
+
"snapshot": {
|
|
322
|
+
"ref": "example:sample-data",
|
|
323
|
+
"capturedAt": "2026-09-09T00:00:00Z"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
"systemsVersion": "2.0"
|
|
332
|
+
}
|