@kungfu-tech/kfd 1.0.0-alpha.2 → 1.0.0-alpha.4

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,348 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-3/collaboration-interface.schema.json",
4
+ "title": "KFD-3 collaboration interface",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard",
10
+ "product",
11
+ "sourceRegistry",
12
+ "participants",
13
+ "minimalEntrypoints",
14
+ "surfaces",
15
+ "transparentConstraints",
16
+ "choicePaths",
17
+ "closure"
18
+ ],
19
+ "properties": {
20
+ "schemaVersion": {
21
+ "const": 1
22
+ },
23
+ "contract": {
24
+ "const": "kfd-3-collaboration-interface"
25
+ },
26
+ "standard": {
27
+ "const": "kfd-3"
28
+ },
29
+ "product": {
30
+ "type": "object",
31
+ "required": [
32
+ "name",
33
+ "version"
34
+ ],
35
+ "properties": {
36
+ "name": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "version": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ },
44
+ "repository": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ },
51
+ "sourceRegistry": {
52
+ "$ref": "#/$defs/artifactPointer"
53
+ },
54
+ "participants": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "$ref": "#/$defs/participant"
59
+ }
60
+ },
61
+ "minimalEntrypoints": {
62
+ "type": "array",
63
+ "minItems": 1,
64
+ "items": {
65
+ "$ref": "#/$defs/entrypoint"
66
+ }
67
+ },
68
+ "surfaces": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": {
72
+ "$ref": "#/$defs/surface"
73
+ }
74
+ },
75
+ "transparentConstraints": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/$defs/transparentConstraint"
79
+ }
80
+ },
81
+ "choicePaths": {
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/$defs/choicePath"
85
+ }
86
+ },
87
+ "closure": {
88
+ "type": "object",
89
+ "required": [
90
+ "classificationMode",
91
+ "unclassifiedEntrypointsPolicy"
92
+ ],
93
+ "properties": {
94
+ "classificationMode": {
95
+ "enum": [
96
+ "closed-world",
97
+ "declared-open"
98
+ ]
99
+ },
100
+ "unclassifiedEntrypointsPolicy": {
101
+ "enum": [
102
+ "fail",
103
+ "warn",
104
+ "documented-open"
105
+ ]
106
+ },
107
+ "reachableSurfaceSource": {
108
+ "type": "string",
109
+ "minLength": 1
110
+ }
111
+ },
112
+ "additionalProperties": true
113
+ }
114
+ },
115
+ "additionalProperties": true,
116
+ "$defs": {
117
+ "artifactPointer": {
118
+ "type": "object",
119
+ "required": [
120
+ "path"
121
+ ],
122
+ "properties": {
123
+ "path": {
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ "schemaId": {
128
+ "type": "string",
129
+ "format": "uri"
130
+ },
131
+ "sha256": {
132
+ "type": "string",
133
+ "pattern": "^[0-9a-f]{64}$"
134
+ }
135
+ },
136
+ "additionalProperties": true
137
+ },
138
+ "participant": {
139
+ "type": "object",
140
+ "required": [
141
+ "id",
142
+ "kind",
143
+ "description"
144
+ ],
145
+ "properties": {
146
+ "id": {
147
+ "type": "string",
148
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
149
+ },
150
+ "kind": {
151
+ "enum": [
152
+ "human",
153
+ "agent",
154
+ "operator",
155
+ "extension-author",
156
+ "api-consumer",
157
+ "hosted-service-user",
158
+ "service-integrator",
159
+ "maintainer",
160
+ "other"
161
+ ]
162
+ },
163
+ "description": {
164
+ "type": "string",
165
+ "minLength": 1
166
+ }
167
+ },
168
+ "additionalProperties": true
169
+ },
170
+ "entrypoint": {
171
+ "type": "object",
172
+ "required": [
173
+ "id",
174
+ "surface",
175
+ "participants"
176
+ ],
177
+ "properties": {
178
+ "id": {
179
+ "type": "string",
180
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
181
+ },
182
+ "surface": {
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "participants": {
187
+ "type": "array",
188
+ "minItems": 1,
189
+ "items": {
190
+ "type": "string",
191
+ "minLength": 1
192
+ }
193
+ },
194
+ "purpose": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ }
198
+ },
199
+ "additionalProperties": true
200
+ },
201
+ "surface": {
202
+ "type": "object",
203
+ "required": [
204
+ "id",
205
+ "kind",
206
+ "participants",
207
+ "value",
208
+ "discoverability"
209
+ ],
210
+ "properties": {
211
+ "id": {
212
+ "type": "string",
213
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
214
+ },
215
+ "kind": {
216
+ "enum": [
217
+ "cli-command",
218
+ "json-api",
219
+ "markdown-doc",
220
+ "skill",
221
+ "gui",
222
+ "web",
223
+ "config",
224
+ "envelope",
225
+ "package",
226
+ "protocol",
227
+ "other"
228
+ ]
229
+ },
230
+ "participants": {
231
+ "type": "array",
232
+ "minItems": 1,
233
+ "items": {
234
+ "type": "string",
235
+ "minLength": 1
236
+ }
237
+ },
238
+ "value": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ },
242
+ "discoverability": {
243
+ "type": "object",
244
+ "required": [
245
+ "fromMinimalEntrypoint"
246
+ ],
247
+ "properties": {
248
+ "fromMinimalEntrypoint": {
249
+ "type": "boolean"
250
+ },
251
+ "path": {
252
+ "type": "string",
253
+ "minLength": 1
254
+ }
255
+ },
256
+ "additionalProperties": true
257
+ },
258
+ "maturity": {
259
+ "type": "string",
260
+ "minLength": 1
261
+ }
262
+ },
263
+ "additionalProperties": true
264
+ },
265
+ "transparentConstraint": {
266
+ "type": "object",
267
+ "required": [
268
+ "id",
269
+ "appliesTo",
270
+ "restriction",
271
+ "rationale",
272
+ "reviewPath"
273
+ ],
274
+ "properties": {
275
+ "id": {
276
+ "type": "string",
277
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
278
+ },
279
+ "appliesTo": {
280
+ "type": "array",
281
+ "minItems": 1,
282
+ "items": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ }
286
+ },
287
+ "restriction": {
288
+ "type": "string",
289
+ "minLength": 1
290
+ },
291
+ "rationale": {
292
+ "type": "string",
293
+ "minLength": 1
294
+ },
295
+ "reviewPath": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ }
299
+ },
300
+ "additionalProperties": true
301
+ },
302
+ "choicePath": {
303
+ "type": "object",
304
+ "required": [
305
+ "id",
306
+ "participants",
307
+ "choices"
308
+ ],
309
+ "properties": {
310
+ "id": {
311
+ "type": "string",
312
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
313
+ },
314
+ "participants": {
315
+ "type": "array",
316
+ "minItems": 1,
317
+ "items": {
318
+ "type": "string",
319
+ "minLength": 1
320
+ }
321
+ },
322
+ "choices": {
323
+ "type": "array",
324
+ "minItems": 1,
325
+ "items": {
326
+ "type": "object",
327
+ "required": [
328
+ "id",
329
+ "label"
330
+ ],
331
+ "properties": {
332
+ "id": {
333
+ "type": "string",
334
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
335
+ },
336
+ "label": {
337
+ "type": "string",
338
+ "minLength": 1
339
+ }
340
+ },
341
+ "additionalProperties": true
342
+ }
343
+ }
344
+ },
345
+ "additionalProperties": true
346
+ }
347
+ }
348
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-3/witness.schema.json",
4
+ "title": "KFD-3 witness",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard",
10
+ "collaborationInterface",
11
+ "sourceRegistry",
12
+ "evidence",
13
+ "closure"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 1
18
+ },
19
+ "contract": {
20
+ "const": "kfd-3-witness"
21
+ },
22
+ "standard": {
23
+ "const": "kfd-3"
24
+ },
25
+ "collaborationInterface": {
26
+ "type": "object",
27
+ "required": [
28
+ "schemaId",
29
+ "digest"
30
+ ],
31
+ "properties": {
32
+ "schemaId": {
33
+ "const": "https://kfd.libkungfu.dev/schemas/kfd-3/collaboration-interface.schema.json"
34
+ },
35
+ "digest": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ }
39
+ },
40
+ "additionalProperties": false
41
+ },
42
+ "sourceRegistry": {
43
+ "$ref": "#/$defs/artifactPointer"
44
+ },
45
+ "evidence": {
46
+ "type": "object",
47
+ "required": [
48
+ "minimalEntrypoints",
49
+ "discoverability",
50
+ "transparentConstraints",
51
+ "choicePaths"
52
+ ],
53
+ "properties": {
54
+ "minimalEntrypoints": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "$ref": "#/$defs/artifactPointer"
59
+ }
60
+ },
61
+ "discoverability": {
62
+ "type": "array",
63
+ "items": {
64
+ "$ref": "#/$defs/artifactPointer"
65
+ }
66
+ },
67
+ "transparentConstraints": {
68
+ "type": "array",
69
+ "items": {
70
+ "$ref": "#/$defs/artifactPointer"
71
+ }
72
+ },
73
+ "choicePaths": {
74
+ "type": "array",
75
+ "items": {
76
+ "$ref": "#/$defs/artifactPointer"
77
+ }
78
+ },
79
+ "manuals": {
80
+ "type": "array",
81
+ "items": {
82
+ "$ref": "#/$defs/artifactPointer"
83
+ }
84
+ }
85
+ },
86
+ "additionalProperties": true
87
+ },
88
+ "closure": {
89
+ "type": "object",
90
+ "required": [
91
+ "classificationMode",
92
+ "reachableEntrypoints",
93
+ "classifiedEntrypoints",
94
+ "unclassifiedEntrypoints"
95
+ ],
96
+ "properties": {
97
+ "classificationMode": {
98
+ "const": "closed-world"
99
+ },
100
+ "reachableEntrypoints": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ }
106
+ },
107
+ "classifiedEntrypoints": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ }
113
+ },
114
+ "unclassifiedEntrypoints": {
115
+ "type": "array",
116
+ "maxItems": 0
117
+ }
118
+ },
119
+ "additionalProperties": true
120
+ },
121
+ "result": {
122
+ "enum": [
123
+ "pass",
124
+ "fail",
125
+ "warning"
126
+ ]
127
+ }
128
+ },
129
+ "additionalProperties": true,
130
+ "$defs": {
131
+ "artifactPointer": {
132
+ "type": "object",
133
+ "required": [
134
+ "path"
135
+ ],
136
+ "properties": {
137
+ "path": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "sha256": {
142
+ "type": "string",
143
+ "pattern": "^[0-9a-f]{64}$"
144
+ },
145
+ "description": {
146
+ "type": "string",
147
+ "minLength": 1
148
+ }
149
+ },
150
+ "additionalProperties": true
151
+ }
152
+ }
153
+ }
@@ -142,6 +142,10 @@
142
142
  "url": {
143
143
  "type": "string",
144
144
  "format": "uri"
145
+ },
146
+ "sha256": {
147
+ "type": "string",
148
+ "pattern": "^[0-9a-f]{64}$"
145
149
  }
146
150
  },
147
151
  "additionalProperties": false
@@ -186,6 +190,41 @@
186
190
  "type": "string"
187
191
  }
188
192
  },
193
+ "interfaces": {
194
+ "type": "object",
195
+ "additionalProperties": {
196
+ "type": "object",
197
+ "required": [
198
+ "contract",
199
+ "schemaVersion",
200
+ "schemaId",
201
+ "schemaPath"
202
+ ],
203
+ "properties": {
204
+ "contract": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "schemaVersion": {
209
+ "type": "integer",
210
+ "minimum": 1
211
+ },
212
+ "schemaId": {
213
+ "type": "string",
214
+ "format": "uri"
215
+ },
216
+ "schemaPath": {
217
+ "type": "string",
218
+ "minLength": 1
219
+ },
220
+ "compatibilityRule": {
221
+ "type": "string",
222
+ "minLength": 1
223
+ }
224
+ },
225
+ "additionalProperties": false
226
+ }
227
+ },
189
228
  "concepts": {
190
229
  "type": "object",
191
230
  "minProperties": 1,
package/standards.json CHANGED
@@ -24,7 +24,8 @@
24
24
  "metadataSchemaVersion": "1",
25
25
  "document": {
26
26
  "path": "decisions/kfd-1.md",
27
- "url": "https://kfd.libkungfu.dev/1"
27
+ "url": "https://kfd.libkungfu.dev/1",
28
+ "sha256": "2ef7438b0737009d36da248d2ecec5f788d46a93b184efadf5e2e31ca20254f0"
28
29
  },
29
30
  "compatibility": {
30
31
  "packageLine": "v1.0",
@@ -42,6 +43,22 @@
42
43
  "contractWorld": "schemas/kfd-1/contract-world.schema.json",
43
44
  "witness": "schemas/kfd-1/witness.schema.json"
44
45
  },
46
+ "interfaces": {
47
+ "contractWorld": {
48
+ "contract": "kfd-1-contract-world",
49
+ "schemaVersion": 1,
50
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-1/contract-world.schema.json",
51
+ "schemaPath": "schemas/kfd-1/contract-world.schema.json",
52
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
53
+ },
54
+ "witness": {
55
+ "contract": "kfd-1-witness",
56
+ "schemaVersion": 1,
57
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-1/witness.schema.json",
58
+ "schemaPath": "schemas/kfd-1/witness.schema.json",
59
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
60
+ }
61
+ },
45
62
  "concepts": {
46
63
  "factSource": "fact source",
47
64
  "contractWorld": "contract world",
@@ -61,7 +78,8 @@
61
78
  "metadataSchemaVersion": "1",
62
79
  "document": {
63
80
  "path": "decisions/kfd-2.md",
64
- "url": "https://kfd.libkungfu.dev/2"
81
+ "url": "https://kfd.libkungfu.dev/2",
82
+ "sha256": "b8be7b7526dcec9ea501998056c55f546492abc4eb63484a9bb8856eb434b710"
65
83
  },
66
84
  "compatibility": {
67
85
  "packageLine": "v1.0",
@@ -70,13 +88,39 @@
70
88
  "rule": "Substantive semantic changes mint a new KFD; compatible metadata additions keep schemaVersion 1."
71
89
  },
72
90
  "schemaIds": {
73
- "metadata": "https://kfd.libkungfu.dev/schemas/kfd-standards.schema.json"
91
+ "metadata": "https://kfd.libkungfu.dev/schemas/kfd-standards.schema.json",
92
+ "releaseClaims": "https://kfd.libkungfu.dev/schemas/kfd-2/release-claims.schema.json",
93
+ "releaseTrustPassport": "https://kfd.libkungfu.dev/schemas/kfd-2/release-trust-passport.schema.json"
74
94
  },
75
95
  "schemaPaths": {
76
- "metadata": "schemas/kfd-standards.schema.json"
96
+ "metadata": "schemas/kfd-standards.schema.json",
97
+ "releaseClaims": "schemas/kfd-2/release-claims.schema.json",
98
+ "releaseTrustPassport": "schemas/kfd-2/release-trust-passport.schema.json"
99
+ },
100
+ "interfaces": {
101
+ "releaseClaims": {
102
+ "contract": "kfd-2-release-claims",
103
+ "schemaVersion": 1,
104
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-2/release-claims.schema.json",
105
+ "schemaPath": "schemas/kfd-2/release-claims.schema.json",
106
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
107
+ },
108
+ "releaseTrustPassport": {
109
+ "contract": "kfd-2-release-trust-passport",
110
+ "schemaVersion": 1,
111
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-2/release-trust-passport.schema.json",
112
+ "schemaPath": "schemas/kfd-2/release-trust-passport.schema.json",
113
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
114
+ }
77
115
  },
78
116
  "concepts": {
79
117
  "facts": "inspectable facts",
118
+ "releaseClaim": "release claim",
119
+ "releaseClaims": "release claims",
120
+ "evidenceBinding": "evidence binding",
121
+ "auditBoundary": "audit boundary",
122
+ "residualRisk": "residual risk",
123
+ "releaseTrustPassport": "release trust passport",
80
124
  "responsibilityState": "responsibility state",
81
125
  "trust": "trust from facts"
82
126
  }
@@ -93,7 +137,8 @@
93
137
  "metadataSchemaVersion": "1",
94
138
  "document": {
95
139
  "path": "decisions/kfd-3.md",
96
- "url": "https://kfd.libkungfu.dev/3"
140
+ "url": "https://kfd.libkungfu.dev/3",
141
+ "sha256": "e329bef41ab5cb689346333df317b39918ea1016424a872e438eea8090070b96"
97
142
  },
98
143
  "compatibility": {
99
144
  "packageLine": "v1.0",
@@ -102,16 +147,42 @@
102
147
  "rule": "Substantive semantic changes mint a new KFD; compatible metadata additions keep schemaVersion 1."
103
148
  },
104
149
  "schemaIds": {
105
- "metadata": "https://kfd.libkungfu.dev/schemas/kfd-standards.schema.json"
150
+ "metadata": "https://kfd.libkungfu.dev/schemas/kfd-standards.schema.json",
151
+ "collaborationInterface": "https://kfd.libkungfu.dev/schemas/kfd-3/collaboration-interface.schema.json",
152
+ "witness": "https://kfd.libkungfu.dev/schemas/kfd-3/witness.schema.json"
106
153
  },
107
154
  "schemaPaths": {
108
- "metadata": "schemas/kfd-standards.schema.json"
155
+ "metadata": "schemas/kfd-standards.schema.json",
156
+ "collaborationInterface": "schemas/kfd-3/collaboration-interface.schema.json",
157
+ "witness": "schemas/kfd-3/witness.schema.json"
158
+ },
159
+ "interfaces": {
160
+ "collaborationInterface": {
161
+ "contract": "kfd-3-collaboration-interface",
162
+ "schemaVersion": 1,
163
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-3/collaboration-interface.schema.json",
164
+ "schemaPath": "schemas/kfd-3/collaboration-interface.schema.json",
165
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
166
+ },
167
+ "witness": {
168
+ "contract": "kfd-3-witness",
169
+ "schemaVersion": 1,
170
+ "schemaId": "https://kfd.libkungfu.dev/schemas/kfd-3/witness.schema.json",
171
+ "schemaPath": "schemas/kfd-3/witness.schema.json",
172
+ "compatibilityRule": "Compatible additions may keep schemaVersion 1; semantic or required-field changes require a new interface version or contract."
173
+ }
109
174
  },
110
175
  "concepts": {
111
176
  "transparentValue": "transparent value",
112
177
  "stableChoice": "stable choice",
113
178
  "explainableConstraints": "explainable constraints",
114
- "nonCoercion": "non-coercive cooperation"
179
+ "nonCoercion": "non-coercive cooperation",
180
+ "participant": "participant",
181
+ "collaborationInterface": "collaboration interface",
182
+ "minimalEntrypoint": "minimal entrypoint",
183
+ "discoverability": "discoverability",
184
+ "closure": "closed-world interface classification",
185
+ "choicePath": "choice path"
115
186
  }
116
187
  }
117
188
  }